Numbers
[apertium.git] / apertium-en-de / apertium-en-de.de-en.t1x
bloba7c11bafa686b1ee73e879f9e4298c5aa96c9ab9
1 <?xml version="1.0" encoding="UTF-8"?>
2 <transfer default="chunk">
3 <section-def-cats>
4 <def-cat n="preadv">
5 <cat-item tags="preadv"/>
6 <cat-item tags="preadv.*"/>
7 </def-cat>
8 <def-cat n="adv">
9 <cat-item tags="adv"/>
10 <cat-item tags="adv.*"/>
11 </def-cat>
12 <def-cat n="num">
13 <cat-item tags="num"/>
14 <cat-item tags="num.*"/>
15 </def-cat>
16 <def-cat n="adj">
17 <cat-item tags="adj"/>
18 <cat-item tags="adj.*"/>
19 </def-cat>
20 <def-cat n="nom">
21 <cat-item tags="n.*"/>
22 <cat-item tags="np.*"/>
23 </def-cat>
24 <def-cat n="sent">
25 <cat-item tags="sent"/>
26 </def-cat>
27 <def-cat n="det">
28 <cat-item tags="det.ind.*"/>
29 <cat-item tags="det.def.*"/>
30 <cat-item tags="det.dem.*"/>
31 <cat-item tags="det.*"/>
32 </def-cat>
33 <def-cat n="prpers">
34 <cat-item tags="prn.subj.*"/>
35 <cat-item tags="prn.obj.*"/>
36 <cat-item lemma="prpers" tags="prn.*"/>
37 <cat-item lemma="Prpers" tags="prn.*"/>
38 </def-cat>
39 <def-cat n="prn">
40 <cat-item tags="prn.tn.*"/>
41 <cat-item tags="prn.tn"/>
42 </def-cat>
43 <def-cat n="verbnm"><!--verb no modal -->
44 <cat-item tags="vblex.*"/>
45 <cat-item tags="vbser.*"/>
46 <cat-item tags="vbhaver.*"/>
47 </def-cat>
48 <def-cat n="verbm">
49 <cat-item tags="vaux"/>
50 <cat-item tags="vaux.*"/>
51 </def-cat>
52 <def-cat n="cnjadv">
53 <cat-item tags="cnjadv"/>
54 </def-cat>
55 <def-cat n="cnjsub">
56 <cat-item tags="cnjsub"/>
57 </def-cat>
58 <def-cat n="cnjcoo">
59 <cat-item tags="cnjcoo"/>
60 <cat-item tags="cnjcoo.*"/>
61 </def-cat>
62 <def-cat n="prep"> <!-- preposition -->
63 <cat-item tags="pr"/>
64 </def-cat>
65 <def-cat n="end_punct">
66 <cat-item tags="sent"/>
67 <cat-item tags="cm"/>
68 <cat-item tags="rpar"/>
69 </def-cat>
70 <def-cat n="prefix">
71 <cat-item tags="pref"/>
72 <cat-item tags="pref.*"/>
73 </def-cat>
74 <def-cat n="attachable_prefix">
75 <cat-item tags="pr.atp"/>
76 </def-cat>
77 <def-cat n="hyphen">
78 <cat-item tags="guio"/>
79 </def-cat>
80 <def-cat n="genitive">
81 <cat-item tags="gen"/>
82 </def-cat>
83 </section-def-cats>
85 <section-def-attrs>
86 <def-attr n="nbr"> <!-- Number -->
87 <attr-item tags="sg"/>
88 <attr-item tags="pl"/>
89 <attr-item tags="sp"/>
90 </def-attr>
91 <def-attr n="gen"> <!-- Gender -->
92 <attr-item tags="f"/>
93 <attr-item tags="m"/>
94 <attr-item tags="mf"/>
95 <attr-item tags="nt"/>
96 </def-attr>
97 <def-attr n="a_prep">
98 <attr-item tags="pr"/>
99 </def-attr>
100 <def-attr n="a_cnj">
101 <attr-item tags="cnjadv"/>
102 <attr-item tags="cnjcoo"/>
103 <attr-item tags="cnjsub"/>
104 </def-attr>
105 <def-attr n="a_nom">
106 <attr-item tags="n"/>
107 <attr-item tags="n.acr"/>
108 <attr-item tags="n.unc"/>
109 <attr-item tags="np.loc"/>
110 </def-attr>
111 <def-attr n="a_adj">
112 <attr-item tags="adj"/>
113 <attr-item tags="adj.sint"/>
114 <attr-item tags="adj.sint.comp"/>
115 <attr-item tags="adj.sint.sup"/>
116 </def-attr>
117 <def-attr n="a_det">
118 <attr-item tags="det.ind"/>
119 <attr-item tags="det.def"/>
120 <attr-item tags="det.dem"/>
121 <attr-item tags="det"/>
122 </def-attr>
123 <def-attr n="a_preadv">
124 <attr-item tags="preadv"/>
125 </def-attr>
126 <def-attr n="a_adv">
127 <attr-item tags="adv.itg"/>
128 <attr-item tags="adv"/>
129 </def-attr>
130 <def-attr n="a_num">
131 <attr-item tags="num"/>
132 </def-attr>
133 <def-attr n="tipus_prn">
134 <attr-item tags="prn.subj"/>
135 <attr-item tags="prn.obj"/>
136 <attr-item tags="prn.itg"/>
137 <attr-item tags="prn.tn"/>
138 <attr-item tags="prn.pos"/>
139 <attr-item tags="prn"/>
140 </def-attr>
141 <def-attr n="pers"> <!-- Person -->
142 <attr-item tags="p1"/>
143 <attr-item tags="p2"/>
144 <attr-item tags="p3"/>
145 </def-attr>
146 <def-attr n="a_verb">
147 <attr-item tags="vblex"/>
148 <attr-item tags="vbser"/>
149 <attr-item tags="vbhaver"/>
150 <attr-item tags="vbmod"/>
151 <attr-item tags="vaux"/>
152 </def-attr>
153 <def-attr n="a_atp">
154 <attr-item tags="pr.atp"/>
155 <attr-item tags="pr"/>
156 <attr-item tags="adv"/>
157 </def-attr>
158 <def-attr n="temps">
159 <attr-item tags="pii"/>
160 <attr-item tags="pis"/>
161 <attr-item tags="pri"/>
162 <attr-item tags="past"/>
163 <attr-item tags="pres"/>
164 <attr-item tags="inf"/>
165 </def-attr>
166 <def-attr n="stress">
167 <attr-item tags="uns"/>
168 </def-attr>
169 </section-def-attrs>
172 <section-def-vars>
173 <def-var n="numero"/>
174 <def-var n="genere"/>
175 <def-var n="nombre"/>
176 <def-var n="caseFirstWord"/>
177 <def-var n="EOS"/>
178 </section-def-vars>
180 <section-def-macros>
181 <def-macro n="firstWord" npar="1">
182 <choose>
183 <when>
184 <test>
185 <equal>
186 <clip pos="1" side="sl" part="a_np_acr"/>
187 <lit v=""/>
188 </equal>
189 </test>
190 <choose>
191 <when>
192 <test>
193 <equal>
194 <var n="EOS"/>
195 <lit v="true"/>
196 </equal>
197 </test>
198 <modify-case>
199 <clip pos="1" side="tl" part="lem"/>
200 <lit v="aa"/>
201 </modify-case>
202 <let>
203 <var n="caseFirstWord"/>
204 <lit v="Aa"/>
205 </let>
206 </when>
207 </choose>
208 </when>
209 <otherwise>
210 <let>
211 <var n="caseFirstWord"/>
212 <lit v="aa"/>
213 </let>
214 </otherwise>
215 </choose>
216 <let>
217 <var n="EOS"/>
218 <lit v="false"/>
219 </let>
220 </def-macro>
222 </section-def-macros>
224 <section-rules>
225 <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">
226 <pattern>
227 <pattern-item n="nom"/>
228 </pattern>
229 <action>
230 <call-macro n="firstWord">
231 <with-param pos="1"/>
232 </call-macro>
233 <out>
234 <chunk name="nom" case="caseFirstWord">
235 <tags>
236 <tag><lit-tag v="SN.UNDET"/></tag>
237 <tag><clip pos="1" side="tl" part="gen"/></tag>
238 <tag><clip pos="1" side="tl" part="nbr"/></tag>
239 </tags>
240 <lu>
241 <clip pos="1" side="tl" part="lemh"/>
242 <clip pos="1" side="tl" part="a_nom"/>
243 <clip pos="1" side="tl" part="nbr"/>
244 <clip pos="1" side="tl" part="lemq"/>
245 </lu>
246 </chunk>
247 </out>
248 <let>
249 <var n="caseFirstWord"/>
250 <lit v="aa"/>
251 </let>
252 </action>
253 </rule>
255 <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>
256 <pattern-item n="nom"/>
257 <pattern-item n="genitive"/>
258 </pattern>
259 <action>
260 <call-macro n="firstWord">
261 <with-param pos="1"/>
262 </call-macro>
263 <out>
264 <chunk name="nom" case="caseFirstWord">
265 <tags>
266 <tag><lit-tag v="SN.UNDET"/></tag>
267 <tag><clip pos="1" side="tl" part="gen"/></tag>
268 <tag><clip pos="1" side="tl" part="nbr"/></tag>
269 </tags>
270 <lu>
271 <clip pos="1" side="tl" part="lemh"/>
272 <clip pos="1" side="tl" part="a_nom"/>
273 <clip pos="1" side="tl" part="nbr"/>
274 <clip pos="1" side="tl" part="lemq"/>
275 </lu>
276 <lu>
277 <clip pos="2" side="tl" part="lem"/>
278 <lit-tag v="gen"/>
279 </lu>
280 </chunk>
281 </out>
282 <let>
283 <var n="caseFirstWord"/>
284 <lit v="aa"/>
285 </let>
286 </action>
287 </rule>
290 <rule comment="REGLA: NOM GUIO NOM">
291 <pattern>
292 <pattern-item n="nom"/>
293 <pattern-item n="hyphen"/>
294 <pattern-item n="nom"/>
295 </pattern>
296 <action>
297 <call-macro n="firstWord">
298 <with-param pos="1"/>
299 </call-macro>
300 <out>
301 <chunk name="nom" case="caseFirstWord">
302 <tags>
303 <tag><lit-tag v="SN.UNDET"/></tag>
304 <tag><clip pos="1" side="tl" part="gen"/></tag>
305 <tag><clip pos="1" side="tl" part="nbr"/></tag>
306 </tags>
307 <lu>
308 <clip pos="1" side="tl" part="lemh"/>
309 <clip pos="1" side="tl" part="a_nom"/>
310 <clip pos="1" side="tl" part="nbr"/>
311 <clip pos="1" side="tl" part="lemq"/>
312 </lu>
313 <lu>
314 <clip pos="2" side="tl" part="lem"/>
315 <lit-tag v="guio"/>
316 </lu>
317 <lu>
318 <clip pos="3" side="tl" part="lemh"/>
319 <clip pos="3" side="tl" part="a_nom"/>
320 <clip pos="3" side="tl" part="nbr"/>
321 <clip pos="3" side="tl" part="lemq"/>
322 </lu>
323 </chunk>
324 </out>
325 <let>
326 <var n="caseFirstWord"/>
327 <lit v="aa"/>
328 </let>
329 </action>
330 </rule>
332 <rule comment="REGLA: DET NOM GUIO NOM">
333 <pattern>
334 <pattern-item n="det"/>
335 <pattern-item n="nom"/>
336 <pattern-item n="hyphen"/>
337 <pattern-item n="nom"/>
338 </pattern>
339 <action>
340 <call-macro n="firstWord">
341 <with-param pos="1"/>
342 </call-macro>
343 <out>
344 <chunk name="det_nom" case="caseFirstWord">
345 <tags>
346 <tag><lit-tag v="SN"/></tag>
347 <tag><clip pos="2" side="sl" part="gen"/></tag>
348 <tag><clip pos="2" side="sl" part="nbr"/></tag>
349 </tags>
350 <lu>
351 <clip pos="1" side="tl" part="lemh"/>
352 <clip pos="1" side="tl" part="a_det"/>
353 <clip pos="2" side="sl" part="nbr"/>
354 </lu>
355 <b/>
356 <lu>
357 <clip pos="2" side="tl" part="lemh"/>
358 <clip pos="2" side="tl" part="a_nom"/>
359 <clip pos="2" side="tl" part="nbr"/>
360 <clip pos="2" side="tl" part="lemq"/>
361 </lu>
362 <lu>
363 <clip pos="3" side="tl" part="lem"/>
364 <lit-tag v="guio"/>
365 </lu>
366 <lu>
367 <clip pos="4" side="tl" part="lemh"/>
368 <clip pos="4" side="tl" part="a_nom"/>
369 <clip pos="4" side="tl" part="nbr"/>
370 <clip pos="4" side="tl" part="lemq"/>
371 </lu>
372 </chunk>
373 </out>
374 <let>
375 <var n="caseFirstWord"/>
376 <lit v="aa"/>
377 </let>
378 </action>
379 </rule>
384 <rule>
385 <pattern>
386 <pattern-item n="verbm"/>
387 </pattern>
388 <action>
389 <out>
390 <chunk name="modal_verb">
391 <tags>
392 <tag><lit-tag v="V"/></tag>
393 </tags>
394 <lu>
395 <clip pos="1" side="tl" part="lem"/>
396 <clip pos="1" side="tl" part="a_verb"/>
397 <clip pos="1" side="tl" part="temps"/>
398 </lu>
399 </chunk>
400 </out>
401 </action>
402 </rule>
405 <rule>
406 <pattern>
407 <pattern-item n="verbnm"/>
408 </pattern>
409 <action>
410 <out>
411 <chunk name="verb">
412 <tags>
413 <tag><lit-tag v="V"/></tag>
414 </tags>
415 <lu>
416 <clip pos="1" side="tl" part="lem"/>
417 <clip pos="1" side="tl" part="a_verb"/>
418 <clip pos="1" side="tl" part="temps"/>
419 </lu>
420 </chunk>
421 </out>
422 </action>
423 </rule>
425 <rule>
426 <pattern>
427 <pattern-item n="attachable_prefix"/>
428 <pattern-item n="prefix"/>
429 <pattern-item n="verbnm"/>
430 </pattern>
431 <action>
432 <out>
433 <chunk name="verb">
434 <tags>
435 <tag><lit-tag v="V"/></tag>
436 </tags>
437 <lu>
438 <clip pos="3" side="tl" part="lem"/>
439 <clip pos="3" side="tl" part="a_verb"/>
440 <clip pos="2" side="tl" part="temps"/>
441 </lu>
442 </chunk>
443 <b/>
444 <chunk name="atp">
445 <tags>
446 <tag><lit-tag v="PR"/></tag>
447 </tags>
448 <lu>
449 <clip pos="1" side="tl" part="lem"/>
450 <clip pos="1" side="tl" part="a_atp"/>
451 </lu>
452 </chunk>
453 </out>
454 </action>
455 </rule>
460 <rule comment="REGLA: VAUX VBLEX">
461 <pattern>
462 <pattern-item n="verbm"/>
463 <pattern-item n="verbnm"/>
464 </pattern>
465 <action>
466 <out>
467 <chunk name="vaux_vblex">
468 <tags>
469 <tag><lit-tag v="V"/></tag>
470 </tags>
471 <lu>
472 <clip pos="1" side="tl" part="lem"/>
473 <clip pos="1" side="tl" part="a_verb"/>
474 <clip pos="1" side="tl" part="temps"/>
475 </lu>
476 <b/>
477 <lu>
478 <clip pos="2" side="tl" part="lem"/>
479 <clip pos="2" side="tl" part="a_verb"/>
480 <clip pos="2" side="tl" part="temps"/>
481 </lu>
482 </chunk>
483 </out>
484 </action>
485 </rule>
487 <rule comment="REGLA: PR">
488 <pattern>
489 <pattern-item n="prep"/>
490 </pattern>
491 <action>
492 <out>
493 <chunk name="prep">
494 <tags>
495 <tag><lit-tag v="PR"/></tag>
496 </tags>
497 <lu>
498 <clip pos="1" side="tl" part="lem"/>
499 <clip pos="1" side="tl" part="a_prep"/>
500 </lu>
501 </chunk>
502 </out>
503 </action>
504 </rule>
506 <rule comment="REGLA: CNJSUB">
507 <pattern>
508 <pattern-item n="cnjsub"/>
509 </pattern>
510 <action>
511 <out>
512 <chunk name="cnjsub">
513 <tags>
514 <tag><lit-tag v="CNJ"/></tag>
515 <tag><lit-tag v="SUB"/></tag>
516 </tags>
517 <lu>
518 <clip pos="1" side="tl" part="lem"/>
519 <clip pos="1" side="tl" part="a_cnj"/>
520 </lu>
521 </chunk>
522 </out>
523 </action>
524 </rule>
527 <rule comment="REGLA: CNJCOO">
528 <pattern>
529 <pattern-item n="cnjcoo"/>
530 </pattern>
531 <action>
532 <out>
533 <chunk name="cnjcoo">
534 <tags>
535 <tag><lit-tag v="CNJ"/></tag>
536 <tag><lit-tag v="COO"/></tag>
537 </tags>
538 <lu>
539 <clip pos="1" side="tl" part="lem"/>
540 <clip pos="1" side="tl" part="a_cnj"/>
541 </lu>
542 </chunk>
543 </out>
544 </action>
545 </rule>
548 <rule comment="REGLA: CNJADV">
549 <pattern>
550 <pattern-item n="cnjadv"/>
551 </pattern>
552 <action>
553 <out>
554 <chunk name="cnjadv">
555 <tags>
556 <tag><lit-tag v="CNJADV"/></tag>
557 </tags>
558 <lu>
559 <clip pos="1" side="tl" part="lem"/>
560 <clip pos="1" side="tl" part="a_cnj"/>
561 </lu>
562 </chunk>
563 </out>
564 </action>
565 </rule>
567 <rule comment="REGLA: PRPERS">
568 <pattern>
569 <pattern-item n="prpers"/>
570 </pattern>
571 <action>
572 <out>
573 <chunk name="prpers">
574 <tags>
575 <tag><lit-tag v="PRN"/></tag>
576 </tags>
577 <lu>
578 <clip pos="1" side="tl" part="lem"/>
579 <clip pos="1" side="tl" part="tipus_prn"/>
580 <clip pos="1" side="tl" part="pers"/>
581 <clip pos="1" side="tl" part="gen"/>
582 <clip pos="1" side="tl" part="nbr"/>
583 </lu>
584 </chunk>
585 </out>
586 </action>
587 </rule>
589 <rule comment="REGLA: ADJ">
590 <pattern>
591 <pattern-item n="adj"/>
592 </pattern>
593 <action>
594 <out>
595 <chunk name="adj">
596 <tags>
597 <tag><lit-tag v="ADJ"/></tag>
598 </tags>
599 <lu>
600 <clip pos="1" side="tl" part="lem"/>
601 <clip pos="1" side="tl" part="a_adj"/>
602 </lu>
603 </chunk>
604 </out>
605 </action>
606 </rule>
608 <rule comment="REGLA: PREADV">
609 <pattern>
610 <pattern-item n="preadv"/>
611 </pattern>
612 <action>
613 <out>
614 <chunk name="preadv">
615 <tags>
616 <tag><lit-tag v="PREADV"/></tag>
617 </tags>
618 <lu>
619 <clip pos="1" side="tl" part="lem"/>
620 <clip pos="1" side="tl" part="a_preadv"/>
621 </lu>
622 </chunk>
623 </out>
624 </action>
625 </rule>
628 <rule comment="REGLA: ADV">
629 <pattern>
630 <pattern-item n="adv"/>
631 </pattern>
632 <action>
633 <out>
634 <chunk name="adv">
635 <tags>
636 <tag><lit-tag v="ADV"/></tag>
637 </tags>
638 <lu>
639 <clip pos="1" side="tl" part="lem"/>
640 <clip pos="1" side="tl" part="a_adv"/>
641 </lu>
642 </chunk>
643 </out>
644 </action>
645 </rule>
649 <rule comment="REGLA: ADJ NOM">
650 <pattern>
651 <pattern-item n="adj"/>
652 <pattern-item n="nom"/>
653 </pattern>
654 <action>
655 <out>
656 <chunk name="adj_nom">
657 <tags>
658 <tag><lit-tag v="SN"/></tag>
659 </tags>
660 <lu>
661 <clip pos="1" side="tl" part="lem"/>
662 <clip pos="1" side="tl" part="a_adj"/>
663 </lu>
664 <b/>
665 <lu>
666 <clip pos="2" side="tl" part="lem"/>
667 <clip pos="2" side="tl" part="a_nom"/>
668 <clip pos="2" side="tl" part="nbr"/>
669 </lu>
670 </chunk>
671 </out>
672 </action>
673 </rule>
675 <rule comment="REGLA: NUM ADJ NOM">
676 <pattern>
677 <pattern-item n="num"/>
678 <pattern-item n="adj"/>
679 <pattern-item n="nom"/>
680 </pattern>
681 <action>
682 <out>
683 <chunk name="num_adj_nom">
684 <tags>
685 <tag><lit-tag v="SN"/></tag>
686 </tags>
687 <lu>
688 <clip pos="1" side="tl" part="lem"/>
689 <clip pos="1" side="tl" part="a_num"/>
690 <clip pos="1" side="tl" part="nbr"/>
691 </lu>
692 <b/>
693 <lu>
694 <clip pos="2" side="tl" part="lem"/>
695 <clip pos="2" side="tl" part="a_adj"/>
696 </lu>
697 <b/>
698 <lu>
699 <clip pos="3" side="tl" part="lem"/>
700 <clip pos="3" side="tl" part="a_nom"/>
701 <clip pos="3" side="tl" part="nbr"/>
702 </lu>
703 </chunk>
704 </out>
705 </action>
706 </rule>
708 <rule comment="REGLA: NUM NOM">
709 <pattern>
710 <pattern-item n="num"/>
711 <pattern-item n="nom"/>
712 </pattern>
713 <action>
714 <out>
715 <chunk name="num_nom">
716 <tags>
717 <tag><lit-tag v="SN"/></tag>
718 </tags>
719 <lu>
720 <clip pos="1" side="tl" part="lem"/>
721 <clip pos="1" side="tl" part="a_num"/>
722 <clip pos="1" side="tl" part="nbr"/>
723 </lu>
724 <b/>
725 <lu>
726 <clip pos="2" side="tl" part="lem"/>
727 <clip pos="2" side="tl" part="a_nom"/>
728 <clip pos="2" side="tl" part="nbr"/>
729 </lu>
730 </chunk>
731 </out>
732 </action>
733 </rule>
740 <rule>
741 <pattern>
742 <pattern-item n="verbm"/>
743 <pattern-item n="verbnm"/>
744 <pattern-item n="adv"/>
745 </pattern>
746 <action>
747 <out>
748 <chunk name="vaux_vblex_adv">
749 <tags>
750 <tag><lit-tag v="V"/></tag>
751 </tags>
752 <lu>
753 <clip pos="1" side="tl" part="lem"/>
754 <clip pos="1" side="tl" part="a_verb"/>
755 <clip pos="1" side="tl" part="temps"/>
756 </lu>
757 <b/>
758 <lu>
759 <clip pos="2" side="tl" part="lem"/>
760 <clip pos="2" side="tl" part="a_verb"/>
761 <clip pos="2" side="tl" part="temps"/>
762 </lu>
763 <b/>
764 <lu>
765 <clip pos="3" side="tl" part="lem"/>
766 <clip pos="3" side="tl" part="a_adv"/>
767 </lu>
768 </chunk>
769 </out>
770 </action>
771 </rule>
773 <rule comment="PRPERS VBNM"> <!-- In <PRN><VBLEX> constructions, propagate the person / number of
774 the personal pronoun to the verb. -->
775 <pattern>
776 <pattern-item n="prpers"/>
777 <pattern-item n="verbnm"/>
778 </pattern>
779 <action>
780 <choose>
781 <when>
782 <test> <!-- If it is third person singular in the present tense -->
783 <and>
784 <equal>
785 <clip pos="1" side="tl" part="pers"/>
786 <lit-tag v="p3"/>
787 </equal>
788 <equal>
789 <clip pos="2" side="tl" part="temps"/>
790 <lit-tag v="pres"/>
791 </equal>
792 <equal>
793 <clip pos="1" side="tl" part="nbr"/>
794 <lit-tag v="sg"/>
795 </equal>
796 </and>
797 </test>
798 <out>
799 <chunk name="prn_verb">
800 <tags>
801 <tag><lit-tag v="PRN"/></tag>
802 <tag><lit-tag v="V"/></tag>
803 </tags>
804 <lu>
805 <clip pos="1" side="tl" part="lem"/> <!-- Pronoun -->
806 <clip pos="1" side="tl" part="tipus_prn"/>
807 <clip pos="1" side="tl" part="pers"/>
808 <clip pos="1" side="tl" part="gen"/>
809 <clip pos="1" side="tl" part="nbr"/>
810 <lit v="$ ^"/>
811 <clip pos="2" side="tl" part="lem"/> <!-- Verb -->
812 <clip pos="2" side="tl" part="a_verb"/>
813 <lit-tag v="pri"/>
814 <clip pos="1" side="tl" part="pers"/>
815 <clip pos="1" side="tl" part="nbr"/>
816 </lu>
817 </chunk>
818 </out>
819 </when>
820 <when>
821 <test>
822 <equal>
823 <clip pos="2" side="tl" part="temps"/>
824 <lit-tag v="pres"/>
825 </equal>
826 </test>
827 <out>
828 <chunk name="prn_verb">
829 <tags>
830 <tag><lit-tag v="PRN"/></tag>
831 <tag><lit-tag v="V"/></tag>
832 </tags>
833 <lu>
834 <clip pos="1" side="tl" part="lem"/>
835 <clip pos="1" side="tl" part="tipus_prn"/>
836 <clip pos="1" side="tl" part="pers"/>
837 <clip pos="1" side="tl" part="gen"/>
838 <clip pos="1" side="tl" part="nbr"/>
839 <lit v="$ ^"/>
840 <clip pos="2" side="tl" part="lem"/>
841 <clip pos="2" side="tl" part="a_verb"/>
842 <lit-tag v="pres"/>
843 </lu>
844 </chunk>
845 </out>
846 </when>
847 <when>
848 <test> <!-- If it is the past tense of 'be' , [i was, you were, he/she/it was, we were, you were, they were] -->
849 <and> <!-- Check for 'p1.sg' and 'p3.sg' -->
850 <or>
851 <equal>
852 <clip pos="1" side="tl" part="pers"/>
853 <lit-tag v="p1"/>
854 </equal>
855 <equal>
856 <clip pos="1" side="tl" part="pers"/>
857 <lit-tag v="p3"/>
858 </equal>
859 </or>
860 <equal>
861 <clip pos="1" side="tl" part="nbr"/>
862 <lit-tag v="sg"/>
863 </equal>
864 <equal>
865 <clip pos="2" side="tl" part="temps"/>
866 <lit-tag v="past"/>
867 </equal>
868 <equal>
869 <clip pos="2" side="tl" part="lem"/>
870 <lit v="be"/>
871 </equal>
872 </and>
873 </test>
874 <out>
875 <chunk name="prn_verb">
876 <tags>
877 <tag><lit-tag v="PRN"/></tag>
878 <tag><lit-tag v="V"/></tag>
879 </tags>
880 <lu>
881 <clip pos="1" side="tl" part="lem"/> <!-- Pronoun -->
882 <clip pos="1" side="tl" part="tipus_prn"/>
883 <clip pos="1" side="tl" part="pers"/>
884 <clip pos="1" side="tl" part="gen"/>
885 <clip pos="1" side="tl" part="nbr"/>
886 <lit v="$ ^"/>
887 <clip pos="2" side="tl" part="lem"/> <!-- Verb -->
888 <clip pos="2" side="tl" part="a_verb"/>
889 <lit-tag v="past"/>
890 <clip pos="1" side="tl" part="pers"/>
891 <clip pos="1" side="tl" part="nbr"/>
892 </lu>
893 </chunk>
894 </out>
895 </when>
896 <otherwise>
897 <out>
898 <chunk name="prn_verb">
899 <tags>
900 <tag><lit-tag v="PRN"/></tag>
901 <tag><lit-tag v="V"/></tag>
902 </tags>
903 <lu>
904 <clip pos="1" side="tl" part="lem"/>
905 <clip pos="1" side="tl" part="tipus_prn"/>
906 <clip pos="1" side="tl" part="pers"/>
907 <clip pos="1" side="tl" part="gen"/>
908 <clip pos="1" side="tl" part="nbr"/>
909 <lit v="$ ^"/>
910 <clip pos="2" side="tl" part="lem"/>
911 <clip pos="2" side="tl" part="a_verb"/>
912 <clip pos="2" side="tl" part="temps"/>
913 </lu>
914 </chunk>
915 </out>
916 </otherwise>
917 </choose>
918 </action>
919 </rule>
921 <rule> <!-- "nie" at the end of a phrase - remove it. this is a hack-->
922 <pattern>
923 <pattern-item n="adv"/>
924 <pattern-item n="end_punct"/>
925 </pattern>
926 <action>
927 <choose>
928 <when>
929 <test>
930 <equal>
931 <clip pos="1" side="sl" part="lem"/>
932 <lit v="nie"/>
933 </equal>
934 </test>
935 <out>
936 <chunk name="punt">
937 <tags>
938 <tag><lit-tag v="cm"/></tag>
939 </tags>
940 <lu>
941 <clip pos="2" side="tl" part="whole"/>
942 </lu>
943 </chunk>
944 </out>
945 </when>
946 <otherwise>
947 <out>
948 <chunk name="default">
949 <tags>
950 <tag><lit-tag v="adj"/></tag>
951 </tags>
952 <lu>
953 <clip pos="1" side="tl" part="whole"/>
954 <lit v="$ ^"/>
955 <clip pos="2" side="tl" part="whole"/>
956 </lu>
957 </chunk>
958 </out>
959 </otherwise>
960 </choose>
961 </action>
962 </rule>
964 <rule comment="REGLA: DET NOM">
965 <pattern>
966 <pattern-item n="det"/>
967 <pattern-item n="nom"/>
968 </pattern>
969 <action>
970 <choose>
971 <when> <!-- Capitalise 'n at the start of a line, and lowercase the subsequent word, e.g. 'n Album ~ An album -->
972 <test>
973 <and>
974 <equal>
975 <case-of pos="2" side="tl" part="lem"/>
976 <lit v="Aa"/>
977 </equal>
978 <equal>
979 <case-of pos="2" side="tl" part="lem"/>
980 <lit v="Aa"/>
981 </equal>
982 <or>
983 <equal>
984 <clip pos="1" side="tl" part="lem"/>
985 <lit v="a"/>
986 </equal>
987 <equal>
988 <clip pos="1" side="tl" part="lem"/>
989 <lit v="A"/>
990 </equal>
991 </or>
992 </and>
993 </test>
994 <modify-case>
995 <clip pos="1" side="tl" part="lem"/>
996 <case-of pos="2" side="tl" part="lem"/>
997 </modify-case>
998 <modify-case>
999 <clip pos="2" side="tl" part="lem"/>
1000 <lit v="aa"/>
1001 </modify-case>
1002 </when>
1003 </choose>
1004 <out>
1005 <chunk name="det_nom">
1006 <tags>
1007 <tag><lit-tag v="SN"/></tag>
1008 <tag><clip pos="2" side="sl" part="gen"/></tag>
1009 <tag><clip pos="2" side="sl" part="nbr"/></tag>
1010 </tags>
1011 <lu>
1012 <clip pos="1" side="tl" part="lemh"/>
1013 <clip pos="1" side="tl" part="a_det"/>
1014 <clip pos="2" side="sl" part="nbr"/>
1015 </lu>
1016 <b/>
1017 <lu>
1018 <clip pos="2" side="tl" part="lemh"/>
1019 <clip pos="2" side="tl" part="a_nom"/>
1020 <clip pos="2" side="tl" part="nbr"/>
1021 <clip pos="2" side="tl" part="lemq"/>
1022 </lu>
1023 </chunk>
1024 </out>
1025 </action>
1026 </rule>
1028 <rule comment="REGLA: DET NOM GEN">
1029 <pattern>
1030 <pattern-item n="det"/>
1031 <pattern-item n="nom"/>
1032 <pattern-item n="genitive"/>
1033 </pattern>
1034 <action>
1035 <out>
1036 <chunk name="det_nom" case="caseFirstWord">
1037 <tags>
1038 <tag><lit-tag v="SN"/></tag>
1039 <tag><clip pos="2" side="sl" part="gen"/></tag>
1040 <tag><clip pos="2" side="sl" part="nbr"/></tag>
1041 </tags>
1042 <lu>
1043 <clip pos="1" side="tl" part="lemh"/>
1044 <clip pos="1" side="tl" part="a_det"/>
1045 <clip pos="2" side="sl" part="nbr"/>
1046 </lu>
1047 <b/>
1048 <lu>
1049 <clip pos="2" side="tl" part="lemh"/>
1050 <clip pos="2" side="tl" part="a_nom"/>
1051 <clip pos="2" side="tl" part="nbr"/>
1052 <clip pos="2" side="tl" part="lemq"/>
1053 </lu>
1054 <lu>
1055 <clip pos="3" side="tl" part="lemh"/>
1056 <lit-tag v="gen"/>
1057 </lu>
1058 </chunk>
1059 </out>
1060 <let>
1061 <var n="caseFirstWord"/>
1062 <lit v="aa"/>
1063 </let>
1064 </action>
1065 </rule>
1068 <rule comment="REGLA: DET NOM ADJ">
1069 <pattern>
1070 <pattern-item n="det"/>
1071 <pattern-item n="nom"/>
1072 <pattern-item n="adj"/>
1073 </pattern>
1074 <action>
1075 <out>
1076 <chunk name="det_adj_nom" case="caseFirstWord">
1077 <tags>
1078 <tag><lit-tag v="SN"/></tag>
1079 <tag><clip pos="2" side="sl" part="gen"/></tag>
1080 <tag><clip pos="2" side="sl" part="nbr"/></tag>
1081 </tags>
1082 <lu>
1083 <clip pos="1" side="tl" part="lemh"/>
1084 <clip pos="1" side="tl" part="a_det"/>
1085 <clip pos="2" side="sl" part="nbr"/>
1086 </lu>
1087 <b/>
1088 <lu>
1089 <clip pos="3" side="tl" part="lem"/>
1090 <clip pos="3" side="tl" part="a_adj"/>
1091 </lu>
1092 <b/>
1093 <lu>
1094 <clip pos="2" side="tl" part="lemh"/>
1095 <clip pos="2" side="tl" part="a_nom"/>
1096 <clip pos="2" side="tl" part="nbr"/>
1097 <clip pos="2" side="tl" part="lemq"/>
1098 </lu>
1099 </chunk>
1100 </out>
1101 <let>
1102 <var n="caseFirstWord"/>
1103 <lit v="aa"/>
1104 </let>
1105 </action>
1106 </rule>
1109 <rule comment="REGLA: DET ADJ NOM">
1110 <pattern>
1111 <pattern-item n="det"/>
1112 <pattern-item n="adj"/>
1113 <pattern-item n="nom"/>
1114 </pattern>
1115 <action>
1116 <choose>
1117 <when> <!-- Capitalise 'n at the start of a line, and lowercase the subsequent word, e.g. 'n Album ~ An album -->
1118 <test>
1119 <and>
1120 <equal>
1121 <case-of pos="2" side="tl" part="lem"/>
1122 <lit v="Aa"/>
1123 </equal>
1124 <equal>
1125 <case-of pos="2" side="tl" part="lem"/>
1126 <lit v="Aa"/>
1127 </equal>
1128 <equal>
1129 <clip pos="1" side="tl" part="lem"/>
1130 <lit v="a"/>
1131 </equal>
1132 </and>
1133 </test>
1134 <modify-case>
1135 <clip pos="1" side="tl" part="lem"/>
1136 <case-of pos="2" side="tl" part="lem"/>
1137 </modify-case>
1138 <modify-case>
1139 <clip pos="2" side="tl" part="lem"/>
1140 <lit v="aa"/>
1141 </modify-case>
1142 </when>
1143 </choose>
1144 <out>
1145 <chunk name="det_adj_nom" case="caseFirstWord">
1146 <tags>
1147 <tag><lit-tag v="SN"/></tag>
1148 <tag><clip pos="2" side="sl" part="gen"/></tag>
1149 <tag><clip pos="2" side="sl" part="nbr"/></tag>
1150 </tags>
1151 <lu>
1152 <clip pos="1" side="tl" part="lemh"/>
1153 <clip pos="1" side="tl" part="a_det"/>
1154 <clip pos="3" side="sl" part="nbr"/>
1155 </lu>
1156 <b/>
1157 <lu>
1158 <clip pos="2" side="tl" part="lem"/>
1159 <clip pos="2" side="tl" part="a_adj"/>
1160 </lu>
1161 <b/>
1162 <lu>
1163 <clip pos="3" side="tl" part="lemh"/>
1164 <clip pos="3" side="tl" part="a_nom"/>
1165 <clip pos="3" side="tl" part="nbr"/>
1166 <clip pos="3" side="tl" part="lemq"/>
1167 </lu>
1168 </chunk>
1169 </out>
1170 <let>
1171 <var n="caseFirstWord"/>
1172 <lit v="aa"/>
1173 </let>
1174 </action>
1175 </rule>
1178 <rule comment="REGLA: VAUX PRN">
1179 <pattern>
1180 <pattern-item n="verbm"/>
1181 <pattern-item n="prpers"/>
1182 </pattern>
1183 <action>
1184 <out>
1185 <chunk name="prpers" case="caseFirstWord">
1186 <tags>
1187 <tag><lit-tag v="PRN"/></tag>
1188 </tags>
1189 <lu>
1190 <clip pos="2" side="tl" part="lem"/>
1191 <clip pos="2" side="tl" part="tipus_prn"/>
1192 <clip pos="2" side="tl" part="pers"/>
1193 <clip pos="2" side="tl" part="gen"/>
1194 <clip pos="2" side="tl" part="nbr"/>
1195 </lu>
1196 </chunk>
1197 <b/>
1198 <chunk name="verb">
1199 <tags>
1200 <tag><lit-tag v="V"/></tag>
1201 </tags>
1202 <lu>
1203 <clip pos="1" side="tl" part="lem"/>
1204 <clip pos="1" side="tl" part="a_verb"/>
1205 <clip pos="1" side="tl" part="temps"/>
1206 <clip pos="1" side="tl" part="pers"/>
1207 <clip pos="1" side="tl" part="gen"/>
1208 <clip pos="1" side="tl" part="nbr"/>
1209 </lu>
1210 </chunk>
1211 </out>
1212 <let>
1213 <var n="caseFirstWord"/>
1214 <lit v="aa"/>
1215 </let>
1216 </action>
1217 </rule>
1219 <rule comment="REGLA: PRN PR PRN">
1220 <pattern>
1221 <pattern-item n="prn"/>
1222 <pattern-item n="prep"/>
1223 <pattern-item n="prpers"/>
1224 </pattern>
1225 <action>
1226 <out>
1227 <chunk name="det_nom" case="caseFirstWord">
1228 <tags>
1229 <tag><lit-tag v="PRN"/></tag>
1230 <tag><var n="nombre"/></tag>
1231 </tags>
1232 <lu>
1233 <clip pos="1" side="tl" part="lem"/>
1234 <clip pos="1" side="tl" part="tipus_prn"/>
1235 <clip pos="1" side="tl" part="pers"/>
1236 <clip pos="1" side="tl" part="gen"/>
1237 <clip pos="3" side="tl" part="nbr"/>
1238 <clip pos="3" side="tl" part="lemq"/>
1239 </lu>
1240 <b/>
1241 <lu>
1242 <clip pos="2" side="tl" part="lem"/>
1243 <clip pos="1" side="tl" part="a_prep"/>
1244 </lu>
1245 <b/>
1246 <lu>
1247 <clip pos="3" side="tl" part="lem"/>
1248 <clip pos="1" side="tl" part="tipus_prn"/>
1249 <clip pos="1" side="tl" part="pers"/>
1250 <clip pos="1" side="tl" part="gen"/>
1251 <clip pos="3" side="tl" part="nbr"/>
1252 <clip pos="3" side="tl" part="lemq"/>
1253 </lu>
1254 </chunk>
1255 </out>
1256 <let>
1257 <var n="caseFirstWord"/>
1258 <lit v="aa"/>
1259 </let>
1260 </action>
1261 </rule>
1263 <rule>
1264 <pattern>
1265 <pattern-item n="end_punct"/>
1266 </pattern>
1267 <action>
1268 <out>
1269 <chunk name="punct">
1270 <tags>
1271 <tag><lit-tag v="punct"/></tag>
1272 </tags>
1273 <lu>
1274 <clip pos="1" side="tl" part="whole"/>
1275 </lu>
1276 </chunk>
1277 </out>
1278 </action>
1279 </rule>
1281 <rule>
1282 <pattern>
1283 <pattern-item n="prefix"/>
1284 <pattern-item n="verbnm"/>
1285 </pattern>
1286 <action>
1287 <out>
1288 <chunk name="verb_participle">
1289 <tags>
1290 <tag><lit-tag v="V"/></tag>
1291 </tags>
1292 <lu>
1293 <clip pos="2" side="tl" part="lem"/>
1294 <clip pos="2" side="tl" part="a_verb"/>
1295 <clip pos="1" side="tl" part="temps"/>
1296 </lu>
1297 </chunk>
1298 </out>
1299 </action>
1300 </rule>
1302 <rule> <!-- REGLA: reset variables-->
1303 <pattern>
1304 <pattern-item n="sent"/>
1305 </pattern>
1306 <action>
1307 <let>
1308 <var n="nombre"/>
1309 <lit-tag v="sg"/>
1310 </let>
1311 <let>
1312 <var n="genere"/>
1313 <lit-tag v="m"/>
1314 </let>
1315 <out>
1316 <chunk name="punt">
1317 <tags>
1318 <tag><lit-tag v="sent"/></tag>
1319 </tags>
1320 <lu>
1321 <clip pos="1" side="tl" part="whole"/>
1322 </lu>
1323 </chunk>
1324 </out>
1326 </action>
1327 </rule>
1329 </section-rules>
1331 </transfer>