;;; Hey, emacs(1), this is -*- Mode: TDL; Coding: utf-8; -*- got it? ;;; ;;; Rule types used by jaen but not sharable for all other language pairs ;;; ;; ;; reversible rules ;; - should they be a seperate type witth CONTEXT set to null? monotonic_mtr := mrs_transfer_rule & [ CONTEXT [ LTOP #h, INDEX #i ], INPUT #j & [ LTOP #h, INDEX #i ], OUTPUT #e &[ LTOP #h, INDEX #i ], JA #j, EN #e]. n_conj_mtr := monotonic_mtr & [ INPUT [ RELS < [ LBL #h1, ARG0 #i1, L-INDEX #i3, R-INDEX #i5 ] >], OUTPUT.RELS < [ LBL #h1, ARG0 #i1, L-INDEX #i3, R-INDEX #i5 ] > ]. n_conj_omtr := n_conj_mtr & optional_mtr. conj_subord_mtr := monotonic_mtr & [ INPUT.RELS < [ LBL #h1, ARG0 #e1, L-HNDL #hl, R-HNDL #hr, R-INDEX #er], [ PRED message_m_rel & #m, LBL #hm, MARG #ma, ARG0 #e1, TPC #u1, PSV #u2] >, OUTPUT.RELS < [ LBL #h1, MAIN #hr, SUBORD #hl], [ PRED #m, LBL #hm, MARG #ma, ARG0 #er, TPC #u1, PSV #u2 ] >]. ;; Take an arg1 predicate with an argument and make an arg0 predicate. ;; eg 雨が降る -> it rains arg1+np_arg0_v_mtr := monotonic_mtr & [ INPUT [ RELS < [ ARG0 #ame, LBL #h4 ], [ ARG0 #ame, RSTR #h7 ], [ ARG0 #furu, ARG1 #ame, LBL #h ] >, HCONS < qeq & [ HARG #h7, LARG #h4 ] > ], OUTPUT.RELS < [ ARG0 #furu, LBL #h ] >, FLAGS.EQUAL < #ame > ]. arg1+np_arg0_v_omtr := arg1+np_arg0_v_mtr & optional_mtr. adj+n_adj+n_mtr := monotonic_mtr & [ INPUT.RELS < [ LBL #h1, ARG0 #e2, ARG1 #x3 ], [ LBL #h4, ARG0 #x3 ] >, OUTPUT.RELS < [ LBL #h1, ARG0 #e2, ARG1 #x3 ], [ LBL #h4, ARG0 #x3 ] >]. adj+n_adj+n_omtr := adj+n_adj+n_mtr & optional_mtr. n_adj+n_mtr := monotonic_mtr & [ INPUT.RELS < [ LBL #h1, ARG0 #x2 ] >, OUTPUT.RELS < [ LBL #h1, ARG0 e_untensed, ARG1 #x2 ], [ LBL #h1, ARG0 #x2 ] > ]. n_adj+n_omtr := n_adj+n_mtr & optional_mtr. ; Experimental rule types for Ja-En MT system -- eric-n 2006/8/30 n_adj_mtr := monotonic_mtr & [ INPUT.RELS < [ LBL #h, ARG0 #x ] >, OUTPUT.RELS < [ LBL #h, ARG0 e & [ TENSE UNTENSED, MOOD INDICATIVE ], ARG1 #x ] > ]. n_adj_omtr := n_adj_mtr & optional_mtr. n_adj+time_n_rel-mtr := monotonic_mtr & [ INPUT.RELS < [ LBL #h, ARG0 #x ] >, OUTPUT.RELS < [ LBL #h, ARG0 e & [ TENSE UNTENSED, MOOD INDICATIVE ], ARG1 #x ], [ PRED time_n_rel, LBL #h, ARG0 #x ] > ]. vn_mtr := monotonic_mtr & [ CONTEXT.RELS < [ PRED udef_rel, ARG0 #x0, RSTR #h2 ] >, INPUT [ RELS < [ LBL #h0, ARG0 #x0 ], [ PRED proposition_m_rel, LBL #h4, ARG0 #x0, MARG #h5 ], [ PRED "noun-relation", LBL #h6, ARG0 #x0, ARG1 #h4 ] >, HCONS < qeq & [ HARG #h5, LARG #h0 ], qeq & [ HARG #h2, LARG #h6 ] > ], OUTPUT [ RELS < [ LBL #h0, ARG0 #x0 ] >, HCONS < qeq & [ HARG #h2, LARG #h0 ] > ] ]. vn_omtr := vn_mtr & optional_mtr. pn_mtr := noun_mtr & [ INPUT.RELS < [ PRED "ja:named_rel" ]>, OUTPUT.RELS < [ PRED named_rel ] > ]. pn_omtr := proper_noun_mtr & optional_mtr. ; adj_n_mtr := monotonic_mtr & ; [ INPUT [ RELS < [ LBL #h4, ARG0 #e2 ] ; [ PREP "ja:proposition_m_rel", LBL #h1, ARG0 #e2, MARG #h3 ] >, ; HCONS < qeq & [ HARG #h3, LARG #h4 ] > ], ; OUTPUT [ RELS < [ LBL #h4, ARG0 x & #x5 ], ; [ PRED udef_q_rel, LBL h & #h6, ; ARG0 #x5, RSTR h & #h7, BODY h ] >, ; HCONS < qeq & [ HARG #h7, LARG #h4 ] > ] ]. adj_n_mtr := monotonic_mtr. adj_n_omtr := adj_n_mtr & optional_mtr. ;;; 1 50 残念 : 2 0 bad luck -- adj_adj+n_mtr adj_adj+n_mtr := monotonic_mtr. adj_adj+n_omtr := adj_adj+n_mtr & optional_mtr. adj_n+n_mtr := monotonic_mtr. adj_n+n_omtr := adj_adj+n_mtr & optional_mtr. n+n_adj+n_mtr := monotonic_mtr & [ INPUT [ RELS < [ LBL #h1, ARG0 #x2 ], [ LBL #h3, ARG0 #x4 ], [ PRED compound_rel, LBL #h3, ARG1 #x4, ARG2 #x2 ], [ PRED "ja:udef_rel", ARG0 #x2, RSTR #h5 ] >, HCONS < qeq & [ HARG #h5, LARG #h1 ] > ], OUTPUT [ RELS < [ LBL #h3, ARG0 e_untensed, ARG1 #x4 ], [ LBL #h3, ARG0 #x4 ] > ] ]. n+n_adj+n_omtr := n+n_adj+n_mtr & optional_mtr. ; experimental rules for verb<->adjective. alias to arg1_v for now -- eric-n adj_v_mtr := arg1_v_mtr. adj_v_omtr := arg1_v_omtr. v_adj_mtr := arg1_v_mtr. v_adj_omtr := arg1_v_omtr. ;; 日本 の -> Japanese pp-adj_mtr := monotonic_mtr & [ INPUT [RELS < [ LBL #h1, ARG0 #x1 ], [ LBL #h0, ARG0 #e0, ARG1 #ext, ARG2 #x1 ], [ ARG0 #x1, RSTR #hr ] >, HCONS < qeq & [ HARG #hr, LARG #h1 ] > ], OUTPUT.RELS < [ LBL #h0, ARG0 #e0, ARG1 #ext ] >]. pp-adj_omtr := pp-adj_mtr & optional_mtr. pp-adjest_mtr := monotonic_mtr & [ INPUT [RELS < [ LBL #h1, ARG0 #x1 ], [ LBL #h0, ARG0 #e0, ARG1 #ext, ARG2 #x1 ], [ ARG0 #x1, RSTR #hr ]>, HCONS < qeq & [ HARG #hr, LARG #h1 ] > ], OUTPUT.RELS < [ LBL #h0, ARG0 #e0, ARG1 #ext ], [ LBL #h0, ARG0 e, ARG1 #e0, PRED superl_rel]>]. pp-adjest_omtr := pp-adj_mtr & optional_mtr. ;;; ;;; Not really universal is it? ;;; n+n_n_mtr := monotonic_mtr & [ INPUT [ RELS < [ LBL #h1, ARG0 #x2 ], [ LBL #h3, ARG0 #x4 ], [ PRED compound_rel, LBL #h3, ARG1 #x4, ARG2 #x2 ], [ PRED "ja:udef_rel", ARG0 #x2, RSTR #h5 ] >, HCONS < qeq & [ HARG #h5, LARG #h1 ] > ], OUTPUT.RELS < [ LBL #h3, ARG0 #x4 ] > ]. n+n_n_omtr := n+n_n_mtr & optional_mtr. n+pn_n_mtr := monotonic_mtr & [ INPUT [ RELS < [ LBL #h1, ARG0 #x2 ], [ LBL #h3, ARG0 #x4 ], [ PRED compound_rel, LBL #h3, ARG1 #x4, ARG2 #x2 ], [ PRED "ja:def_rel", ARG0 #x2, RSTR #h5 ] >, HCONS < qeq & [ HARG #h5, LARG #h1 ] > ], OUTPUT.RELS < [ LBL #h3, ARG0 #x4 ] > ]. n+pn_n_omtr := n+pn_n_mtr & optional_mtr. ;;; REDEFINE THIS s/"unspec_rel"/unspec_rel n+n_n+n_mtr := monotonic_mtr & [ CONTEXT.RELS < [ PRED compound_rel, LBL #h3, ARG1 #x4, ARG2 #x2 ] >, INPUT.RELS < [ LBL #h1, ARG0 #x2 ], [ LBL #h3, ARG0 #x4 ] >, OUTPUT.RELS < [ LBL #h1, ARG0 #x2 ], [ LBL #h3, ARG0 #x4 ] > ]. mofy-mtr := monotonic_mtr & [ INPUT.RELS < [ PRED "ja:card_rel", LBL #h5 ], [ PRED "ja:mofy_rel", LBL #hm, ARG0 #xm, ARG1 #h5 ], [ PRED "ja:udef_rel", LBL #h9, ARG0 #xm, RSTR #r, BODY #b ] >, OUTPUT.RELS < [ PRED mofy_rel, LBL #hm, ARG0 #xm ], [ PRED proper_q_rel, LBL #h9, ARG0 #xm, RSTR #r, BODY #b ] > ]. dofw-mtr := noun_mtr & [ INPUT.RELS < [ PRED "ja:dofw_rel", CARG string ] >, OUTPUT.RELS <[ PRED dofw_rel, CARG string ] > ]. ;;; Topicalise questions topicalize-mtr := monotonic_mtr & [ CONTEXT.RELS <[ ARG0 #e_top, ARG2 #x1 ], [ ARG0 #x1], [ PRED which_q_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 , TPC #u1 & u, PSV #u3] >, OUTPUT.RELS <[ PRED prpstn_m_rel, LBL #hm, MARG #hv, ARG0 #e2, TPC #e_top, PSV #u3], [ PRED int_m_rel, LBL #h1, MARG #h2, ARG0 #e2, TPC #e_top, PSV #u3] >, FLAGS [ SUBSUME < #e2 > ]].