;;; Hey, emacs(1), this is -*- Mode: TDL; Package: LKB; Encoding: utf-8 -*- got it? ;;; ;;; a separate phase for prepositions, so that we can assume the arguments have ;;; been transferred, and rules here can condition on the TL hierarchy. ;;; ;;; Particles, prepositions, etc. ; XのY -> X Y ; not if X is a pronoun (then use poss) no_p_rel-compound_rel-omtr := preposition_omtr & [ FILTER.RELS < [ PRED "ja:pron_rel", ARG0 #x1] >, JA.RELS < [ PRED "ja:_no_p_rel", ARG2 #x1 ] >, EN.RELS < [ PRED compound_rel ] > ]. mark-compound_rel-lbl-mtr := monotonic_mtr & [ CONTEXT.RELS < [ PRED "~_n_", LBL #h0, ARG0 #x1 & x ], [ PRED compound_rel, LBL #h1, ARG0 #e1, ARG1 #x1, ARG2 #x2 ] >, OUTPUT.RELS < [ PRED "compound_rel_lbl_mark", LBL #h1, ARG0 #h0 ] >, FILTER.RELS < [ PRED "compound_rel_lbl_mark", LBL #h1, ARG0 #h0 ] >, FLAGS.EQUAL < #x1 > ]. swap-compound_rel-lbl-mtr := monotonic_mtr & [ INPUT.RELS < [ PRED compound_rel, LBL #h1, ARG0 #e1, ARG1 #x1, ARG2 #x2 ], [ PRED "compound_rel_lbl_mark", LBL #h1, ARG0 #h2 ] >, OUTPUT.RELS < [ PRED compound_rel, LBL #h2, ARG0 #e1, ARG1 #x1, ARG2 #x2 ] > ]. ; XのY -> X's Y or Y of X ; this is a supertype of _of_p_rel -- eric 2008/11/10 no_p_rel-poss_rel-omtr := preposition_mtr & [ JA.RELS < [ PRED "ja:_no_p_rel" ] >, EN.RELS < [ PRED poss_rel ] > ]. ni_p+adj-adv := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:_ni_p_rel", LBL #h1, ARG0 #e1 & e, ARG1 #e2 & e, ARG2 #e3 & e ], [ PRED #p, LBL #h2, ARG0 #e3, ARG1 #u ] >, OUTPUT.RELS < [ PRED #p, LBL #h1, ARG0 #e3 & [ TENSE UNTENSED ], ARG1 #e2 ] >, FLAGS.EQUAL < #e1, #e2, #e3 > ]. ; ni_p_rel-in+order+to_rel := monotonic_omtr & ; [ CONTEXT.RELS < [ PRED "~_v_", LBL #h1, ARG0 #e1 & e ] >, ; JA.RELS < [ PRED "ja:_ni_p_rel", LBL #h1, ARG0 #e0 & e, ARG1 #e1 & e, ARG2 #e2 & e ] >, ; EN.RELS < [ PRED "_in+order+to_x_rel", LBL #h1, ARG0 #e0, MAIN #h2, SUBORD #h3 ] >, ; FLAGS.EQUAL < #e0, #e1, #e2 > ]. de_p_rel-unspec_loc_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_de_p_rel", ARG2 #x ] >, EN.RELS < [ PRED unspec_loc_rel ] > ]. ni_p_rel-unspec_loc_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_ni_p_rel", ARG2 #x ] >, EN.RELS < [ PRED unspec_loc_rel ] > ]. ; de_p_rel-unspec_loc_rel := preposition_mtr & ; [ CONTEXT.RELS < [ PRED "ja:place_rel", ARG0 #x ] >, ; JA.RELS < [ PRED "ja:_de_p_rel", ARG2 #x ] >, ; EN.RELS < [ PRED unspec_loc_rel ] > ]. ; ni_p_rel-unspec_loc_rel := preposition_mtr & ; [ CONTEXT.RELS < [ PRED "ja:place_rel", ARG0 #x ] >, ; JA.RELS < [ PRED "ja:_ni_p_rel", ARG2 #x ] >, ; EN.RELS < [ PRED unspec_loc_rel ] > ]. ;;; should be handled by unspec_loc_rel now -- eric-n, 2008/04/25 ;;;; *in* January ;ni_p_rel-in_p_temp_rel := preposition_mtr & ;[ CONTEXT.RELS < [ PRED mofy_rel, ARG0 #x ] >, ; JA.RELS < [ PRED "ja:_ni_p_rel", ARG2 #x ] >, ; EN.RELS < [ PRED _in_p_temp_rel ] > ]. ;;;; *on* Monday ;ni_p_rel-on_p_temp_rel := preposition_mtr & ;[ CONTEXT.RELS < [ PRED dofw_rel, ARG0 #x ] >, ; JA.RELS < [ PRED "ja:_ni_p_rel", ARG2 #x ] >, ; EN.RELS < [ PRED _on_p_temp_rel ] > ]. ;ni_p_rel-in_p_rel := preposition_omtr & ;[ JA.RELS < [ PRED "ja:_ni_p_rel" ] >, ; EN.RELS < [ PRED _in_p_rel ] > ]. ni_p_rel-to_p_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_ni_p_rel" ] >, EN.RELS < [ PRED _to_p_rel ] > ]. ni_p_rel-into_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_ni_p_rel" ] >, EN.RELS < [ PRED _into_p_rel ] > ]. e_p_6_rel-to_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_e_p_rel" ] >, EN.RELS < [ PRED _to_p_rel ] > ]. to_p_with_rel-with_p_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_to_p_with_rel" ] >, EN.RELS < [ PRED _with_p_rel ] > ]. ;;; should be handled by unspec_loc_rel now -- eric-n, 2008/04/25 ;de_p_rel-in_p_rel := preposition_omtr & ;[ JA.RELS < [ PRED "ja:_de_p_rel" ] >, ; EN.RELS < [ PRED _in_p_rel ] > ]. ;de_p_rel-on_p_rel := preposition_omtr & ;[ JA.RELS < [ PRED "ja:_de_p_rel" ] >, ; EN.RELS < [ PRED _on_p_rel ] > ]. ; ;de_p_rel-at_p_rel := preposition_omtr & ;[ JA.RELS < [ PRED "ja:_de_p_rel" ] >, ; EN.RELS < [ PRED _at_p_rel ] > ]. de_p_rel-by_p_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_de_p_rel" ] >, EN.RELS < [ PRED _by_p_rel ] > ]. de_p_rel-by_p_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_de_p_rel" ] >, EN.RELS < [ PRED _by_p_means_rel ] > ]. de_p_rel-with_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_de_p_rel" ] >, EN.RELS < [ PRED _with_p_rel ] > ]. made_p_rel-to_p_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_made_p_rel" ] >, EN.RELS < [ PRED _to_p_rel ] > ]. nitotte--for_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_nitotte_p_rel" ] >, EN.RELS < [ PRED _for_p_rel ] > ]. ; nikanshite--about_p_rel := preposition_mtr & ; [ JA.RELS < [ PRED "ja:_nikanshite_p_rel" ] >, ; EN.RELS < [ PRED _about_p_rel ] > ]. ; nikansuru--about_p_rel := preposition_mtr & ; [ JA.RELS < [ PRED "ja:_nikansuru_p_rel" ] >, ; EN.RELS < [ PRED _about_p_rel ] > ]. ; made_p_rel-until_p_rel := preposition_mtr & ; [ JA.RELS < [ PRED "_made_p_rel" ] >, ; EN.RELS < [ PRED _until_p_rel ] > ]. ; how do I turn this off (^^;) -- eric-n 2006/9/1 ; -- use FLAGS.EQUAL to force equality comparison ;;; FCB fixme yori_p_rel-comp_rel := preposition_omtr & [ JA.RELS < [ PRED "ja:_yori_p_rel" ] >, EN.RELS < [ PRED comp_rel ] >]. yori_p_rel-from_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_yori_p_rel" ] >, EN.RELS < [ PRED _from_p_rel ] >]. kara_p_rel-from_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_kara_p_rel" ] >, EN.RELS < [ PRED _from_p_rel ] >]. kara_p_rel-so_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_kara_p_rel", ARG0 #i & i ] >, EN.RELS < [ PRED _so_c_rel ] >, FLAGS.EQUAL < #i > ]. nitsuite_p_rel-about_p_rel := preposition_mtr & [ JA.RELS < [ PRED "ja:_nitsuite_p_rel" ] >, EN.RELS < [ PRED _about_p_rel ] > ]. nitaishite_p-toward_p := preposition_omtr & [ JA.RELS < [ PRED "ja:_nitaishite_p_rel" ] >, EN.RELS < [ PRED _toward_p_rel ] > ]. nitaishite_p-on_p := preposition_omtr & [ JA.RELS < [ PRED "ja:_nitaishite_p_rel" ] >, EN.RELS < [ PRED _on_p_rel ] > ]. ;nishite_p-for_p := preposition_mtr & ;[ JA.RELS < [ PRED "ja:_nishite_p_rel" ] >, ; EN.RELS < [ PRED _for_p_rel ] > ]. toshite_p-as_p := preposition_mtr & [ JA.RELS < [ PRED "ja:_toshite_p_rel" ] >, EN.RELS < [ PRED _as_p_rel ] > ]. ;;; ;;; discourse markers ;;; ;;; need to make def or 0 ;;; FIXME only if the verb is known, ... ; wa_p_-as+for_p__rel := monotonic_mtr & ; [ INPUT.RELS < [ PRED "ja:_wa_d_rel", LBL #h, ; ARG0 #e0, ARG1 #e1, ARG2 #e2 ] >, ; OUTPUT.RELS < [ PRED _as+for_p_rel, LBL #h, ; ARG0 #e0, ARG1 #e1, ARG2 #e2 ], ; [ PRED focus_d_rel, LBL #h, ; ARG0 e, ARG1 #e1, ARG2 #e0] >]. ;;; Coordination node_p_rel-so_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_node_p_rel" ] >, EN.RELS < [ PRED _so_c_rel ] > ]. ga_p_6_rel-but_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_ga_p_6_rel" ] >, EN.RELS < [ PRED _but_c_rel ] > ]. kedo_p_rel-but_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_kedo_p_rel" ] >, EN.RELS < [ PRED _but_c_rel ] > ]. to_p_and_rel-and_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_to_p_and_rel" ] >, EN.RELS < [ PRED _and_c_rel ] > ]. to_p_sconj_rel-and_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_to_p_sconj_rel" ] >, EN.RELS < [ PRED _and_c_rel ] > ]. ka_p_conj_rel-or_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_ka_p_conj_rel" ] >, EN.RELS < [ PRED _or_c_rel ] > ]. ka_p_sconj_rel-or_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_ka_p_sconj_rel" ] >, EN.RELS < [ PRED _or_c_rel ] > ]. comma_p_conj_rel-implicit_conj_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:_comma_p_conj_rel" ] >, EN.RELS < [ PRED implicit_conj_rel ] > ]. coord-and_c_rel := conjunction_mtr & [ JA.RELS < [ PRED "ja:coord" ] >, EN.RELS < [ PRED _and_c_rel ] > ]. noni-in+order+to := monotonic_mtr & [ INPUT.RELS < [ LBL #h3, ARG0 #e0 ], [ PRED "ja:_noni_p_rel", LBL #h1, ARG0 #e1, L-HNDL #h2, R-HNDL #h3 ] >, OUTPUT.RELS < +copy+ & [ ARG0 #e1 ], [ PRED "_in+order+to_x_rel", LBL #h1, ARG0 #e0, ARG1 #h2, ARG2 #h3 ] > ]. eba_c-if_x_then-mtr := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:_eba_c_rel", LBL #h1, ARG0 #e1, L-HNDL #hl, L-INDEX #el, R-HNDL #hr, R-INDEX #er ] >, OUTPUT [ RELS < [ PRED "_if_x_then_rel", LBL #h1, ARG0 #e1 & e_untensed, ARG1 #h2, ARG2 #h3 ] >, HCONS < qeq & [ HARG #h2, LARG #hr ], qeq & [ HARG #h3, LARG #hl ] > ] ]. nara_p-if_x_then-mtr := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:_nara_p_rel", LBL #h1, ARG0 #e1, L-HNDL #hl, L-INDEX #el, R-HNDL #hr, R-INDEX #er ] >, OUTPUT [ RELS < [ PRED "_if_x_then_rel", LBL #h1, ARG0 #e1 & e_untensed, ARG1 #h2, ARG2 #h3 ] >, HCONS < qeq & [ HARG #h2, LARG #hr ], qeq & [ HARG #h3, LARG #hl ] > ] ]. tara_c-if_x_then-mtr := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:_tara_c_rel", LBL #h1, ARG0 #e1, L-HNDL #hl, L-INDEX #el, R-HNDL #hr, R-INDEX #er ] >, OUTPUT [ RELS < [ PRED "_if_x_then_rel", LBL #h1, ARG0 #e1 & e_untensed, ARG1 #h2, ARG2 #h3 ] >, HCONS < qeq & [ HARG #h2, LARG #hr ], qeq & [ HARG #h3, LARG #hl ] > ] ]. link_main_to_index_mtr := mrs_transfer_rule & [ CONTEXT [ RELS < [ LBL #h1 & h, ARG0 #e1 & e, ARG1 #h2 & h, ARG2 #h3 & h ], [ LBL #h4 & h, ARG0 #e2 & e ] >, HCONS < qeq & [ HARG #h2 & h, LARG #h4 & h ] > ], INPUT [ LTOP #h0 & h, INDEX #e1 & e ], FILTER [ LTOP #h0, INDEX #e2 ], OUTPUT [ LTOP #h0, INDEX #e2 ], FLAGS.EQUAL < #h0, #h1, #e1, #h2, #e2, #h3, #h4 > ]. ;;; ;;; Topic markers ;;; mo-arg1-too-mtr := monotonic_mtr & [ CONTEXT.RELS < [LBL #hv, ARG0 e, ARG1 #x ] >, INPUT.RELS < [ PRED "ja:_mo_d_rel", ARG2 #x ] >, OUTPUT [RELS < [ PRED "_too_a_also_rel", ARG0 e_untensed, ARG1 #h1 ] >, HCONS < qeq & [ HARG #h1, LARG #hv ] > ]]. ;;; ;;; N1-は N2-が ADJ -> N1's N2 Adj ;;; ;;; FIXME: What about other topic markers? ha-ga--poss := monotonic_mtr & [ CONTEXT [ RELS < [PRED "~_a_", ARG0 #adj, ARG1 #n2 ], [PRED "~_n_", ARG0 #n2, LBL #ln2 ]> ], INPUT.RELS < [ LBL #h1, PRED "ja:_wa_d_rel", ARG0 #e , ARG1 #adj, ARG2 #n1 ] >, OUTPUT.RELS < [ LBL #ln2, PRED poss_rel, ARG0 #e, ARG1 #n2, ARG2 #n1 ] >]. ;;; FIXME DAN: can I make the other two rules feed each other ... ha-mo--poss := monotonic_mtr & [ CONTEXT [ RELS < [LBL #hadj, PRED "~_a_", ARG0 #adj, ARG1 #n2 ], [PRED "~_n_", ARG0 #n2, LBL #ln2 ]> ], INPUT.RELS < [ LBL #h1, PRED "ja:_mo_d_rel", ARG0 #e , ARG1 #adj, ARG2 #n1 ] >, OUTPUT [RELS < [ LBL #ln2, PRED poss_rel, ARG0 #e, ARG1 #n2, ARG2 #n1 ], [ PRED "_too_a_also_rel", ARG0 e_untensed, ARG1 #h1 ] >, HCONS < qeq & [ HARG #h1, LARG #hadj ] > ]].