forked from delph-in/zhong
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlabels.tdl
365 lines (302 loc) · 10.1 KB
/
labels.tdl
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
;;; -*- Mode: TDL; Package: LKB -*-
;;;
;;; $Id: labels.tdl,v 1.8 2008-05-23 01:44:21 sfd Exp $
;;; These label definitions are used by the LKB to put
;;; labels on the nodes of the trees it displays. They
;;; are solely for the convenience of the grammar developer
;;; and do not carry theoretical significance. Accordingly,
;;; though they are provided as part of the Matrix distribution,
;;; users should customize them without hesitation.
;;; NB: This is one tdl file in which order matters.
;;; The LKB will choose the first label it encounters (in the
;;; order below) which is consistent with the node it is
;;; labeling. If two labels are consistent with each other,
;;; the more specific one must appear first in this list, or
;;; it will never get used.
;; SSH 2014-09-26: Following the Penn Tagset 。?!are tagged as '.'.
; comma-label := label &
; [ SYNSEM.LOCAL [ CAT [ HEAD comma,
; VAL.SPR < > ],
; COORD-STRAT "" ],
; LABEL-NAME "," ].
punct-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD punct,
VAL.SPR < > ],
COORD-STRAT "" ],
LABEL-NAME "PU" ].
advp-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD adp & [ MOD < [] >],
VAL.SPR < > ],
COORD-STRAT "" ],
LABEL-NAME "ADVP" ].
np-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < > ],
COORD-STRAT "" ],
LABEL-NAME "NP" ].
np-top-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD noun,
VAL.SPR < > ],
LABEL-NAME "NP-T" ].
n-mid-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < [ ] > ],
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "NP-M" ].
n-bottom-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < [ ] > ],
COORD + ],
LABEL-NAME "NP-B" ].
;; SSH 2014-10-10 Nominalizer 的 'de'
;; According to Rose, this item cannot be labeled as 'N'.
nm-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD nm,
VAL.SPR < [ ], anti-synsem > ],
COORD-STRAT "" ],
LABEL-NAME "NM" ].
n-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < [ ], ... > ],
COORD-STRAT "" ],
LABEL-NAME "N" ].
n-top-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD noun,
VAL.SPR < [ ] > ],
LABEL-NAME "NP-T" ].
np-mid-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < > ],
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "NP-M" ].
np-bottom-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD noun,
VAL.SPR < > ],
COORD + ],
LABEL-NAME "NP-B" ].
v-mid-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL.COMPS < [ ], ... > ],
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "V-M" ].
v-bottom-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL.COMPS < [ ], ... > ],
COORD + ],
LABEL-NAME "V-B" ].
v-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL.COMPS < [ ], ... > ],
COORD-STRAT "" ],
LABEL-NAME "V" ].
v-top-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD verb,
VAL.COMPS < [ ], ... > ],
LABEL-NAME "V-T" ].
vp-mid-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < [ ] > ]],
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "VP-M" ].
vp-bottom-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < [ ] > ]],
COORD + ],
LABEL-NAME "VP-B" ].
vp-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < [ ] > ]],
COORD-STRAT "" ],
LABEL-NAME "VP" ].
vp-top-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < [ ] > ]],
LABEL-NAME "VP-T" ].
s-mid-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < > ] ],
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "S-M"].
s-bottom-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < > ] ],
COORD + ],
LABEL-NAME "S-B"].
adj-label := label &
[ SYNSEM.LOCAL[ CAT.HEAD adj & [ MOD < [] > ],
COORD-STRAT "" ],
LABEL-NAME "ADJ" ].
s-label := label &
[ SYNSEM.LOCAL [ CAT [ HEAD +vjp,
POSTHEAD +,
VAL [ COMPS < >,
SUBJ < > ] ],
COORD-STRAT "" ],
LABEL-NAME "S"].
s-top-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD verb,
VAL [ COMPS < >,
SUBJ < > ] ],
LABEL-NAME "S-T"].
p-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD adp,
VAL.COMPS < [ ], ... > ],
LABEL-NAME "P" ].
pp-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD adp,
VAL.COMPS < > ],
LABEL-NAME "PP" ].
c-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD comp,
VAL.COMPS < [ ], ... > ],
LABEL-NAME "C" ].
cp-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD comp,
VAL.COMPS < > ],
LABEL-NAME "CP"].
det-label := label &
[ SYNSEM.LOCAL.CAT.HEAD det,
LABEL-NAME "D"].
; SSH 2014-10-16: aspectual markers (了, 着, 过)
le-pfv-label := label &
[ STEM <"了">,
SYNSEM [ LIGHT +,
R-PERIPH na-or--,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "AS" ].
咗-pfv-label := label &
[ STEM <"咗">,
SYNSEM [ LIGHT +,
R-PERIPH na-or--,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "AS" ].
嚟-pfv-label := label &
[ STEM <"嚟">,
SYNSEM [ LIGHT +,
R-PERIPH na-or--,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "AS" ].
zhe-label := label &
[ STEM <"着">,
SYNSEM [ LIGHT +,
R-PERIPH na-or--,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "AS" ].
guo-label := label &
[ STEM <"过">,
SYNSEM [ LIGHT +,
R-PERIPH na-or--,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "AS" ].
; SSH 2014-10-16: Sentence-final particles (了)
le-crs-label := label &
[ STEM <"了">,
SYNSEM [ LIGHT +,
R-PERIPH +,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "SP" ].
嚟-crs-label := label &
[ STEM <"嚟">,
SYNSEM [ LIGHT +,
R-PERIPH +,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "SP" ].
嘅-crs-label := label &
[ STEM <"嘅">,
SYNSEM [ LIGHT +,
R-PERIPH +,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "SP" ].
呀-crs-label := label &
[ STEM <"呀">,
SYNSEM [ LIGHT +,
R-PERIPH +,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "SP" ].
qpart-label := label &
[ STEM <"吗">,
SYNSEM [ LIGHT +,
R-PERIPH +,
LOCAL [ CAT.HEAD marker,
COORD-STRAT "" ] ],
LABEL-NAME "SP" ].
adv-mid-label := label &
[ SYNSEM.LOCAL [ CAT.HEAD adv,
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "ADV-M" ].
adv-bottom-label := label &
[ SYNSEM.LOCAL [ CAT.HEAD adv,
COORD + ],
LABEL-NAME "ADV-B" ].
adv-label := label &
[ SYNSEM.LOCAL [ CAT.HEAD adv,
COORD-STRAT "" ],
LABEL-NAME "ADV" ].
adv-top-label := label &
[ SYNSEM.LOCAL.CAT.HEAD adv,
LABEL-NAME "ADV-T" ].
adj-mid-label := label &
[ SYNSEM.LOCAL [ CAT.HEAD adj,
COORD +,
COORD-REL implicit-coord-rel ],
LABEL-NAME "ADJ-M" ].
adj-bottom-label := label &
[ SYNSEM.LOCAL [ CAT.HEAD adj,
COORD + ],
LABEL-NAME "ADJ-B" ].
adj-top-label := label &
[ SYNSEM.LOCAL.CAT.HEAD adj,
LABEL-NAME "ADJ-T" ].
conj-label := label &
[ SYNSEM.LOCAL.CAT.HEAD conj,
LABEL-NAME "CONJ" ].
num-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD num,
VAL.COMPS < > ],
LABEL-NAME "NUM" ].
nump-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD num,
VAL [ COMPS < >,
SPR < > ]],
LABEL-NAME "NUMP" ].
classifier-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD classifier,
VAL [ COMPS < >,
SUBJ < > ]],
LABEL-NAME "CL" ].
loc-mark-label := label &
[ SYNSEM.LOCAL.CAT [ HEAD loc-mark],
LABEL-NAME "LM" ].
slash := meta &
[ SYNSEM.NON-LOCAL.SLASH 1-dlist &
[ LIST < local > ],
META-PREFIX "/",
META-SUFFIX "" ].
;; SSH 2014-10-31 for robust parsing
bridge-unary := label &
[ SYNSEM.LOCAL.CAT.HEAD bridge-head & [ BRIDGED - ],
LABEL-NAME "BX" ].
bridge-binary := label &
[ SYNSEM.LOCAL.CAT.HEAD bridge-head & [ BRIDGED + ],
LABEL-NAME "BP" ].