-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparaphraser.mtr
122 lines (99 loc) · 4.48 KB
/
paraphraser.mtr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
;;; Hey, emacs(1), this is -*- Mode: tdl; Coding: utf-8; -*- got it?
;;; Verb particles (transitive and intransitive)
look+up := verb_mtr &
[ INPUT.RELS <! [ PRED "_look_v_up_rel" ] !>,
OUTPUT.RELS <! [ PRED "_find_v_1_rel" ] !> ].
carry+on := verb_mtr &
[ INPUT.RELS <! [ PRED "_carry_v_on_rel" ] !>,
OUTPUT.RELS <! [ PRED "_continue_v_2_rel" ] !> ].
keep+on := verb_prtcl_cp_mtr &
[ INPUT [ RELS <! [ PRED "_keep_v_on_rel" ], relation !> ],
OUTPUT.RELS <! [ PRED "_continue_v_2_rel" ],
+copy+ & [ ARG0 event & [ E.ASPECT [ PROGR -, PRF - ],
SF prop-or-ques ] ] !> ].
get+around+to := verb_prtcl_pp_ger_mtr &
[ INPUT [ RELS <! [ PRED "_get_v_around-to_rel" ],
relation, relation, [ PRED #pred ] !> ],
OUTPUT.RELS <! [ PRED #pred ],
[ PRED "_eventual_a_1_rel" ] !> ].
pass+on+to := verb_mtr &
[ INPUT [ RELS <! [ PRED "_pass_v_on_rel" ] !> ],
OUTPUT.RELS <! [ PRED "_give_v_1_rel" ] !> ].
; 'Kim gave me back the cat.'
give+back := verb_np_prtcl_np_mtr &
[ INPUT [ RELS <! [ PRED "_give_v_back_rel" ] !> ],
OUTPUT.RELS <! [ PRED "_return_v_to_rel" ] !> ].
catch+on := verb_mtr &
[ INPUT.RELS <! [ PRED "_catch_v_on_rel" ] !>,
OUTPUT.RELS <! [ PRED "_realize_v_1_rel" ] !> ].
;;; Idioms
;;;
;;; _fix_me_
;;; really, given what we know about the grammar, matching on the HCONS for the
;;; `idiom_q' quantifier is, let's say, superfluous (to put it mildly), but to
;;; have at least one example showing off some of the transfer capabilities.
;;;
take+advantage := monotonic_mtr &
[ INPUT [ RELS <! [ PRED "_take_v_i_rel", LBL #h1,
ARG0 #e2, ARG1 #x3, ARG2 #x4, ARG3 #x5 ],
[ PRED idiom_q_i_rel, ARG0 #x4, RSTR #h6 ],
[ PRED "_advantage_n_i_rel", LBL #h7, ARG0 #x4 ] !>,
HCONS <! qeq & [ HARG #h6, LARG #h7 ] !> ],
OUTPUT.RELS <! [ PRED "_benefit_v_from_rel", LBL #h1,
ARG0 #e2, ARG1 #x3, ARG2 #x5 ] !> ].
keep+tabs := monotonic_mtr &
[ INPUT [ RELS <! [ PRED "_keep_v_i_rel", LBL #h1,
ARG0 #e2, ARG1 #x3, ARG2 #x4, ARG3 #x5 ],
[ PRED udef_q_rel, ARG0 #x4, RSTR #h6 ],
[ PRED "_tabs_n_i_rel", LBL #h7, ARG0 #x4 ] !>,
HCONS <! qeq & [ HARG #h6, LARG #h7 ] !> ],
OUTPUT.RELS <! [ PRED "_watch_v_1_rel", LBL #h1,
ARG0 #e2, ARG1 #x3, ARG2 #x5 ] !> ].
;;; Determinerless PPs
on+edge := detlesspp_mtr &
[ INPUT.RELS <! [ PRED _on_p_rel ],
[ PRED "_edge_n_of_rel" ],
relation !>,
OUTPUT.RELS <! [ PRED "_nervous_a_about_rel" ] !> ].
at+long+last := detlesspp+adj_mtr &
[ INPUT.RELS <! [ PRED _at_p_rel ],
[ PRED "_long_a_1_rel" ],
[ PRED "_last_n_1_rel" ],
relation !>,
OUTPUT [ RELS <! [ PRED "_final_a_1_rel" ] !>,
HCONS <! !> ] ].
at+last := detlesspp_mtr &
[ INPUT.RELS <! [ PRED _at_p_rel ],
[ PRED "_last_n_1_rel" ],
relation !>,
OUTPUT.RELS <! [ PRED "_final_a_1_rel" ] !> ].
at+close+range := detlesspp+adj_mtr &
[ INPUT.RELS <! [ PRED _at_p_rel ],
[ PRED "_close_a_to_rel" ],
[ PRED "_range_n_of_rel" ],
relation !>,
OUTPUT.RELS <! [ PRED _from_p_rel, ARG2 #arg0 ],
[ PRED _a_q_rel, ARG0 #arg0, RSTR #lbl ],
[ LBL #lbl, PRED "_distance_n_1_rel", ARG0 #arg0 ],
[ LBL #lbl, PRED "_small_a_1_rel",
ARG0 event & [ E.ASPECT [ PROGR -, PRF - ] ],
ARG1 #arg0 ] !>].
;;; Light verbs
give+adj+demo_mtr := light_verb_mtr &
[ INPUT.RELS <! [ PRED "_give_v_1_rel" ],
[ LBL #lbln, PRED "_demo_n_of_rel", ARG0 #inst, ARG1 #arg1 ],
[ PRED _a_q_rel ],
[ LBL #lbln, PRED #pred, ARG0 event, ARG1 #inst ] !>,
OUTPUT.RELS <! [ LBL #lbl, PRED "_demo_v_to_rel", ARG0 #arg0, ARG2 #arg1 ],
[ LBL #lbl, PRED #pred, ARG1 #arg0 ] !> ].
give+demo_mtr := light_verb_mtr &
[ INPUT.RELS <! [ PRED "_give_v_1_rel", ARG3 #arg3 ],
[ PRED "_demo_n_of_rel", ARG1 #arg1 ],
[ PRED _a_q_rel ] !>,
OUTPUT.RELS <! [ PRED "_demo_v_to_rel", ARG2 #arg1, ARG3 #arg3 ] !> ].
give+talk_mtr := light_verb_mtr &
[ INPUT.RELS <! [ PRED "_give_v_1_rel" ],
[ PRED "_talk_n_of-on_rel", ARG1 #arg1 ],
[ PRED _a_q_rel ] !>,
OUTPUT.RELS <! [ LBL #lbl, PRED "_talk_v_about_rel", ARG0 #arg0 ],
[ LBL #lbl, PRED _about_p_rel, ARG1 #arg0, ARG2 #arg1 ] !> ].