;;; Hey, emacs(1), this is -*- Mode: TDL; Coding: utf-8; -*- got it? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; third transfer phase, ERG-specific accomodation: these rules map from the ;;; LOGON transfer-level representations into MRS `idiosyncrasies' in the ERG. ;;; in some case, the ERG may just be lagging behind in development, or the ;;; ERG developers opt to maintain their design independent of LOGON (which we ;;; could hardly criticize, given there is no LOGON budget line item for ERG ;;; adaptation :-). however, ideally, this file should be small ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; _fix_me_ ;;; while people get ready to consider agreeing on what to do about messages in ;;; the long term, JaCY (at least) has messages on attributive adjectives too ;;; (so that they look much like relative clauses). hence, gobble up the ;;; message. (12-jul-05; fcb & oe) ;;; ;;; "~[a-zA-Z0-9]+_a_" so as not to match _a_q_rel adjective_mark_ef := monotonic_mtr & [ CONTEXT.RELS < [ PRED "~[a-zA-Z0-9]+_a_", LBL #h5, ARG0 #e0, ARG1 #x1 ] >, FILTER.RELS < [ PRED "mark", LBL #h5, ARG0 #e0, ARG1 #x1 ] >, OUTPUT.RELS < [ PRED "mark", LBL #h5, ARG0 #e0, ARG1 #x1 ] > ]. adjective_stative_ef := monotonic_mtr & [ CONTEXT.RELS < [ PRED "mark", LBL #h5, ARG0 #e0, ARG1 #x1 ] >, INPUT.RELS < [ PRED #pred, LBL #h5, ARG0 #e0 & [ STATIVE - ], ARG1 #x1 ] >, OUTPUT.RELS < [ PRED #pred, LBL #h5, ARG0 #e0 & [ STATIVE + ], ARG1 #x1 ] >, FLAGS.EQUAL < #x1 > ]. ;; always do this for present tense attributive adverbs attributive_adjective+adverb_ef := monotonic_mtr & [ CONTEXT.RELS < [ LBL #h3, ARG0 #x1 ] >, INPUT [ RELS < [ PRED "mark", LBL #h5, ARG0 #e0, ARG1 x & #x1 ], [ PRED #adverb, LBL #h-adv, ARG0 #e-adv, ARG1 e & #e0], [ PRED #pred, LBL #h5, ARG0 #e0 & [ TENSE PRES ], ARG1 x & #x1, ARG2 a ], [ PRED prpstn_m_rel, LBL #h3, MARG #h4 ] >, HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], OUTPUT.RELS < [ PRED #adverb, LBL #h3, ARG0 #e-adv, ARG1 #e0], [ PRED #pred, LBL #h3, ARG0 #e0 & [ TENSE untensed ], ARG1 x & #x1 ] >, FLAGS.EQUAL < #x1, #e0 > ]. attributive_adjective_ef := monotonic_mtr & [ CONTEXT.RELS < [ LBL #h3, ARG0 #x1 ] >, INPUT [ RELS < [ PRED "mark", LBL #h5, ARG0 #e0, ARG1 x & #x1 ], [ PRED #pred, LBL #h5, ARG0 #e0 & [ TENSE PRES ], ARG1 x & #x1, ARG2 a ], [ PRED prpstn_m_rel, LBL #h3, MARG #h4 ] >, HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], OUTPUT.RELS < [ PRED #pred, LBL #h3, ARG0 #e0 & [ TENSE untensed ], ARG1 x & #x1 ] >, FLAGS.EQUAL < #x1 > ]. mark_ditch_ef := elision_mtr & [ INPUT.RELS < [ PRED "mark" ] > ]. ; verb_mark_ef := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED "~_v_", ; LBL #h5, ARG0 #e0, ARG1 x & #x1 ] >, ; FILTER.RELS < [ PRED "vmark", LBL #h5, ARG0 #e0, ARG1 x & #x1 ] >, ; OUTPUT.RELS < [ PRED "vmark", LBL #h5, ARG0 #e0, ARG1 x & #x1 ] > ]. ; attributive_verb_ef := monotonic_omtr & ; [ CONTEXT.RELS < [ LBL #h3, ARG0 #x1 ], ; [ PRED "vmark", LBL #h5, ARG0 #e0, ARG1 x & #x1 ] >, ; INPUT.RELS < [ PRED #pred, ; LBL #h5, ARG0 #e0, ARG1 x & #x1, ARG2 a ] > , ; OUTPUT.RELS < [ PRED #pred, LBL #h3, ; ARG0 #e0 & [ TENSE untensed, PROG + ], ARG1 x & #x1 ] >, ; FLAGS.EQUAL < #x1 > ]. vmark_ditch_ef := elision_mtr & [ INPUT.RELS < [ PRED "vmark" ] > ]. ;;; ;;; _fix_me_ ;;; classifier insertion for plural mass nouns, e.g. `*informations'; requires ;;; SEM-I for proper generalization. move into a type. --- something similar ;;; presumably should be done for bare singulars, though we might rather want ;;; to fix their quantifier to _not_ transfer to `_a_q' in the first place? ;;; (25-apr-04; oe) ; plural_mass_noun_1_ef := monotonic_mtr & ; [ INPUT.RELS < [ PRED "_equipment_n_rel", LBL #h0, ; ARG0 #x1 & [ NUM pl, MARK test ] ] >, ; OUTPUT [ RELS < [ PRED "_piece_n_rel", LBL #h0, ARG0 #x1, ARG1 #x2 ], ; [ PRED _of_p_sel_rel, LBL #h0, ; ARG0 e_nontense, ARG1 u, ARG2 #x2 ], ; [ PRED bare_div_q_rel, LBL h, ; ARG0 #x2, RSTR #h3, BODY h ], ; [ PRED "_equipment_n_rel", LBL #h4, ; ARG0 #x2 & [ PERS 3, NUM sg, MARK complete ] ] >, ; HCONS < qeq & [ HARG #h3, LARG #h4 ] > ] ]. ;;; ;;; _fix_me_ ;;; there appears to be a growth industry of quantifier adjustments; turn this ;;; into a type, but also aim for better harmonization. (27-jul-04; oe) ;;; def_q+named_ef := monotonic_mtr & [ CONTEXT [ RELS < [ PRED named_rel, LBL #h1, ARG0 #x2 ] >, HCONS < qeq & [ HARG #h3, LARG #h1 ] > ], INPUT.RELS < [ PRED def_q_rel, LBL #h4, ARG0 #x2, RSTR #h3, BODY #h5 ] >, FILTER.RELS < [ PRED compound_name_rel, ARG1 #x2 ] >, OUTPUT.RELS < [ PRED proper_q_rel, LBL #h4, ARG0 #x2, RSTR #h3, BODY #h5 ] > ]. ;;; ;;; _fix_me_ ;;; the ERG treats (nominal) gerunds as mass nouns, hence we need to make sure ;;; there is a suitable quantifier. maybe the rule creating the nominalization ;;; should be more careful instead? (25-apr-04; oe) ;;; ; a_q+nominalize_ef := monotonic_mtr & ; [ CONTEXT [ RELS < [ PRED nominalize_rel, LBL #h1, ARG0 #x2 ] >, ; HCONS < qeq & [ HARG #h3, LARG #h1 ] > ], ; INPUT.RELS < [ PRED _a_q_rel, LBL #h4, ARG0 #x2, RSTR #h3, BODY #h5 ] >, ; OUTPUT.RELS < [ PRED bare_div_q_rel, LBL #h4, ; ARG0 #x2, RSTR #h3, BODY #h5 ] > ]. ;;; ;;; insert `zero' complements for obligatory roles that were not supplied, so ;;; that we can generate at least. (30-jun-04; oe) ;;; ; carry_v_ef := monotonic_mtr & ; [ INPUT.RELS < [ PRED "_carry_v_1_rel", ; LBL #h0, ARG0 #e1, ARG1 #x2, ARG2 a ] >, ; OUTPUT [ RELS < [ PRED "_carry_v_1_rel", LBL #h0, ; ARG0 #e1, ARG1 #x2, ARG2 #x3 & x & [ PERS 3, NUM sg ] ], ; [ PRED some_q_rel, ARG0 #x3, RSTR #h4 ], ; [ PRED thing_rel, LBL #h5, ARG0 #x3 ] >, ; HCONS < qeq & [ HARG #h4, LARG #h5 ] > ] ]. ;;; ;;; _fix_me_ ;;; until oe provides grammar-internal mapping facilities for index properties, ;;; testing for `TENSE' in the INPUT means we end up with both `TENSE' and ;;; `E.TENSE' :-{. hence, swallow some overgeneration for the time being. ;;; (22-jul-05; oe & fcb) #| zero_pron_v_arg1_ef := monotonic_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h0, ARG0 e & #e1 & [ TENSE tensed ], ARG1 a, ARG2 #x2 ] >, OUTPUT [ RELS < [ PRED #pred, LBL #h0, ARG0 #e1, ARG1 #x3, ARG2 #x2 ], [ PRED pronoun_q_rel, ARG0 #x3, RSTR #h4 ], [ PRED pron_rel, LBL #h5, ARG0 #x3 ] >, HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], FLAGS.EQUAL < #e1 > ]. |# ; disable for now -- eric-n 2006/9/5 ;;; FIXME what about passives? Must we have four? ; zero_pron_imp_ef := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED imp_m_rel, ARG0 #e1] >, ; INPUT.RELS < [ PRED #pred, LBL #h0, ; ARG0 #e1, ARG1 u & #u, ARG2 #x2 ] >, ; OUTPUT [ RELS < [ PRED #pred, LBL #h0, ; ARG0 #e1, ARG1 #x3, ARG2 #x2 ], ; [ PRED pronoun_q_rel, ARG0 x & #x3 & [ PERS 2 ], RSTR #h4 ], ; [ PRED pron_rel, LBL #h5, ; ARG0 #x3 & [PRONTYPE std_pron]] >, ; HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], ; FLAGS.EQUAL < #e1, #u, #x3 > ]. ; ;;; ARG1 u ; zero_pron_v_arg1_ef := monotonic_mtr & ; [ INPUT.RELS < [ PRED #pred, LBL #h0, ; ARG0 e & #e1, ; ARG1 u & #u, ARG2 #x2, ARG3 #x3, ARG4 #x4 ] >, ; OUTPUT [ RELS < [ PRED #pred, LBL #h0, ; ARG0 #e1, ; ARG1 #x1, ARG2 #x2, ARG3 #x3, ARG4 #x4 ], ; [ PRED pronoun_q_rel, ARG0 #x1, RSTR #h4 ], ; [ PRED pron_rel, LBL #h5, ; ARG0 #x1 & [PRONTYPE std_pron]] >, ; HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], ; FLAGS.EQUAL < #e1, #u > ]. ; ;;; ARG2 u ; zero_pron_v_arg2_ef := monotonic_mtr & ; `[ INPUT.RELS < [ PRED #pred, LBL #h0, ; ARG0 e & #e1, ; ARG1 #x1, ARG2 u & #u, ARG3 #x3, ARG4 #x4 ] >, ; OUTPUT [ RELS < [ PRED #pred, LBL #h0, ; ARG0 #e1, ; ARG1 #x1, ARG2 #x2, ARG3 #x3, ARG4 #x4 ], ; [ PRED pronoun_q_rel, ARG0 #x2, RSTR #h4 ], ; [ PRED pron_rel, LBL #h5, ; ARG0 #x2 & [PRONTYPE std_pron] ] >, ; HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], ; FLAGS.EQUAL < #e1, #u > ]. ;;; ARG3 u ; zero_pron_v_arg2_ef := monotonic_mtr & ; [ INPUT.RELS < [ PRED #pred, LBL #h0, ; ARG0 e & #e1, ; ARG1 #x1, ARG2 #x2, ARG3 u & #u, ARG4 #x4 ] >, ; OUTPUT [ RELS < [ PRED #pred, LBL #h0, ; ARG0 #e1, ; ARG1 #x1, ARG2 #x2, ARG3 #x3, ARG4 #x4 ], ; [ PRED pronoun_q_rel, ARG0 #x3, RSTR #h4 ], ; [ PRED pron_rel, LBL #h5, ARG0 #x2 ] >, ; HCONS < qeq & [ HARG #h4, LARG #h5 ] > ], ; FLAGS.EQUAL < #e1, #u > ]. #| topic_default_ef := monotonic_mtr & [ INPUT.RELS < [ PRED message_m_rel & #m1, LBL #h1, ARG0 #e1, MARG #h2, TPC u, PSV #a1 ] >, OUTPUT [ RELS < [ PRED #m1, LBL #h1, ARG0 #e1, MARG #h2, TPC u, PSV #a1 ] > ], FLAGS.EQUAL < #e1 > ]. topic_default_ef := monotonic_mtr & [ INPUT.RELS < [ PRED message_m_rel & #m1, LBL #h1, MARG #h2, ARG0 #e1, TPC #u1 ] >, OUTPUT [ RELS < [ PRED #m1, LBL #h1, MARG #h2, ARG0 #e1, TPC u ] > ], FLAGS [ EQUAL < #u1 >, FILTER < #u1 > ]. |# ;;; wh_fix up (may not be necessary without messages) why_ef := topicalize-mtr & [ CONTEXT.RELS < [ PRED _for_p_rel], [ PRED reason_rel], ... >, INPUT.RELS < [ ARG0 #e2 & [MARK test] ], ... >, OUTPUT.RELS < [ ARG0 #e2 & [MARK complete] ], ... >]. where_ef := topicalize-mtr & [ CONTEXT.RELS < [ PRED unspec_loc_rel], [ PRED place_n_rel], ... >, INPUT.RELS < [ ARG0 #e2 & [MARK test] ], ... >, OUTPUT.RELS < [ ARG0 #e2 & [MARK complete] ], ... >]. why_ef := topicalize-mtr & [ CONTEXT.RELS < [ PRED unspec_manner_rel], [ PRED manner_rel], ... >, INPUT.RELS < [ ARG0 #e2 & [MARK test] ], ... >, OUTPUT.RELS < [ ARG0 #e2 & [MARK complete] ], ... >]. when_ef := topicalize-mtr & [ CONTEXT.RELS < [ PRED unspec_loc_rel], [ PRED time_n_rel], ... >, INPUT.RELS < [ ARG0 #e2 & [MARK test] ], ... >, OUTPUT.RELS < [ ARG0 #e2 & [MARK complete] ], ... >]. ;;; doesn't deal with in-situ wh's ;;; FCB slightly under constrained (^_^). which_ef := monotonic_mtr & [ CONTEXT.RELS <[ PRED which_q_rel, ARG0 #x1] >, FILTER.RELS <[ PRED poss_rel, ARG2 #x1], [ PRED place_n_rel, ARG0 #x1] >, INPUT.RELS < [ PRED prpstn_m_rel, LBL #hm, MARG #hv, ARG0 #e2, TPC #u1 & u, PSV #u3 & u], [ PRED int_m_rel, LBL #h1, MARG #h2, ARG0 #e2 & [MARK test], TPC #u1 & u, PSV #u3] >, OUTPUT.RELS <[ PRED prpstn_m_rel, LBL #hm, MARG #hv, ARG0 #e2, TPC #x1, PSV #u3], [ PRED int_m_rel, LBL #h1, MARG #h2, ARG0 #e2 & [MARK complete], TPC #x1, PSV #u3] >, FLAGS [ SUBSUME < #e2 > ]]. ;;; ;;; Zero pronoun insertion ;;; ;; Add to agr3, then ARG2, then ARG1 ;; transfer other arguments if they exist ;; not beautiful but livable with ;; zero_arg3_123_ef := optional_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2, ARG3 #z3 & u] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2, ARG3 #x3], [ PRED pronoun_q_rel, ARG0 #x3, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x3 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS.EQUAL < #h, #z3 > ]. zero_arg2_123_ef := optional_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #z2 & u, ARG3 #x3 & i] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2, ARG3 #x3], [ PRED pronoun_q_rel, ARG0 #x2, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x2 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS [EQUAL < #h, #z2 >, SUBSUME < #x3 > ]]. zero_arg1_123_ef := monotonic_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #z1 & u, ARG2 #x2 & i, ARG3 #x3 & i] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2, ARG3 #x3], [ PRED pronoun_q_rel, ARG0 #x1, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x1 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS [EQUAL < #h, #z1 >, SUBSUME < #x2, #x3 > ]]. zero_arg2_12_ef := optional_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #z2 & u] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2], [ PRED pronoun_q_rel, ARG0 #x2, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x2 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS.EQUAL < #h, #z2 >]. zero_arg1_12_ef := monotonic_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #z1 & u, ARG2 #x2 & i] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1, ARG2 #x2], [ PRED pronoun_q_rel, ARG0 #x1, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x1 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS [EQUAL < #h, #z1 >, SUBSUME < #x2 > ]]. zero_arg1_1_ef := monotonic_mtr & [ INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #z1 & u] >, OUTPUT [ RELS < [ PRED #pred, LBL #h, ARG0 #e, ARG1 #x1], [ PRED pronoun_q_rel, ARG0 #x1, RSTR #h1 ], [ PRED pron_rel, LBL #h2, ARG0 #x1 & [PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #h1, LARG #h2 ] > ], FLAGS.EQUAL < #h, #z1 >]. ;; ;; If is is a command, then change the subject to a 2nd person zero pronoun ;; pron_imp_arg1_ef := monotonic_mtr & [ CONTEXT.RELS < [ PRED imp_m_rel, ARG0 #e ], [ ARG0 #e, ARG1 #x1 ] >, INPUT.RELS < [ PRED pron_rel, LBL #h2, ARG0 #x1 & [PRONTYPE std_pron]] >, OUTPUT.RELS < [ PRED pron_rel, LBL #h2, ARG0 #x1 & [PERS 2, PRONTYPE zero_pron]] >]. ;; ;; if it is a question, and number is unspecified, change it to second person ;; - probably too strong, and I couldn't restrict it enough! ;pron_int_arg1_ef := monotonic_mtr & ;[ CONTEXT.RELS < [ PRED int_m_rel, ARG0 #e ], ; [ ARG0 #e, ARG1 #x1 ] >, ; INPUT.RELS < [ PRED pron_rel, LBL #h2, ; ARG0 #x1 & [PERS PERSON, PRONTYPE std_pron]] >, ; OUTPUT.RELS < [ PRED pron_rel, LBL #h2, ; ARG0 #x1 & [PERS 2, PRONTYPE std_pron]] >, ; FLAGS.EQUAL < #x1 >]. ;;; Change superl_rel to "_most_a_1_rel" if it modifies a verb ;;; Change comp_rel to "_more_a_1_rel" ;;; realy a syntactic thing most_ef := intersective_adverb_mtr & [ CONTEXT.RELS < [ PRED "~_v_", ARG0 #e ] >, INPUT.RELS < [ PRED superl_rel, ARG1 #e ] >, OUTPUT.RELS < [ PRED "_most_a_1_rel" ] > ]. more_ef := intersective_adverb_mtr & [ CONTEXT.RELS < [ PRED "~_v_", ARG0 #e ] >, INPUT.RELS < [ PRED comp_rel, ARG1 #e ] >, OUTPUT.RELS < [ PRED "_more_a_1_rel" ] > ]. very-a_lot_ef := intersective_adverb_mtr & [ CONTEXT.RELS < [ PRED "~_v_", ARG0 #e ] >, INPUT.RELS < [ PRED "_very_x_deg_rel", ARG1 #e ] >, OUTPUT.RELS < [ PRED "_a+lot_a_1_rel" ] > ].