-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapertium-eng-sat.eng-sat.t2x
484 lines (404 loc) · 11.9 KB
/
apertium-eng-sat.eng-sat.t2x
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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<?xml version="1.0" encoding="UTF-8"?>
<interchunk>
<section-def-cats>
<!--section-def-cats starts from here -->
<def-cat n="noun">
<cat-item tags="NP.*"/>
<cat-item tags="NP"/>
</def-cat>
<def-cat n="verb">
<cat-item tags="VP.*"/>
<cat-item tags="VP"/>
</def-cat>
<def-cat n="preposition">
<cat-item tags="PP"/>
<cat-item tags="PP.*"/>
</def-cat>
<def-cat n="of_prep">
<cat-item tags="PP_of"/>
</def-cat>
<def-cat n="adverb">
<cat-item tags="ADVP"/>
<cat-item tags="ADVP.*"/>
</def-cat>
<def-cat n="adjective">
<cat-item tags="ADJP"/>
<cat-item tags="ADJP.*"/>
</def-cat>
<def-cat n="conjunction">
<cat-item tags="CNJ"/>
<cat-item tags="CNJ.*"/>
</def-cat>
<def-cat n="SN">
<cat-item tags="SN.*"/>
<cat-item lemma="relnom" tags="REL.*"/>
</def-cat>
<def-cat n="SNnorel">
<cat-item tags="SN.*"/>
</def-cat>
<def-cat n="SNnopro"><!-- BCN-->
<cat-item tags="SN.DET.*"/>
<cat-item tags="SN.UNDET.*"/>
</def-cat>
<def-cat n="negacio"><!-- BCN-->
<cat-item tags="SN.DET.*.*.negacio"/>
</def-cat>
<def-cat n="pr">
<cat-item tags="PREP"/>
</def-cat>
<def-cat n="and">
<cat-item lemma="cnj" tags="cnjcoo"/>
</def-cat>
<def-cat n="SN_nopron">
<cat-item tags="SN.DET.*"/>
<cat-item tags="SN.UNDET.*"/>
<cat-item tags="SN.NUM.*"/>
</def-cat>
<def-cat n="SNundet">
<cat-item tags="SN.UNDET.*"/>
</def-cat>
<def-cat n="SV"><!--Verb conjugat, i tb infinitiu per quan el tagger s'equivoca. -->
<cat-item lemma="verbcj" tags="SV.*"/>
<cat-item tags="Vcop.*"/>
<cat-item lemma="mod" tags="SV.*"/><!--MG: I have to <sent> : no deixar-ho penjat (haig de 'fer-ho'). En canvi : 'I have to <desconeguda>: sí que és 'haig de'. -->
<cat-item lemma="auxmod_inf" tags="SV.*"/>
<cat-item lemma="auxmod_inf_inf" tags="SV.*"/><!--BCN-->
<cat-item lemma="be_ger_inf" tags="SV.*"/> <!--BCN-->
<cat-item lemma="verbcj_inf" tags="SV.*"/>
<cat-item lemma="verbcj_inf_perif" tags="SV.*"/>
<cat-item lemma="verbcj_inf_enc" tags="SV.*"/>
<cat-item lemma="auxmod_mod_inf" tags="SV.*"/>
<cat-item lemma="do_inf" tags="SV.*"/>
<cat-item lemma="mod_inf" tags="SV.*"/>
<cat-item lemma="mod_perif" tags="SV.*"/>
<cat-item lemma="mod_inf_perif" tags="SV.*"/>
<cat-item lemma="aux_mod" tags="SV.*"/><!--Aquests van davant desconegudes o sent (I will have to.) -->
<cat-item lemma="have_pp" tags="SV.*"/>
<cat-item lemma="have_pp_inf" tags="SV.*"/><!-- BCN-->
<cat-item lemma="auxmod_have_pp" tags="SV.*"/>
<cat-item lemma="pro_auxmod_have_pp" tags="SV.*"/>
<cat-item lemma="auxmod_have_pp_inf" tags="SV.*"/>
<cat-item lemma="be_ger" tags="SV.*"/>
<cat-item lemma="be_ger_enc" tags="SV.*"/>
<cat-item tags="SV.vblex.inf.*"/>
<cat-item tags="SV.pron.inf.*"/><!--afegit 16-01-2008 -->
<cat-item tags="SV.vbmod.inf.*"/>
<cat-item lemma="verbcj_perif" tags="SV.*"/>
<cat-item lemma="pro_verbcj" tags="SV.*"/>
<cat-item lemma="pro_verbcj_perif" tags="SV.*"/>
<cat-item lemma="pro_auxmod_inf" tags="SV.*"/>
<cat-item lemma="pro_mod_inf" tags="SV.*"/>
<cat-item lemma="pro_mod_inf_perif" tags="SV.*"/>
<cat-item lemma="pro_auxmod_mod_inf" tags="SV.*"/>
<cat-item lemma="pro_have_pp" tags="SV.*"/>
<cat-item lemma="pro_be_ger" tags="SV.*"/>
<cat-item lemma="pro_do_inf" tags="SV.*"/>
<cat-item tags="SV.reporting.inf.*"/>
<cat-item tags="SV.reporting.pri.*"/>
<cat-item tags="SV.reporting.cni.*"/>
<cat-item tags="SV.reporting.ifip.*"/>
<cat-item tags="SV.reporting.fti*"/>
<cat-item tags="SV.reporting.pii*"/>
</def-cat>
<def-cat n="SVGER"><!-- BCN. Per ara no entren els compostos amb have (having won)-->
<cat-item lemma="ger" tags="SV.*"/>
<cat-item lemma="ger_enc" tags="SV.*"/>
<cat-item lemma="ger_enc_enc" tags="SV.*"/>
</def-cat>
<def-cat n="vblike">
<cat-item tags="SV.like.*"/>
</def-cat>
<def-cat n="vbreporting"><!-- BCN-->
<cat-item tags="SV.reporting.*"/>
</def-cat>
<def-cat n="there">
<cat-item lemma="there" tags="adv"/>
</def-cat>
<def-cat n="thereis">
<cat-item lemma="be" tags="Vcop.*"/>
<cat-item lemma="verbcj" tags="SV.vbser.*"/>
<cat-item lemma="auxmod_inf" tags="SV.vbser.*"/>
<cat-item lemma="auxmod_mod_inf" tags="SV.vbser.*"/>
<cat-item lemma="auxmod_have_pp" tags="SV.vbser.*"/>
<cat-item lemma="mod_inf" tags="SV.vbser.*"/>
<cat-item lemma="mod_inf_perif" tags="SV.vbser.*"/>
<cat-item lemma="have_pp" tags="SV.vbser.*"/>
<cat-item lemma="verbcj_perif" tags="SV.vbser.*"/>
</def-cat>
<def-cat n="pro_vblike">
<cat-item lemma="pro_verbcj" tags="SV.like.*"/>
<cat-item lemma="pro_verbcj_perif" tags="SV.like.*"/>
<cat-item lemma="pro_auxmod_inf" tags="SV.like.*"/>
<cat-item lemma="pro_mod_inf" tags="SV.like.*"/>
<cat-item lemma="pro_mod_inf_perif" tags="SV.like.*"/>
<cat-item lemma="pro_auxmod_mod_inf" tags="SV.like.*"/>
<cat-item lemma="pro_have_pp" tags="SV.like.*"/>
<cat-item lemma="pro_be_ger" tags="SV.like.*"/>
<cat-item lemma="pro_do_inf" tags="SV.like.*"/>
</def-cat>
<def-cat n="ADV">
<cat-item tags="adv"/>
<cat-item tags="adv.*"/>
</def-cat>
<def-cat n="SA">
<cat-item tags="SA.*"/>
</def-cat>
<def-cat n="pp">
<cat-item lemma="pp" tags="SA.*"/>
<cat-item lemma="adj" tags="SA.*"/><!-- BCN per que agafi bé resolutions adopted -->
</def-cat>
<def-cat n="adj">
<cat-item lemma="adj" tags="SA.*"/>
<cat-item lemma="np_pp" tags="SA.*"/>
</def-cat>
<def-cat n="DET">
<cat-item tags="DET.*"/>
</def-cat>
<def-cat n="RELAN">
<cat-item tags="REL.an.*"/>
<!--<cat-item tags="SN.an.*"/>-->
</def-cat>
<def-cat n="NUM">
<cat-item tags="NUM.*"/>
</def-cat>
<def-cat n="punt">
<cat-item tags="sent"/>
</def-cat>
<def-cat n="cnjcoo">
<cat-item tags="cnjcoo"/>
</def-cat>
<!--section-def-cats ends here -->
</section-def-cats>
<section-def-attrs>
<!--section-def-attrs starts from here -->
<def-attr n="pers">
<attr-item tags="p1"/>
<attr-item tags="p2"/>
<attr-item tags="p3"/>
<attr-item tags="PD"/>
</def-attr>
<def-attr n="gen">
<attr-item tags="m"/>
<attr-item tags="f"/>
<attr-item tags="mf"/>
<attr-item tags="GD"/>
<attr-item tags="nt"/>
</def-attr>
<def-attr n="nbr">
<attr-item tags="sg"/>
<attr-item tags="pl"/>
<attr-item tags="sp"/>
<attr-item tags="ND"/>
</def-attr>
<def-attr n="case">
<attr-item tags="d"/>
<attr-item tags="o"/>
<attr-item tags="CD"/>
</def-attr>
<def-attr n="subj_vibhakthi">
<attr-item tags="parsarg:ko"/>
</def-attr>
<def-attr n="temps">
<attr-item tags="inf"/>
<attr-item tags="pres"/>
<attr-item tags="past"/>
<attr-item tags="pri"/>
<attr-item tags="ifip"/>
<attr-item tags="cni"/>
<attr-item tags="fti"/>
<attr-item tags="pp"/>
<attr-item tags="ger"/>
<attr-item tags="pprs"/>
<attr-item tags="subs"/>
<attr-item tags="imp"/>
<attr-item tags="ifi"/>
<attr-item tags="pii"/>
<attr-item tags="pis"/>
<attr-item tags="prs"/>
</def-attr>
<def-attr n="a_verb">
<attr-item tags="vblex"/>
<attr-item tags="vblex.pron"/>
<attr-item tags="vbhaver"/>
<attr-item tags="vbser"/>
<attr-item tags="vbmod"/>
<attr-item tags="HAVER"/>
</def-attr>
<def-attr n="a_SN">
<attr-item tags="DET"/>
<attr-item tags="UNDET"/>
<attr-item tags="NUM"/>
<attr-item tags="PDET"/><!--'Per determinar', per a SN UNDET que han de passar a determinats, transformació que farà el postchunk detectant els PDET. -->
</def-attr>
<!--section-def-attrs ends here -->
</section-def-attrs>
<section-def-vars>
<!--section-def-vars starts from here -->
<def-var n="number"/>
<def-var n="uno"/>
<def-var n="nbrvar"/>
<def-var n="genvar"/>
<def-var n="vibhakthi"/>
<def-var n="persvar"/>
<def-var n="lemvar"/>
<def-var n="nombre" v="<sg>"/>
<def-var n="genere"/>
<!--section-def-vars ends here -->
</section-def-vars>
<section-def-macros>
<!--section-def-macros starts from here -->
<def-macro n="test1" npar="1">
<let>
<var n="number"/>
<lit v=""/>
</let>
</def-macro>
<!--section-def-macros ends here -->
</section-def-macros>
<section-rules>
<!--section-def-rules starts from here -->
<rule comment="REGLA: SN">
<pattern>
<pattern-item n="SN"/>
</pattern>
<action>
<out>
<chunk>
<clip pos="1" part="lem"/>
<clip pos="1" part="tags"/>
<clip pos="1" part="chcontent"/>
</chunk>
</out>
</action>
</rule>
<rule comment="REGLA: NP (Eg:apple)">
<pattern>
<pattern-item n="noun"/>
</pattern>
<action>
<out>
<chunk>
<clip pos="1" part="whole"/>
</chunk>
</out>
<let>
<var n="nbrvar"/>
<clip pos="1" part="nbr"/>
</let>
<let>
<var n="persvar"/>
<clip pos="1" part="pers"/>
</let>
<let>
<var n="genvar"/>
<clip pos="1" part="gen"/>
</let>
</action>
</rule>
<rule comment="REGLA: DET (per assignar gènere i nombre si hi ha GD i ND que no s'han pogut determinar, com passa en alguns pronoms: both, etc.)">
<pattern>
<pattern-item n="DET"/>
</pattern>
<action>
<choose>
<when>
<test>
<equal>
<clip pos="1" part="gen"/>
<lit-tag v="GD"/>
</equal>
</test>
<let>
<clip pos="1" part="gen"/>
<lit-tag v="m"/>
</let>
</when>
</choose>
<choose>
<when>
<test>
<equal>
<clip pos="1" part="nbr"/>
<lit-tag v="ND"/>
</equal>
</test>
<let>
<clip pos="1" part="nbr"/>
<lit-tag v="sg"/>
</let>
</when>
</choose>
<out>
<chunk>
<clip pos="1" part="whole"/>
</chunk>
</out>
</action>
</rule>
<rule comment="REGLA: NUM (per assignar gènere si hi ha GD)">
<pattern>
<pattern-item n="NUM"/>
</pattern>
<action>
<choose>
<when>
<test>
<equal>
<clip pos="1" part="gen"/>
<lit-tag v="GD"/>
</equal>
</test>
<let>
<clip pos="1" part="gen"/>
<lit-tag v="m"/>
</let>
</when>
</choose>
<choose>
<when>
<test>
<equal>
<clip pos="1" part="nbr"/>
<lit-tag v="ND"/>
</equal>
</test>
<let>
<clip pos="1" part="nbr"/>
<lit-tag v="sg"/>
</let>
</when>
</choose>
<out>
<chunk>
<clip pos="1" part="whole"/>
</chunk>
</out>
</action>
</rule>
<rule> <!-- REGLA: reset variables-->
<pattern>
<pattern-item n="punt"/>
</pattern>
<action>
<let>
<var n="nombre"/>
<lit-tag v="sg"/>
</let>
<out>
<chunk>
<clip pos="1" part="whole"/>
</chunk>
</out>
</action>
</rule>
<!--section-def-rules ends here -->
</section-rules>
</interchunk>
<!--
Resources:
https://wiki.apertium.org/wiki/Chunking:_A_full_example
https://wiki.apertium.org/wiki/Chunking
https://wiki.apertium.org/wiki/Apertium_New_Language_Pair_HOWTO#Transfer_rules
https://wiki.apertium.org/wiki/A_long_introduction_to_transfer_rules
https://wiki.apertium.org/wiki/Transfer#Adding_structural_transfer_.28grammar.29_rules
-->