-
Notifications
You must be signed in to change notification settings - Fork 3
/
inflr-for-pet.tdl
304 lines (242 loc) · 8.65 KB
/
inflr-for-pet.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
;;; -*- Mode: tdl; Coding: utf-8; -*-
%(letter-set (!c bdfgklmnprstz))
%(letter-set (!s abcdefghijklmnopqrtuvwxyz05_/.))
%(letter-set (!t bcdfghjklmnpqrstvwxyz))
%(letter-set (!v aeiou))
%(letter-set (!. abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789[]\(\){}|>/_-…%`”"'’?!#+¦⌊⌋$£=σΩÅص™°º℃))
%(letter-set (!p abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789,.?\![]\(\){}|>/_-%”"'’#+¦⌊⌋$£=σΩÅØ®…™°º℃β*))
%(letter-set (!q abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789,.?\!\(\)[]{}|>:/_-%`”"'’#+¦⌊⌋$£=σΩ…µ™°º℃β))
;; Same as q but without italic marker, to avoid right-ital rules applying
;; without having done left-ital when needed; also exclude parens
%(letter-set (!r abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßĥŭœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789,.?\![]{}|>:/_-%`”"'’#+$£=σΩ…µ™°ºβ))
%(letter-set (!f abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßĥŭœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789[]“"‘'`#+¦⌊⌋$£=[]{}|</_\-.,Åؽ…µ™°ºβ))
;; For semicolons, which can follow periods but not commas, as in |St.;|
%(letter-set (!k abcdefghijklmnopqrstuvwxyzåøöáéíóúìµñßœæëïüÿäěʤàāēīōūABCDEFGHIJKLMNOPQRSTUVWXYZÅØÖÉÌ0Ä123456789.\![]\(\){}|>/_%”"'’#+¦⌊⌋$£=σΩÅØ®…™°ºβ*))
%(letter-set (!b \!))
;;; irregular words are stored in a separate file - irregs.tab
;;; because the forms stored there are the values of affix
;;; all the rules here should have the name `affix-type'_infl_rule
n_pl_olr :=
%suffix (!s !ss) (!ss !ssses) (es eses) (ss sses) (!ty !ties) (ch ches) (sh shes) (x xes) (z zes)
n_pl_inflrule &
[ ND-AFF +,
SYNSEM mass_or_count_synsem &
[ LOCAL plur_noun & [ AGR.PNG png-reg ] ],
RNAME lnpl ].
n_pl-paren_olr :=
%suffix (!s !s\(s\))
n_pl_inflrule &
[ ND-AFF +,
SYNSEM mass_or_count_synsem &
[ LOCAL plur_noun & [ AGR.PNG png-reg ] ],
RNAME lnpl ].
n_pl-irreg_olr :=
%suffix (xxirreg xxirreg)
n_pl_inflrule &
[ ND-AFF +,
SYNSEM mass_or_count_synsem &
[ LOCAL plur_noun & [ AGR.PNG png-irreg ] ],
RNAME lnpli ].
;; DPF 2020-07-12 - NORM quantity_or_norm_rel sadly prevents these from being
;; vocatives, as in "People, let's move!". And more generally, we want to accept
;; "people mover", so we finally added a construction-specific feature --CPDNHD
;; to enable lexical blocking for compounds.
;;
n_pl-irreg-noaff_olr :=
%suffix (xxirreg xxirreg)
n_pl_inflrule &
[ ND-AFF +,
SYNSEM mass_or_count_synsem &
[ LOCAL plur_noun & [ AGR.PNG png-irreg,
CAT.HEAD.--BARE - ] ],
RNAME lnpln ].
v_3s-fin_olr :=
%suffix (!s !ss) (!ss !ssses) (ss sses) (!ty !ties) (ch ches) (sh shes) (x xes) (z zes)
v_3s-fin_inflrule &
[ ND-AFF +,
SYNSEM.LOCAL third_sg_fin_verb,
RNAME lvsg ].
v_psp_olr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
v_psp_inflrule &
[ ND-AFF +,
SYNSEM.LOCAL psp_verb,
RNAME lvpp ].
v_pst_olr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
v_pst_inflrule &
[ ND-AFF +,
SYNSEM.LOCAL past_or_subj_verb,
RNAME lvpt ].
v_prp_olr :=
%suffix (* ing) (!t!v!c !t!v!c!cing) (e ing) (ee eeing) (ie ying)
v_prp_inflrule &
[ ND-AFF +,
SYNSEM.LOCAL prp_verb,
RNAME lvpr ].
v_prp-nf_olr :=
%suffix (* in) (!t!v!c !t!v!c!cin) (e in) (ee eein) (ie yin)
v_prp-nf_inflrule &
[ ND-AFF +,
SYNSEM.LOCAL prp_verb,
RNAME lvprn,
GENRE nonformal ].
#|
bse_verb_irule := lex_rule_infl_affixed &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM.LOCAL bse_verb,
RNAME lvbs ].
non_third_sg_fin_verb_irule := lex_rule_infl_affixed &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM.LOCAL non_third_sg_fin_verb,
RNAME lvns ].
|#
v_n3s-bse_ilr := v_n3s-bse_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM.LOCAL bse_or_non3sg_verb,
RNAME lvns ].
n_sg_ilr := n_sg_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM count_noun_synsem & [ LOCAL sing_noun & [ AGR.PNG norm-png ] ],
RNAME lnsg ].
n_ms_ilr := n_ms_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM basic_basic_mass_noun_synsem & [ LOCAL mass_noun ],
RNAME lnms ].
n_ms-cnt_ilr := n_ms-cnt_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR [ ORTH #stem ],
SYNSEM basic_mass_or_count_synsem & [ LOCAL mass_count_noun ],
RNAME lnmc ].
n_pl-cur_ilr := n_pl-cur_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR n_-_c-cur_le & [ ORTH #stem ],
SYNSEM.LOCAL plur_noun,
RNAME lnpn ].
n_sg-cur_ilr := n_sg-cur_inflrule &
[ ND-AFF -,
ORTH #stem,
DTR n_-_c-cur_le & [ ORTH #stem ],
SYNSEM.LOCAL sing_noun & [ AGR.PNG png-unsp ],
RNAME lnsn ].
#|
v_pas_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
v_pas-norm_lexrule &
[ ND-AFF +,
DTR.SYNSEM trans_subst &
[ LOCAL [ CAT.VAL.COMPS [ FIRST [ LOCAL.CONT #objcont,
--SIND #objind,
NONLOC [ SLASH.LIST #slash,
REL.LIST #rel,
QUE.LIST #que ] ],
REST #comps ] ],
LKEYS.KEYREL #keyrel ],
SYNSEM [ LOCAL [ CAT [ VAL [ SUBJ < [ LOCAL.CONT #objcont,
--SIND #objind,
NONLOC [ SLASH.LIST #slash,
REL.LIST #rel,
QUE.LIST #que ] ] >,
COMPS.REST #comps ] ],
CONT [ HOOK.XARG #objind ] ],
LKEYS.KEYREL #keyrel ],
RNAME lvpa ].
|#
v_pas_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
v_pas-norm_lexrule &
[ ND-AFF +,
DTR.SYNSEM trans_subst &
[ LOCAL [ CAT.VAL.COMPS [ FIRST [ LOCAL.CONT #objcont,
--SIND #objind ],
REST #comps ] ],
LKEYS.KEYREL #keyrel ],
SYNSEM [ LOCAL [ CAT [ VAL [ SUBJ < [ LOCAL.CONT #objcont,
--SIND #objind ] >,
COMPS.REST #comps ] ],
CONT [ HOOK.XARG #objind ] ],
LKEYS.KEYREL #keyrel ],
RNAME lvpa ].
v_pas-p_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
prep_passive_verb_lexrule &
[ ND-AFF +,
RNAME lvpe ].
v_pas-p-p_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
ptcl_prep_passive_verb_lexrule &
[ ND-AFF +,
RNAME lvppe ].
v_pas-p-t_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
prep_passive_trans_verb_lexrule &
[ ND-AFF +,
RNAME lvpf ].
v_pas-prt-t_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
prep_passive_ptcl_verb_lexrule &
[ ND-AFF +,
RNAME lvpg ].
v_pas-cp_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
v_pas-cp_lexrule &
[ ND-AFF +,
DTR.SYNSEM cp_passivable_verb &
[ LOCAL.CAT.VAL [ COMPS #comps,
KCMP #kcmp ] ],
SYNSEM passive_atrans_synsem &
[ LOCAL.CAT [ VAL [ COMPS.REST #comps,
KCMP #kcmp ] ] ],
RNAME lvcp ].
v_pas-dat_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
basic_passive_verb_lexrule &
[ ND-AFF +,
DTR [ SYNSEM basic_ditrans_subst &
[ LOCAL [ CAT.VAL [ SUBJ < [ --SIND #subjind,
NONLOC #snonloc ] >,
COMPS < [ LOCAL.CONT #objcont,
--SIND #objind,
NONLOC #ononloc ],
#npcomp > ] ],
NONLOC #nonloc,
LKEYS.KEYREL #keyrel ] ],
SYNSEM [ LOCAL [ CAT [ VAL [ SUBJ < [ LOCAL.CONT #objcont,
--SIND #objind,
NONLOC #snonloc ] >,
COMPS < #npcomp,
synsem &
[ LOCAL local &
[ CAT [ HEAD prep &
[ MINORS.MIN _by_p_cm_rel ],
VAL [ SUBJ < >,
SPR *olist*,
COMPS < > ],
--SLPASS + ],
CONT.HOOK [ LTOP #ltop,
INDEX #subjind ] ],
NONLOC #ononloc,
OPT + ] > ] ],
CONT [ HOOK [ LTOP #ltop,
XARG #objind ] ] ],
NONLOC #nonloc,
LKEYS.KEYREL #keyrel ],
RNAME lvdp ].
; "X was made an example of"
v_pas-np-p_odlr :=
%suffix (* ed) (!ty !tied) (e ed) (!t!v!c !t!v!c!ced)
np_prep_passive_verb_lexrule &
[ ND-AFF +,
RNAME lvppn ].