Poc més
[apertium.git] / apertium-en-nl / apertium-en-nl.nl-en.t1x
blob8ca353ba6ac4c1fab7ca4dd77b98cdf12aeb3cbc
1 <?xml version="1.0" encoding="ISO-8859-15"?>
2 <transfer default="chunk">
3 <section-def-cats>
4 <def-cat n="adv">
5 <cat-item tags="adv"/>
6 </def-cat>
7 <def-cat n="adj">
8 <cat-item tags="adj"/>
9 <cat-item tags="adj.*"/>
10 </def-cat>
11 <def-cat n="nom">
12 <cat-item tags="n.*"/>
13 <cat-item tags="np.*"/>
14 </def-cat>
15 <def-cat n="sent">
16 <cat-item tags="sent"/>
17 </def-cat>
18 <def-cat n="det">
19 <cat-item tags="det.ind.*"/>
20 <cat-item tags="det.def.*"/>
21 </def-cat>
22 <def-cat n="prpers">
23 <cat-item lemma="prpers" tags="prn.*"/>
24 <cat-item lemma="Prpers" tags="prn.*"/>
25 <cat-item tags="prn.subj.*"/>
26 <cat-item tags="prn.obj.*"/>
27 </def-cat>
28 <def-cat n="prn">
29 <cat-item tags="prn.tn.*"/>
30 <cat-item tags="prn.tn"/>
31 </def-cat>
32 <def-cat n="verbnm"><!--verb no modal -->
33 <cat-item tags="vblex.*"/>
34 <cat-item tags="vbser.*"/>
35 <cat-item tags="vbhaver.*"/>
36 </def-cat>
37 <def-cat n="verbm">
38 <cat-item tags="vaux.*"/>
39 </def-cat>
40 <def-cat n="cnjadv">
41 <cat-item tags="cnjadv"/>
42 <cat-item tags="cnjadv.*"/>
43 </def-cat>
44 <def-cat n="prep"> <!-- preposition -->
45 <cat-item tags="pr"/>
46 </def-cat>
47 <def-cat n="end_punct">
48 <cat-item tags="sent"/>
49 <cat-item tags="cm"/>
50 <cat-item tags="rpar"/>
51 </def-cat>
52 <def-cat n="prefix">
53 <cat-item tags="pref"/>
54 <cat-item tags="pref.*"/>
55 </def-cat>
56 </section-def-cats>
58 <section-def-attrs>
59 <def-attr n="nbr"> <!-- Number -->
60 <attr-item tags="sg"/>
61 <attr-item tags="pl"/>
62 <attr-item tags="sp"/>
63 </def-attr>
64 <def-attr n="gen"> <!-- Gender -->
65 <attr-item tags="f"/>
66 <attr-item tags="m"/>
67 <attr-item tags="mf"/>
68 </def-attr>
69 <def-attr n="a_cnj">
70 <attr-item tags="cnjadv"/>
71 <attr-item tags="cnjcoo"/>
72 <attr-item tags="cnjsub"/>
73 </def-attr>
74 <def-attr n="a_nom">
75 <attr-item tags="n"/>
76 <attr-item tags="n.acr"/>
77 <attr-item tags="n.unc"/>
78 <attr-item tags="np.loc"/>
79 </def-attr>
80 <def-attr n="a_adj">
81 <attr-item tags="adj"/>
82 <attr-item tags="adj.sint"/>
83 <attr-item tags="comp"/>
84 <attr-item tags="sup"/>
85 </def-attr>
86 <def-attr n="a_det">
87 <attr-item tags="det.ind"/>
88 <attr-item tags="det.def"/>
89 </def-attr>
90 <def-attr n="tipus_prn">
91 <attr-item tags="prn"/>
92 <attr-item tags="prn.subj"/>
93 <attr-item tags="prn.obj"/>
94 </def-attr>
95 <def-attr n="pers"> <!-- Person -->
96 <attr-item tags="p1"/>
97 <attr-item tags="p2"/>
98 <attr-item tags="p3"/>
99 </def-attr>
100 <def-attr n="a_verb">
101 <attr-item tags="vblex"/>
102 <attr-item tags="vbser"/>
103 <attr-item tags="vbhaver"/>
104 <attr-item tags="vbmod"/>
105 <attr-item tags="vaux"/>
106 </def-attr>
107 <def-attr n="temps">
108 <attr-item tags="pii"/>
109 <attr-item tags="pis"/>
110 <attr-item tags="pri"/>
111 <attr-item tags="past"/>
112 <attr-item tags="pres"/>
113 </def-attr>
114 </section-def-attrs>
117 <section-def-vars>
118 <def-var n="numero"/>
119 <def-var n="genere"/>
120 <def-var n="nombre"/>
121 <def-var n="caseFirstWord"/>
122 <def-var n="EOS"/>
123 </section-def-vars>
125 <section-def-macros>
126 <def-macro n="firstWord" npar="1">
127 <choose>
128 <when>
129 <test>
130 <equal>
131 <clip pos="1" side="sl" part="a_np_acr"/>
132 <lit v=""/>
133 </equal>
134 </test>
135 <choose>
136 <when>
137 <test>
138 <equal>
139 <var n="EOS"/>
140 <lit v="true"/>
141 </equal>
142 </test>
143 <modify-case>
144 <clip pos="1" side="tl" part="lem"/>
145 <lit v="aa"/>
146 </modify-case>
147 <let>
148 <var n="caseFirstWord"/>
149 <lit v="Aa"/>
150 </let>
151 </when>
152 </choose>
153 </when>
154 <otherwise>
155 <let>
156 <var n="caseFirstWord"/>
157 <lit v="aa"/>
158 </let>
159 </otherwise>
160 </choose>
161 <let>
162 <var n="EOS"/>
163 <lit v="false"/>
164 </let>
165 </def-macro>
167 </section-def-macros>
168 <section-rules>
169 <rule comment="REGLA: NOM (per a donar valor a la variable de gènere, i per a col·locar la cua en les multiparaules amb g"> <pattern>
170 <pattern-item n="nom"/>
171 </pattern>
172 <action>
173 <call-macro n="firstWord">
174 <with-param pos="1"/>
175 </call-macro>
176 <out>
177 <chunk name="nom" case="caseFirstWord">
178 <tags>
179 <tag><lit-tag v="SN.UNDET"/></tag>
180 <tag><clip pos="1" side="tl" part="gen"/></tag>
181 <tag><clip pos="1" side="tl" part="nbr"/></tag>
182 </tags>
183 <lu>
184 <clip pos="1" side="tl" part="lemh"/>
185 <clip pos="1" side="tl" part="a_nom"/>
186 <clip pos="1" side="tl" part="nbr"/>
187 <clip pos="1" side="tl" part="lemq"/>
188 </lu>
189 </chunk>
190 </out>
191 <let>
192 <var n="caseFirstWord"/>
193 <lit v="aa"/>
194 </let>
195 </action>
196 </rule>
198 <rule>
199 <pattern>
200 <pattern-item n="verbnm"/>
201 </pattern>
202 <action>
203 <out>
204 <chunk name="verb">
205 <tags>
206 <tag><lit-tag v="V"/></tag>
207 </tags>
208 <lu>
209 <clip pos="1" side="tl" part="lem"/>
210 <clip pos="1" side="tl" part="a_verb"/>
211 <clip pos="1" side="tl" part="temps"/>
212 </lu>
213 </chunk>
214 </out>
215 </action>
216 </rule>
218 <rule comment="REGLA: VAUX VBLEX">
219 <pattern>
220 <pattern-item n="verbm"/>
221 <pattern-item n="verbnm"/>
222 </pattern>
223 <action>
224 <out>
225 <chunk name="verb">
226 <tags>
227 <tag><lit-tag v="V"/></tag>
228 </tags>
229 <lu>
230 <clip pos="1" side="tl" part="lem"/>
231 <clip pos="1" side="tl" part="a_verb"/>
232 <clip pos="1" side="tl" part="temps"/>
233 </lu>
234 <b/>
235 <lu>
236 <clip pos="2" side="tl" part="lem"/>
237 <clip pos="2" side="tl" part="a_verb"/>
238 <clip pos="2" side="tl" part="temps"/>
239 </lu>
240 </chunk>
241 </out>
242 </action>
243 </rule>
245 <rule comment="REGLA: CNJADV">
246 <pattern>
247 <pattern-item n="cnjadv"/>
248 </pattern>
249 <action>
250 <out>
251 <chunk name="cnjadv">
252 <tags>
253 <tag><lit-tag v="CNJADV"/></tag>
254 </tags>
255 <lu>
256 <clip pos="1" side="tl" part="lem"/>
257 <clip pos="1" side="tl" part="a_cnj"/>
258 </lu>
259 </chunk>
260 </out>
261 </action>
262 </rule>
265 <rule comment="REGLA: ADJ">
266 <pattern>
267 <pattern-item n="adj"/>
268 </pattern>
269 <action>
270 <out>
271 <chunk name="adj">
272 <tags>
273 <tag><lit-tag v="ADJ"/></tag>
274 </tags>
276 <lu>
277 <clip pos="1" side="tl" part="lem"/>
278 <clip pos="1" side="tl" part="a_adj"/>
279 </lu>
280 </chunk>
281 </out>
282 </action>
283 </rule>
285 <rule> <!-- In <PRN><VBLEX> constructions, propagate the person / number of
286 the personal pronoun to the verb. -->
287 <pattern>
288 <pattern-item n="prpers"/>
289 <pattern-item n="verbnm"/>
290 </pattern>
291 <action>
292 <choose>
293 <when>
294 <test> <!-- If it is third person singular in the present tense -->
295 <and>
296 <equal>
297 <clip pos="1" side="tl" part="pers"/>
298 <lit-tag v="p3"/>
299 </equal>
300 <equal>
301 <clip pos="2" side="tl" part="temps"/>
302 <lit-tag v="pres"/>
303 </equal>
304 <equal>
305 <clip pos="1" side="tl" part="nbr"/>
306 <lit-tag v="sg"/>
307 </equal>
308 </and>
309 </test>
310 <out>
311 <chunk name="prn_verb">
312 <tags>
313 <tag><lit-tag v="PRN"/></tag>
314 <tag><lit-tag v="V"/></tag>
315 </tags>
316 <lu>
317 <clip pos="1" side="tl" part="lem"/> <!-- Pronoun -->
318 <clip pos="1" side="tl" part="tipus_prn"/>
319 <clip pos="1" side="tl" part="pers"/>
320 <clip pos="1" side="tl" part="gen"/>
321 <clip pos="1" side="tl" part="nbr"/>
322 <lit v="$ ^"/>
323 <clip pos="2" side="tl" part="lem"/> <!-- Verb -->
324 <clip pos="2" side="tl" part="a_verb"/>
325 <lit-tag v="pri"/>
326 <clip pos="1" side="tl" part="pers"/>
327 <clip pos="1" side="tl" part="nbr"/>
328 </lu>
329 </chunk>
330 </out>
331 </when>
332 <when>
333 <test>
334 <equal>
335 <clip pos="2" side="tl" part="temps"/>
336 <lit-tag v="pri"/>
337 </equal>
338 </test>
339 <out>
340 <chunk name="prn_verb">
341 <tags>
342 <tag><lit-tag v="PRN"/></tag>
343 <tag><lit-tag v="V"/></tag>
344 </tags>
345 <lu>
346 <clip pos="1" side="tl" part="lem"/>
347 <clip pos="1" side="tl" part="tipus_prn"/>
348 <clip pos="1" side="tl" part="pers"/>
349 <clip pos="1" side="tl" part="gen"/>
350 <clip pos="1" side="tl" part="nbr"/>
351 <lit v="$ ^"/>
352 <clip pos="2" side="tl" part="lem"/>
353 <clip pos="2" side="tl" part="a_verb"/>
354 <lit-tag v="pres"/>
355 </lu>
356 </chunk>
357 </out>
358 </when>
359 <otherwise>
360 <out>
361 <chunk name="prn_verb">
362 <tags>
363 <tag><lit-tag v="PRN"/></tag>
364 <tag><lit-tag v="V"/></tag>
365 </tags>
366 <lu>
367 <clip pos="1" side="tl" part="lem"/>
368 <clip pos="1" side="tl" part="tipus_prn"/>
369 <clip pos="1" side="tl" part="pers"/>
370 <clip pos="1" side="tl" part="gen"/>
371 <clip pos="1" side="tl" part="nbr"/>
372 <lit v="$ ^"/>
373 <clip pos="2" side="tl" part="lem"/>
374 <clip pos="2" side="tl" part="a_verb"/>
375 <clip pos="2" side="tl" part="temps"/>
376 </lu>
377 </chunk>
378 </out>
379 </otherwise>
380 </choose>
381 </action>
382 </rule>
384 <rule> <!-- "nie" at the end of a phrase - remove it. this is a hack-->
385 <pattern>
386 <pattern-item n="adv"/>
387 <pattern-item n="end_punct"/>
388 </pattern>
389 <action>
390 <choose>
391 <when>
392 <test>
393 <equal>
394 <clip pos="1" side="sl" part="lem"/>
395 <lit v="nie"/>
396 </equal>
397 </test>
398 <out>
399 <chunk name="punt">
400 <tags>
401 <tag><lit-tag v="cm"/></tag>
402 </tags>
403 <lu>
404 <clip pos="2" side="tl" part="whole"/>
405 </lu>
406 </chunk>
407 </out>
408 </when>
409 <otherwise>
410 <out>
411 <chunk name="default">
412 <tags>
413 <tag><lit-tag v="adj"/></tag>
414 </tags>
415 <lu>
416 <clip pos="1" side="tl" part="whole"/>
417 <lit v="$ ^"/>
418 <clip pos="2" side="tl" part="whole"/>
419 </lu>
420 </chunk>
421 </out>
422 </otherwise>
423 </choose>
424 </action>
425 </rule>
427 <rule comment="REGLA: DET NOM">
428 <pattern>
429 <pattern-item n="det"/>
430 <pattern-item n="nom"/>
431 </pattern>
432 <action>
433 <out>
434 <chunk name="det_nom" case="caseFirstWord">
435 <tags>
436 <tag><lit-tag v="SN"/></tag>
437 <tag><clip pos="2" side="sl" part="gen"/></tag>
438 <tag><var n="nombre"/></tag>
439 </tags>
440 <lu>
441 <clip pos="1" side="tl" part="lem"/>
442 <clip pos="1" side="tl" part="a_det"/>
443 <clip pos="2" side="tl" part="nbr"/>
444 </lu>
445 <b pos="1"/>
446 <lu>
447 <clip pos="2" side="tl" part="lemh"/>
448 <clip pos="2" side="tl" part="a_nom"/>
449 <clip pos="2" side="tl" part="nbr"/>
450 <clip pos="2" side="tl" part="lemq"/>
451 </lu>
452 </chunk>
453 </out>
454 <let>
455 <var n="caseFirstWord"/>
456 <lit v="aa"/>
457 </let>
458 </action>
459 </rule>
461 <rule comment="REGLA: PRN PR PRN">
462 <pattern>
463 <pattern-item n="prn"/>
464 <pattern-item n="prep"/>
465 <pattern-item n="prpers"/>
466 </pattern>
467 <action>
468 <out>
469 <chunk name="det_nom" case="caseFirstWord">
470 <tags>
471 <tag><lit-tag v="PRN"/></tag>
472 <tag><var n="nombre"/></tag>
473 </tags>
474 <lu>
475 <clip pos="1" side="tl" part="lem"/>
476 <clip pos="1" side="tl" part="tipus_prn"/>
477 <clip pos="1" side="tl" part="pers"/>
478 <clip pos="1" side="tl" part="gen"/>
479 <clip pos="3" side="tl" part="nbr"/>
480 <clip pos="3" side="tl" part="lemq"/>
481 </lu>
482 <b/>
483 <lu>
484 <clip pos="2" side="tl" part="lem"/>
485 <clip pos="1" side="tl" part="a_prep"/>
486 </lu>
487 <b/>
488 <lu>
489 <clip pos="3" side="tl" part="lem"/>
490 <clip pos="1" side="tl" part="tipus_prn"/>
491 <clip pos="1" side="tl" part="pers"/>
492 <clip pos="1" side="tl" part="gen"/>
493 <clip pos="3" side="tl" part="nbr"/>
494 <clip pos="3" side="tl" part="lemq"/>
495 </lu>
496 </chunk>
497 </out>
498 <let>
499 <var n="caseFirstWord"/>
500 <lit v="aa"/>
501 </let>
502 </action>
503 </rule>
505 <rule>
506 <pattern>
507 <pattern-item n="end_punct"/>
508 </pattern>
509 <action>
510 <out>
511 <chunk name="punct">
512 <tags>
513 <tag><lit-tag v="punct"/></tag>
514 </tags>
515 <lu>
516 <clip pos="1" side="tl" part="whole"/>
517 </lu>
518 </chunk>
519 </out>
520 </action>
521 </rule>
523 <rule>
524 <pattern>
525 <pattern-item n="prefix"/>
526 <pattern-item n="verbnm"/>
527 </pattern>
528 <action>
529 <out>
530 <chunk name="V">
531 <tags>
532 <tag><lit-tag v="participle"/></tag>
533 </tags>
534 <lu>
535 <clip pos="2" side="tl" part="lem"/>
536 <clip pos="2" side="tl" part="a_verb"/>
537 <clip pos="1" side="tl" part="temps"/>
538 </lu>
539 </chunk>
540 </out>
541 </action>
542 </rule>
546 <rule> <!-- REGLA: reset variables-->
547 <pattern>
548 <pattern-item n="sent"/>
549 </pattern>
550 <action>
551 <let>
552 <var n="nombre"/>
553 <lit-tag v="sg"/>
554 </let>
555 <let>
556 <var n="genere"/>
557 <lit-tag v="m"/>
558 </let>
559 <out>
560 <chunk name="punt">
561 <tags>
562 <tag><lit-tag v="sent"/></tag>
563 </tags>
564 <lu>
565 <clip pos="1" side="tl" part="whole"/>
566 </lu>
567 </chunk>
568 </out>
570 </action>
571 </rule>
573 </section-rules>
575 </transfer>