-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgeneration.mtr
142 lines (132 loc) · 3.88 KB
/
generation.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
;;; Hey, emacs(1), this is -*- Mode: TDL; Coding: utf-8; -*- got it?
;; Enable the following block to generate passives from MRSs that do not
;; provide parg_d_rel
#|
;; DPF 27-feb-10 - As a first experiment in using fixup rules before
;; generating, we add the information structure EP for passives, in case
;; it is missing from the input MRS for a verb missing its ARG1, as can
;; happen with paraphrasing.
;; FIX
;; These rules for passives are currently duplicated, since I don't
;; yet see how to require the presence of a particular argument
;; without also declaring its exact type, which here can be either of
;; type `individual' if coming from a paraphrased DMRS, or a `ref-ind'
;; if coming from an ERG-parsed sentence.
;; To prevent passives where ARG1 is present, temporarily add parg_d_rel
;; with its ARG2 value of type `semarg', then later delete.
;;
no_passive_arg1i_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG1 #i2 & individual ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #x4 & semarg ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ] !>,
FLAGS.EQUAL < #lbl, #i2, #i3, #x4 > ].
no_passive_arg1x_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG1 #i2 & ref-ind ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #x4 & semarg ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ] !>,
FLAGS.EQUAL < #lbl, #i2, #i3, #x4 > ].
;; Passive of ditransitive's ARG3 role, underspecified as `individual'
;;
passive_arg3i_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG3 #i2 & individual ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #i2 ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ]!>,
FLAGS.EQUAL < #lbl, #i2, #i3 > ].
;; Passive of transitive verbs's ARG2 role, underspecified as `individual'
;;
passive_arg2i_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG2 #i2 & individual ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #i2 ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ] !>,
FLAGS.EQUAL < #lbl, #i2, #i3 > ].
;; Passive of ditransitive's ARG3 role, with type `ref-ind'
;;
passive_arg3x_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG1 #p1 & non_event,
ARG3 #i2 & ref-ind ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #i2 ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ]!>,
FLAGS.EQUAL < #lbl, #i2, #i3, #p1 > ].
;; Passive of transitive's ARG2 role, with type `ref-ind'
;;
passive_arg2x_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED "~_v_",
LBL #lbl,
ARG0 #e1,
ARG1 #p1 & non_event,
ARG2 #i2 & ref-ind ] !>,
OUTPUT.RELS <! +copy+,
[ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 & [ E.TENSE untensed, E.MOOD indicative ],
ARG1 #e1,
ARG2 #i2 ] !>,
FILTER.RELS <! [ PRED parg_d_rel,
LBL #lbl,
ARG0 #i3 ]!>,
FLAGS.EQUAL < #lbl, #i2, #i3, #p1 > ].
;; Now delete the blocked passives for verbs with ARG1s present
;;
delete_no_passive_gpr := monotonic_mtr &
[ INPUT.RELS <! [ PRED parg_d_rel,
ARG2 #i2 & semarg ] !>,
OUTPUT.RELS <! !>,
FLAGS.EQUAL < #i2 > ].
|#
#|
delete_spurious_qeq_gpr := monotonic_mtr &
[ FILTER.RELS <! [ LBL #h1 ] !>,
INPUT.HCONS <! qeq & [ LARG #h1 ] !>,
OUTPUT.HCONS <! !>,
FLAGS.EQUAL < #h1 > ].
|#