;;; Hey, emacs(1), this is -*- Mode: TDL; Package: LKB; -*- got it? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; a transfer rule is a qadruple , where each element is a partial ;;; MRS, with: ;;; ;;; - F: an input filter; when F matches against the input MRS, the rule is ;;; blocked; F is evaluated _after_ C and I have matched; ;;; - C: the input context; needs to match for a rule to apply and binds ;;; variables, but is preserved in the output; ;;; - I: the input description; matches against the input MRS; everything that ;;; was matched in the input will be replaced by the OUTPUT part; ;;; - O: the output description; everything in the OUTPUT part is inserting ;;; into the MRS, respecting variable bindings that have been established ;;; in matching earlier components. ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; MWEs that include quantifiers ;;; do this before we translate the quantifiers ko-so-a_it_q-mtr := monotonic_omtr & [ CONTEXT.HCONS < qeq & [ HARG #h3, LARG #h1 ] >, INPUT.RELS < [ PRED "ja:generic-nom_rel", LBL #h1, ARG0 #x ], [ LBL #h2, ARG0 #x, RSTR #h3 ]>, OUTPUT.RELS < [ PRED pron_rel, LBL #h1, ARG0 #x & [ PERS 3, PRONTYPE std_pron, NUM sg] ], [ PRED pronoun_q_rel, LBL #h2, ARG0 #x, RSTR #h3 ] >, FLAGS.EQUAL < #h3 > ]. ;;; explicit quantifiers aru_some_q-mtr := quantifier_mtr & [ JA.RELS < [ PRED "ja:_aru_q_rel"] >, EN.RELS < [ PRED _some_q_indiv_rel ] > ]. kaku_every_q-mtr := quantifier_mtr & [ JA.RELS < [ PRED "ja:_kaku_q_14_rel"] >, EN.RELS < [ PRED _every_q_rel ] > ]. indef_some_q-mtr := quantifier_mtr & [ JA.RELS < [ PRED "ja:indef_rel"] >, EN.RELS < [ PRED _some_q_rel ] > ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; messages and other meta-level (construction-specific) predicates ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; request_m := monotonic_mtr & ; [ INPUT [RELS < [ PRED "ja:command_m_rel", LBL #h0, ARG0 #e0, MARG #m4 ], ; [ PRED "ja:_kudasaru_v_rel", LBL #h4, ARG0 #e0, ARG3 #h3 ], ; [ PRED "ja:proposition_m_rel", LBL #h3, ARG0 #e1, MARG #m2 ] >, ; HCONS < qeq & [HARG #m4, LARG #h4] > ], ; OUTPUT [RELS < [ PRED imp_m_rel, LBL #h0, ARG0 #e1 & [TENSE pres], ; MARG #m1, PSV #p0, TPC #t0 ], ; [ PRED "_maybe_a_1_rel", LBL #h1, ARG1 #h2 ], ; [ PRED imp_m_rel, LBL #h2, ARG0 #e1, ; MARG #m2, PSV #p0, TPC #t0 ] >, ; HCONS < qeq & [HARG #m1, LARG #h1] > ]]. ; ERG now anaylzes requests as "polite_rel" with a CARG of "please" request_m := monotonic_mtr & [ INPUT [ RELS < [ PRED "ja:command_m_rel", LBL #h0, ARG0 #e0, MARG #m4 ], [ PRED "ja:_kudasaru_v_2_rel", LBL #h4, ARG0 #e0, ARG3 #h3 ], [ PRED "ja:proposition_m_rel", LBL #h3, ARG0 #e1, MARG #m2 ] >, HCONS < qeq & [ HARG #m4, LARG #h4 ], qeq & [ HARG #m2, LARG #h5 ] > ], OUTPUT [ RELS < [ PRED imp_m_rel, LBL #h0, ARG0 #e1 & [ TENSE pres ], MARG #m2, PSV #p0, TPC #t0 ], [ PRED polite_rel, LBL #h5, ARG0 #i & i, ARG1 #e1, CARG "please" ] >, HCONS < qeq & [ HARG #m2, LARG #h5 ] > ], FLAGS.EQUAL < #i > ]. ; ; if it isn't scoping over a verb ; kudasai_v_gimme_v := monotonic_mtr & [ CONTEXT.HCONS < qeq & [ HARG #hm, LARG #hv ] >, INPUT [ RELS < [ PRED "ja:command_m_rel", LBL #h0, ARG0 #e0, MARG #hm ], [ PRED "ja:_kudasaru_v_1_rel", LBL #hv, ARG0 #e0, ARG2 #x2 ] > ], OUTPUT [ RELS < [ PRED imp_m_rel, LBL #h0, ARG0 #e0 & [ TENSE pres ], MARG #hm, PSV #p0, TPC #t0 ], [ PRED polite_rel, LBL #hv, ARG0 #i & i, ARG1 #e0, CARG "please" ], [ PRED "_give_v_1_rel", LBL #hv, ARG0 #e0, ARG1 #x1, ARG2 #x2, ARG3 #x3 ], [ PRED pronoun_q_rel, ARG0 #x1, RSTR #hr1 ], [ PRED pron_rel, LBL #hp1, ARG0 #x1 & [PERS 2, NUM sg, PRONTYPE zero_pron]], [ PRED pronoun_q_rel, ARG0 #x3, RSTR #hr ], [ PRED pron_rel, LBL #hp, ARG0 #x3 & [PERS 1, NUM sg, PRONTYPE std_pron]] >, HCONS < qeq & [ HARG #hr1, LARG #hp1 ], qeq & [ HARG #hr, LARG #hp ] > ], FLAGS.EQUAL < #i > ]. ; ; We need to merge events for requests -- eric-n ; merge_events_arg0 := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED "merge_events_mark", ARG0 #e_old & e, ARG1 #e_new & e ] >, ; INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e_old, ARG1 #a1, ARG2 #a2, ARG3 #a3 ] >, ; OUTPUT.RELS < [ PRED #pred, LBL #h, ARG0 #e_new, ARG1 #a1, ARG2 #a2, ARG3 #a3 ] >, ; FLAGS.EQUAL < #e_old, #e_new, #h > ]. ; merge_events_arg1 := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED "merge_events_mark", ARG0 #e_old & e, ARG1 #e_new & e ] >, ; INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #e_old, ARG2 #a2, ARG3 #a3 ] >, ; OUTPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #e_new, ARG2 #a2, ARG3 #a3 ] >, ; FLAGS.EQUAL < #e_old, #e_new, #h > ]. ; merge_events_arg2 := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED "merge_events_mark", ARG0 #e_old & e, ARG1 #e_new & e ] >, ; INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #a1, ARG2 #e_old, ARG3 #a3 ] >, ; OUTPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #a1, ARG2 #e_new, ARG3 #a3 ] >, ; FLAGS.EQUAL < #e_old, #e_new, #h > ]. ; merge_events_arg3 := monotonic_mtr & ; [ CONTEXT.RELS < [ PRED "merge_events_mark", ARG0 #e_old & e, ARG1 #e_new & e ] >, ; INPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #a1, ARG2 #a2, ARG3 #e_old ] >, ; OUTPUT.RELS < [ PRED #pred, LBL #h, ARG0 #a0, ARG1 #a1, ARG2 #a2, ARG3 #e_new ] >, ; FLAGS.EQUAL < #e_old, #e_new, #h > ]. proposition_m := message_mtr & [ INPUT.RELS < [ PRED "ja:proposition_m_rel" ] >, OUTPUT.RELS < [ PRED prpstn_m_rel ] > ]. ;;; ;;; _fix_me_ ;;; JaCY, it seems, fails to implement the `questions as open propositions' ;;; analysis of (Ginzburg & Sag, 2001). ;;; ; added TPC #e1 -- eric-n 2006/8/30 ; -- removed for now question_m := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:question_m_rel", LBL #h0, MARG #h1, ARG0 #e1 ] >, OUTPUT.RELS < [ PRED int_m_rel, LBL #h0, MARG #h2, ARG0 #e1, TPC #t, PSV #p ], [ PRED prpstn_m_rel, LBL #h2, MARG #h1, ARG0 #e1, TPC #t, PSV #p ] >]. command_m := message_mtr & [ INPUT.RELS < [ PRED "ja:command_m_rel" ] >, OUTPUT.RELS < [ PRED imp_m_rel ] > ]. ;;; ;;; closed class thingies ;;; person_n := noun_mtr & [ INPUT.RELS < [ PRED "ja:person_n_rel" ] >, OUTPUT.RELS < [ PRED person_rel ] > ]. person_rel_n_1-mtr := noun_mtr & [ JA.RELS < [ PRED "ja:person" ] >, EN.RELS < [ PRED person_rel ] > ]. ;;; interlingua predicates ;named_n := monotonic_mtr & ;[ INPUT.RELS < [ PRED "ja:named_rel" ] >, ; OUTPUT.RELS < +copy+ & [ PRED named_rel ] > ]. compound_n := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:compound_rel" ] >, OUTPUT.RELS < +copy+ & [ PRED compound_rel ] > ]. ;;; oe: Can I make this work? ; refl_mark := monotonic_mtr & ; [ FILTER.RELS < [ LBL #h, PRED "refl_mark", ARG0 #e] >, ; CONTEXT.RELS < [ LBL #h, PRED "ja:pron_rel", ARG0 #e & [ PRONTYPE refl] ] >, ; OUTPUT.RELS < [ LBL #h, PRED "refl_mark", ARG0 #e] >, ; FLAGS.EQUAL < #e, #h > ]. ;;; make possessive pronouns: mine, his, etc ; poss_pron_n := monotonic_mtr & ; [ INPUT [RELS < [ LBL #h, PRED "ja:pron_rel", ARG0 #x1 ] , ; [ LBL #hd, PRED "ja:def_rel", RSTR #hdr ], ; [ LBL #h, PRED "ja:_no_n_4", ; ARG0 #e, ARG1 #x1, ARG2 #x2 ] >, ; HCONS < qeq & [ HARG #hdr, LARG #h ] > ], ; OUTPUT [RELS < [ +copy+ LBL #h3, PRED pron_rel, ARG0 #x2 ; & [ PRONTYPE std_pron] ], ; [ LBL #hd, PRED pronoun_q_rel, RSTR #hdr ], ; [ LBL #h PRED poss_rel, ARG0 #ep & e, ; ARG1 #x1 & x, ARG2 #x2 & x ], ; [ LBL #h, PRED "generic_entity_rel", ; ARG0 #1 ], ; [ PRED def_implicit_q_rel, ; ARG0 #x1 & x, ; RSTR #hr & h ] > , ; [ HCONS < qeq & [ HARG #hdr, LARG #h ], ; qeq & [ HARG #hr, LARG #h3 ],> ]]. ;;; makes all pronouns std_pron std_pron_n := monotonic_mtr & [ INPUT.RELS < [ LBL #h, PRED "ja:pron_rel", ARG0 #e ] >, OUTPUT.RELS < +copy+ & [LBL #h, PRED pron_rel, ARG0 #e & [ PRONTYPE std_pron] ] >, FLAGS.EQUAL < #e,#h > ]. ;;; can't use cardinal_mtr because of ja: cardinal_je := adjective_mtr & [ INPUT.RELS < [ PRED "ja:card_rel", LBL #h1, ARG0 #e2, ARG1 #i3, CARG #carg ] >, OUTPUT.RELS < [ PRED card_rel, LBL #h1, ARG0 #e2, ARG1 #i3, CARG #carg ] > ]. kuru_v-come_v-mtr := arg1_v_mtr & [ JA.RELS < [ PRED "ja:_kuru_v_rel" ] >, EN.RELS < [ PRED "_come_v_1_rel" ] > ]. ; and_x := nominal_conjunction_mtr & ; [ INPUT.RELS < [ PRED "_to_p_and_rel" ] >, ; OUTPUT.RELS < [ PRED _and_c_rel ] > ]. ;compound_c := monotonic_mtr & ; [ INPUT.RELS < [ PRED "_nara_p_rel"], ... >, ; OUTPUT.RELS < [ PRED "_if_x_then_rel"], ... > ]. ; tame_n+ni_p*for_p := monotonic_mtr & ; [ INPUT ; [ RELS ; < [ PRED "_tame_n_rel", ; LBL #h6, ; ARG0 #x4 ], ; [ PRED udef_q_rel, ; ARG0 #x4 & x, ; RSTR #h5 & h ], ; [ PRED unspec_compound_rel, ; ARG1 #x4, ; ARG2 #x1 ], ; [ PRED "_ni_p_rel", ; ARG1 #x4, ; ARG2 #e2 ] >, ; HCONS < qeq & [ HARG #h5, LARG #h6 ] > ], ; FLAGS.EQUAL < #h5, #x4 >, ; CONTEXT.RELS ; < [ PRED "~_v_", ; LBL #h3, ; ARG0 #e2 ] >, ; OUTPUT.RELS ; < [ PRED _for_p_rel, ; LBL #h3, ; ARG1 #e2, ; ARG2 #x1 ] > ]. ;;; ;;; Superlatives ;;; Change superl_rel to "_most_a_1_rel" in erg.mtr ichiban-superlative-mtr := intersective_adverb_mtr & [ JA.RELS < [ PRED "ja:_ichiban_a_rel", ARG1 #e ] >, EN.RELS < [ PRED superl_rel ] > ]. ;;; Kanji and hiragana mottomo_1-superlative-mtr := intersective_adverb_mtr & [ JA.RELS < [ PRED "ja:_mottomo_a_1_rel" ] >, EN.RELS < [ PRED superl_rel ] > ]. mottomo-superlative-mtr := intersective_adverb_mtr & [ JA.RELS < [ PRED "ja:_mottomo_a_rel" ] >, EN.RELS < [ PRED superl_rel ] > ].