;;; Hey, emacs(1), this is -*- Mode: TDL; Coding: utf-8; -*- got it? ;;; ;;; finally, perform some post-core fix-up: make sure variable equations are ;;; being propagated, delete transfer-internal meta EPs, et al. ;;; ;;; ;;; ;;; NorGram has relatively vanilla analyses of V+N and Adj+N compounds; for the ;;; ones that made it this far, convert them into a compositonal structure. ;;; v+n_compound_cf := monotonic_mtr & [ INPUT.RELS < [ PRED "~_v_", LBL #h4, ARG0 #e3 ], [ PRED compound_rel, LBL #h0, ARG0 #e1, ARG1 #x2, ARG2 #e3 & e ] >, OUTPUT [ RELS < +copy+ & [ ARG0 [ PROG + ] ], [ PRED compound_rel, LBL #h0, ARG0 #e1, ARG1 #x2, ARG2 #x5 ], [ PRED udef_q_rel, ARG0 #x5 & [ PERS 3, NUM sg, GRIND - ], RSTR #h6 ], [ PRED nominalization_rel, LBL #h7, ARG0 #x5, ARG1 #h9 ], [ PRED prog_mark, LBL #h4, ARG0 #e3 ] >, HCONS < qeq & [ HARG #h6, LARG #h7 ], qeq & [ HARG #h9, LARG #h4 ] > ], FLAGS.EQUAL < #e3 > ]. ;;; ;;; _fix_me_ ;;; the general snugging rules run before this file, so to get the [ PROG + ] ;;; magic, repeat the following two rules here. probably, post-snugging, there ;;; should be another set of rules to process the various marks? or, maybe a ;;; way of naming a group of rules and invoking them in multiple places? ;;; (21-oct-07; oe) prog_cf_2 := monotonic_mtr & [ INPUT.RELS < [ LBL #h4 & h, ARG0 #e2 & e ], [ PRED prog_mark, LBL #h4, ARG0 #e2 ] >, OUTPUT.RELS < +copy+ & [ ARG0 [ PROG + ] ] >, FLAGS.EQUAL < #h4, #e2 > ]. prog_mark_ditch_cf_2 := elision_mtr & [ INPUT.RELS < [ PRED prog_mark ] > ]. adj+n_compound_cf := monotonic_mtr & [ INPUT.RELS < [ PRED #pred, ARG0 #e0, ARG1 a ], [ PRED compound_rel, LBL #h0, ARG0 #e1, ARG1 #x0 & x , ARG2 #e0 & e ] >, OUTPUT.RELS < [ PRED #pred, LBL #h0, ARG0 #e0, ARG1 #x0 ] >, FLAGS.EQUAL < #e0, #x0 > ]. ;;; ;;; a genuine difference between the languages: where Norwegian allows ;;; non-finite VPs as internal arguments to prepositions, English requires a ;;; nominalization in the corresponding construction. (16-oct-06; dan & oe) ;;; ;;; _fix_me_ ;;; the three-rule solution is rather baroque, simply because we cannot have a ;;; PRED regular expression (on the preposition) plus a variable :-{. ;;; (16-oct-06; oe) prep_mark_cf := monotonic_mtr & [ CONTEXT.RELS < [ PRED "~_p_", LBL #h0, ARG0 #e0 & e, ARG2 #h1 & h ] >, FILTER.RELS < [ PRED prep_mark, LBL #h0, ARG0 #e0 ] >, OUTPUT.RELS < [ PRED prep_mark, LBL #h0, ARG0 #e0 ] >, FLAGS.EQUAL < #e0, #h1 > ]. prep+h_cf := monotonic_mtr & [ INPUT [ RELS < [ PRED "~_v_", LBL #h4, ARG0 #e0 & e ], [ PRED #p, LBL #h1, ARG0 #e1, ARG1 #i1, ARG2 #h0 & h ], [ PRED prep_mark, LBL #h1, ARG0 #e1 ] >, HCONS < qeq & [ HARG #h0, LARG #h4 ] > ], OUTPUT [ RELS < +copy+ & [ ARG0 [ PROG + ] ], [ PRED udef_q_rel, ARG0 #x2, RSTR #h2 ], [ PRED nominalization_rel, LBL #h3, ARG0 #x2 & x & [ NUM sg, PERS 3, GRIND - ], ARG1 #h4 ], [ PRED #p, LBL #h1, ARG0 #e1, ARG1 #i1, ARG2 #x2 ] >, HCONS < qeq & [ HARG #h2, LARG #h3 ] > ], FLAGS.EQUAL < #e0, #h0 > ]. prep_ditch_cf := elision_mtr & [ INPUT.RELS < [ PRED prep_mark ] > ]. ;;; ;;; finally, the time has come to decide on how to translate bare singulars. ;;; for `pure' count nouns in the singular (as they all should be in the scope ;;; of this particular quantifier), hallucinate an indefinite, for everything ;;; else, just move to a covert determiner. ;;; ;;; for a limited class of nouns, actually hallucinate definiteness. ;;; ;;; _fix_me_ ;;; for this family of rules, once again, it would be nice to form a hierarchy ;;; of predicates, generalizing specifically (for this purpose) over the set of ;;; prepositions, for example, that prime definiteness. currently, we cannot ;;; go down that route because strings cannot be part of the LKB type hierarchy ;;; in any interesting way. (27-jan-08; oe) ;;; bare_sg_count_the_1_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED count_noun_mark, LBL #h0, ARGM #x0 & [ NUM sg ] ], [ PRED "~^_(?:north|south)?(?:east|west)_n_", LBL #h0, ARG0 #x0 ] >, HCONS < qeq & [ HARG #h1, LARG #h0 ] > ], INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] >, OUTPUT.RELS < [ PRED _the_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] > ]. bare_sg_count_the_2_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED count_noun_mark, LBL #h0, ARGM #x0 & [ NUM sg ] ], [ PRED "~^_(?:north|south)_n_", LBL #h0, ARG0 #x0 ] >, HCONS < qeq & [ HARG #h1, LARG #h0 ] > ], INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] >, OUTPUT.RELS < [ PRED _the_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] > ]. ;;; ;;; likewise, in select contexts definiteness is strongly preferred ;;; bare_sg_count_the_3_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED "~^_(?:in.spite.of|no.matter|regardless.of)_p_", ARG2 #x0 ] >, HCONS < qeq & [ HARG #h1, LARG #h0 ] > ], FILTER.RELS < [ PRED mass_noun_mark, LBL #h0, ARGM #x0 ] >, INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h2, ARG0 #x0 & [ NUM sg ], RSTR #h1, BODY #h3 ] >, OUTPUT.RELS < [ PRED _the_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] > ]. bare_sg_count_the_4_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED "~^_(?:irrespective)_a_", ARG2 #x0 ] >, HCONS < qeq & [ HARG #h1, LARG #h0 ] > ], FILTER.RELS < [ PRED mass_noun_mark, LBL #h0, ARGM #x0 ] >, INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h2, ARG0 #x0 & [ NUM sg ], RSTR #h1, BODY #h3 ] >, OUTPUT.RELS < [ PRED _the_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] > ]. bare_sg_count_a_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED count_noun_mark, LBL #h0, ARGM #x0 & [ NUM sg ] ], [ LBL #h0, ARG0 #x0 ] >, HCONS < qeq & [ HARG #h1, LARG #h0 ] > ], INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] >, OUTPUT.RELS < [ PRED _a_q_rel, LBL #h2, ARG0 #x0, RSTR #h1, BODY #h3 ] > ]. bare_sg_ef := monotonic_mtr & [ INPUT.RELS < [ PRED bare_sg_q_rel, LBL #h0, ARG0 #x0, RSTR #h1, BODy #h2 ] >, OUTPUT.RELS < [ PRED udef_q_rel, LBL #h0, ARG0 #x0, RSTR #h1, BODY #h2 ] > ]. ;;; ;;; something to be proud of, maybe: lacking a universal grinder in the ERG, ;;; we wrap ground entities into a suitable compound. (28-apr-05; oe) ;;; ground_compound_matter_cf := monotonic_omtr & [ CONTEXT [ RELS < [ PRED count_noun_mark, LBL #h0, ARGM #x1 & [ NUM sg ] ], [ PRED quant_rel, ARG0 #x1, RSTR #h5 ] >, HCONS < qeq & [ HARG #h5, LARG #h0 ] > ], INPUT.RELS < [ PRED #pred, LBL #h0, ARG0 #x1 & x & [ NUM sg, GRIND + ], ARG1 a ] >, OUTPUT [ RELS < [ PRED #pred, LBL #h3, ARG0 #x2 & [ PERS 3, NUM sg, GRIND - ] ], [ PRED udef_q_rel, ARG0 #x2, RSTR #h4 ], [ PRED compound_rel, LBL #h0, ARG0 e_untensed, ARG1 #x1, ARG2 #x2 ], [ PRED "_matter_n_of_rel", LBL #h0, ARG0 #x1 & [ GRIND - ] ] >, HCONS < qeq & [ HARG #h4, LARG #h3 ] > ], FLAGS.EQUAL < #x1 > ]. ;;; ;;; for a distinction that is grammaticalized in Norwegian but not English: in ;;; `Han elsker sin bil.', the subject pronoun must be the owner of the car ;;; (conversely, in `Han elsker hans bil.', the two cannot be co-referential). ;;; to at least preserve the first bit of information, add an extra `_own_a'. ;;; reflexive_poss_cf := monotonic_omtr & [ CONTEXT.RELS < [ PRED pron_rel, LBL #h0, ARG0 #x1 ], [ PRED identity_rel, LBL #h0, ARG1 #x1 ], [ PRED poss_rel, LBL #h3, ARG1 #x2, ARG2 #x1 ] >, FILTER.RELS < [ PRED "_own_a_1_rel", LBL #h3, ARG0 e_untensed, ARG1 #x2 ] >, OUTPUT.RELS < [ PRED "_own_a_1_rel", LBL #h3, ARG0 e_untensed, ARG1 #x2 ] > ].