Adding a few more things
[apertium.git] / apertium-eu-es / apertium-eu-es.eu-es.t3x
blobf6b1f3ea41b0c85ff1f8025b0e3de3e2ed621c1f
1 <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- nxml -*- -->
2 <postchunk>
3 <section-def-cats>
6 <def-cat n="det_adj">
7 <cat-item name="det_adj"/>
8 </def-cat>
10 <def-cat n="det_pp">
11 <cat-item name="det_pp"/>
12 </def-cat>
15 <def-cat n="adj_grado">
16 <cat-item name="d_adv_adj"/>
17 </def-cat>
20 <def-cat n="SP2">
21 <cat-item name="pr_nom"/>
22 <cat-item name="pr_prn"/>
23 <cat-item name="pr_num"/>
24 <cat-item name="pr_det"/>
25 <cat-item name="pr_inf"/>
26 </def-cat>
28 <def-cat n="SP3">
29 <cat-item name="pr_det_nom"/>
30 <cat-item name="pr_adj_nom"/>
31 <cat-item name="pr_nom_adj"/>
32 <cat-item name="pr_det_pp"/>
33 <cat-item name="pr_pos_n"/>
34 <cat-item name="pr_num_n"/>
35 </def-cat>
37 <def-cat n="SP4">
38 <cat-item name="pr_det_adj_nom"/>
39 <cat-item name="pr_det_nom_adj"/>
40 <cat-item name="pr_d_num_n"/>
41 <cat-item name="pr_pos_adj_n"/>
42 <cat-item name="pr_pos_n_adj"/>
43 <cat-item name="pr_nom_cj_nom"/>
44 <cat-item name="pr_num_num_n"/>
45 <cat-item name="pr_nom_pr_nom"/>
46 </def-cat>
48 <def-cat n="SP5">
49 <cat-item name="pr_det_adj_nom_adj"/>
50 <cat-item name="pr_det_nom_adj_adj"/>
51 <cat-item name="pr_d_n_pr_n"/>
52 <cat-item name="pr_a_n_pr_n"/>
53 <cat-item name="pr_n_pr_n_a"/>
54 <cat-item name="pr_d_num_adj_n"/>
55 <cat-item name="pr_d_num_n_adj"/>
56 <cat-item name="pr_nom_nom_cj_nom"/>
57 <cat-item name="pr_d_num_num_n"/>
58 <cat-item name="pr_d_adj_num_n"/>
59 <cat-item name="pr_num_pr_d_n"/>
60 </def-cat>
62 <def-cat n="SP6">
63 <cat-item name="pr_d_n_pr_d_n"/>
64 <cat-item name="pr_d_num_pr_d_n"/>
65 <cat-item name="pr_d_n_pr_pos_n"/>
66 <cat-item name="pr_d_a_num_num_n"/>
67 <cat-item name="pr_d_num_num_n_a"/>
68 <cat-item name="pr_d_num_num_adj_n"/>
69 <cat-item name="pr_d_a_n_pr_n"/>
70 <cat-item name="pr_d_n_pr_n_a"/>
71 </def-cat>
73 <def-cat n="SP7">
74 <cat-item name="pr_d_a_n_pr_d_n"/>
75 <cat-item name="pr_d_n_a_pr_d_n"/>
76 </def-cat>
79 <def-cat n="SP8">
80 <cat-item name="pr_d_n_pr_d_n_pr_n"/>
81 </def-cat>
83 <def-cat n="SP9">
84 <cat-item name="pr_d_n_pr_d_n_pr_d_n"/>
85 </def-cat>
89 </section-def-cats>
91 <section-def-attrs>
93 <def-attr n="pers">
94 <attr-item tags="p1"/>
95 <attr-item tags="p2"/>
96 <attr-item tags="p3"/>
97 <attr-item tags="PD"/>
98 </def-attr>
100 <def-attr n="gen">
101 <attr-item tags="m"/>
102 <attr-item tags="f"/>
103 <attr-item tags="mf"/>
104 <attr-item tags="GD"/>
105 <attr-item tags="nt"/>
106 </def-attr>
108 <def-attr n="nbr">
109 <attr-item tags="sg"/>
110 <attr-item tags="pl"/>
111 <attr-item tags="sp"/>
112 <attr-item tags="ND"/>
113 </def-attr>
116 <def-attr n="temps">
117 <attr-item tags="inf"/>
118 <attr-item tags="pres"/>
119 <attr-item tags="past"/>
120 <attr-item tags="pri"/>
121 <attr-item tags="pp"/>
122 <attr-item tags="ger"/>
123 <attr-item tags="pprs"/>
124 <attr-item tags="subs"/>
125 </def-attr>
127 <def-attr n="tipus_det">
128 <attr-item tags="art"/>
129 <attr-item tags="def"/>
130 <attr-item tags="ind"/>
131 <attr-item tags="dem"/>
132 </def-attr>
134 <def-attr n="a_SP">
135 <attr-item tags="SPGEN"/>
136 <attr-item tags="SP"/>
137 <attr-item tags="SPR-SN"/>
138 </def-attr>
140 <def-attr n="pr">
141 <attr-item tags="pr"/>
142 </def-attr>
143 </section-def-attrs>
145 <section-def-vars>
146 <def-var n="genere"/>
147 </section-def-vars>
151 <section-def-macros>
153 <def-macro n="f_bcond" npar="1">
154 <choose>
155 <when>
156 <test>
157 <not>
158 <equal>
159 <b pos="1"/>
160 <lit v=" "/>
161 </equal>
162 </not>
163 </test>
164 <out>
165 <b pos="1"/>
166 </out>
167 </when>
168 </choose>
169 </def-macro>
171 </section-def-macros>
173 <section-rules>
175 <rule comment="CHUNK: SA"><!-- Si el SA va determinado con 'art' i no ha entrado por ninguna regla del t2x que lo haga definido, se imprimirá sin artículo ('etxea gorria da' - 'la casa es roja' -->
176 <pattern>
177 <pattern-item n="det_adj"/>
178 </pattern>
179 <action>
180 <choose>
181 <when>
182 <test>
183 <and>
184 <equal>
185 <clip pos="0" part="tipus_det"/>
186 <lit-tag v="art"/>
187 </equal>
188 <not><!--que el adjetivo (post2) no haya sido traducido por un det ind -->
189 <equal>
190 <clip pos="2" part="tipus_det"/>
191 <lit-tag v="ind"/>
192 </equal>
193 </not>
194 </and>
195 </test>
196 <call-macro n="f_bcond">
197 <with-param pos="1"/>
198 </call-macro>
199 <out>
200 <lu>
201 <clip pos="2" part="whole"/>
202 </lu>
203 </out>
204 </when>
205 <otherwise><!--imprimir los dos (det i adj) y cambiar det art por det def -->
206 <choose>
207 <when>
208 <test>
209 <equal>
210 <clip pos="0" part="tipus_det"/>
211 <lit-tag v="art"/>
212 </equal>
213 </test>
214 <let>
215 <clip pos="1" part="tipus_det"/>
216 <lit-tag v="def"/>
217 </let>
218 </when>
219 </choose>
220 <out>
221 <lu>
222 <clip pos="1" part="whole"/>
223 </lu>
224 <b pos="1"/>
225 <lu>
226 <clip pos="2" part="whole"/>
227 </lu>
228 </out>
229 </otherwise>
230 </choose>
231 </action>
232 </rule>
235 <rule comment="CHUNK: SA"><!-- Si el SA va determinado con 'art' i no ha entrado por ninguna regla del t2x que lo haga definido, se imprimirá sin artículo ('etxea gorria da' - 'la casa es roja' -->
236 <pattern>
237 <pattern-item n="det_pp"/>
238 </pattern>
239 <action>
240 <choose>
241 <when>
242 <test>
243 <and>
244 <equal>
245 <clip pos="0" part="tipus_det"/>
246 <lit-tag v="art"/>
247 </equal>
248 <not><!--que el adjetivo (post2) no haya sido traducido por un det ind -->
249 <equal>
250 <clip pos="2" part="tipus_det"/>
251 <lit-tag v="ind"/>
252 </equal>
253 </not>
254 </and>
255 </test>
256 <call-macro n="f_bcond">
257 <with-param pos="1"/>
258 </call-macro>
259 <out>
260 <lu>
261 <clip pos="2" part="whole"/>
262 </lu>
263 </out>
264 </when>
265 <otherwise><!--imprimir los dos (det i adj) y cambiar det art por det def -->
266 <choose>
267 <when>
268 <test>
269 <equal>
270 <clip pos="0" part="tipus_det"/>
271 <lit-tag v="art"/>
272 </equal>
273 </test>
274 <let>
275 <clip pos="1" part="tipus_det"/>
276 <lit-tag v="def"/>
277 </let>
278 </when>
279 </choose>
280 <out>
281 <lu>
282 <clip pos="1" part="whole"/>
283 </lu>
284 <b pos="1"/>
285 <lu>
286 <clip pos="2" part="whole"/>
287 </lu>
288 </out>
289 </otherwise>
290 </choose>
291 </action>
292 </rule>
294 <rule comment="CHUNK: SA con grado"><!-- Si el SA va determinado con 'art' i no ha entrado por ninguna regla del t2x que lo haga definido, se imprimirá sin artículo ('etxea gorriagoa da' - 'la casa es roja') excepto 'gorriena' -->
295 <pattern>
296 <pattern-item n="adj_grado"/>
297 </pattern>
298 <action>
299 <choose>
300 <when>
301 <test>
302 <equal>
303 <clip pos="0" part="tipus_det"/>
304 <lit-tag v="art"/>
305 </equal>
306 </test>
307 <call-macro n="f_bcond">
308 <with-param pos="1"/>
309 </call-macro>
310 <out>
311 <lu>
312 <clip pos="2" part="whole"/>
313 </lu>
314 <b pos="2"/>
315 <lu>
316 <clip pos="3" part="whole"/>
317 </lu>
318 </out>
319 </when>
320 <otherwise>
321 <out>
322 <lu>
323 <clip pos="1" part="whole"/>
324 </lu>
325 <b pos="1"/>
326 <lu>
327 <clip pos="2" part="whole"/>
328 </lu>
329 <b pos="2"/>
330 <lu>
331 <clip pos="3" part="whole"/>
332 </lu>
333 </out>
334 </otherwise>
335 </choose>
336 </action>
337 </rule>
339 <!--*********REGLAS PARA QUITAR PREPOSICIÓN 'de' DE SINTAGMAS PREPOSICINOALES ******************* -->
342 <rule>
343 <pattern>
344 <pattern-item n="SP3"/>
345 </pattern>
346 <action>
347 <choose>
348 <when>
349 <test>
350 <not>
351 <equal>
352 <clip pos="0" part="a_SP"/>
353 <lit-tag v="SPR-SN"/>
354 </equal>
355 </not>
356 </test>
357 <out>
358 <lu>
359 <clip pos="1" part="whole"/>
360 </lu>
361 <b pos="1"/>
362 </out>
363 </when>
364 <otherwise>
365 <call-macro n="f_bcond">
366 <with-param pos="1"/>
367 </call-macro>
368 </otherwise>
369 </choose>
370 <out>
371 <lu>
372 <clip pos="2" part="whole"/>
373 </lu>
374 </out>
375 <choose><!--envía el 3r chunk si el 1o era una preposición. Si no lo era, es que se trataba de un chunk de solo 2 FL (ex.: zigorrak - la sanción (k=ergativo)) -->
376 <when>
377 <test>
378 <not>
379 <equal>
380 <clip pos="1" part="pr"/>
381 <lit v=""/>
382 </equal>
383 </not>
384 </test>
385 <out>
386 <b pos="2"/>
387 <lu>
388 <clip pos="3" part="whole"/>
389 </lu>
390 </out>
391 </when>
392 </choose>
393 </action>
394 </rule>
396 <rule>
397 <pattern>
398 <pattern-item n="SP2"/>
399 </pattern>
400 <action>
401 <choose>
402 <when>
403 <test>
404 <not>
405 <equal>
406 <clip pos="0" part="a_SP"/>
407 <lit-tag v="SPR-SN"/>
408 </equal>
409 </not>
410 </test>
411 <out>
412 <lu>
413 <clip pos="1" part="whole"/>
414 </lu>
415 </out>
416 </when>
417 </choose>
418 <choose>
419 <when>
420 <test>
421 <not>
422 <equal>
423 <clip pos="1" part="pr"/>
424 <lit v=""/>
425 </equal>
426 </not>
427 </test>
428 <out>
429 <b pos="1"/>
430 <lu>
431 <clip pos="2" part="whole"/>
432 </lu>
433 </out>
434 </when>
435 </choose>
436 </action>
437 </rule>
439 <rule>
440 <pattern>
441 <pattern-item n="SP4"/>
442 </pattern>
443 <action>
444 <choose>
445 <when>
446 <test>
447 <not>
448 <equal>
449 <clip pos="0" part="a_SP"/>
450 <lit-tag v="SPR-SN"/>
451 </equal>
452 </not>
453 </test>
454 <out>
455 <lu>
456 <clip pos="1" part="whole"/>
457 </lu>
458 <b pos="1"/>
459 </out>
460 </when>
461 <otherwise>
462 <call-macro n="f_bcond">
463 <with-param pos="1"/>
464 </call-macro>
465 </otherwise>
466 </choose>
467 <out>
468 <lu>
469 <clip pos="2" part="whole"/>
470 </lu>
471 <b pos="2"/>
472 <lu>
473 <clip pos="3" part="whole"/>
474 </lu>
475 </out>
476 <choose>
477 <when>
478 <test>
479 <not>
480 <equal>
481 <clip pos="1" part="pr"/>
482 <lit v=""/>
483 </equal>
484 </not>
485 </test>
486 <out>
487 <b pos="3"/>
488 <lu>
489 <clip pos="4" part="whole"/>
490 </lu>
491 </out>
492 </when>
493 </choose>
494 </action>
495 </rule>
497 <rule>
498 <pattern>
499 <pattern-item n="SP5"/>
500 </pattern>
501 <action>
502 <choose>
503 <when>
504 <test>
505 <not>
506 <equal>
507 <clip pos="0" part="a_SP"/>
508 <lit-tag v="SPR-SN"/>
509 </equal>
510 </not>
511 </test>
512 <out>
513 <lu>
514 <clip pos="1" part="whole"/>
515 </lu>
516 <b pos="1"/>
517 </out>
518 </when>
519 <otherwise>
520 <call-macro n="f_bcond">
521 <with-param pos="1"/>
522 </call-macro>
523 </otherwise>
524 </choose>
525 <out>
526 <lu>
527 <clip pos="2" part="whole"/>
528 </lu>
529 <b pos="2"/>
530 <lu>
531 <clip pos="3" part="whole"/>
532 </lu>
533 <b pos="3"/>
534 <lu>
535 <clip pos="4" part="whole"/>
536 </lu>
537 </out>
538 <choose>
539 <when>
540 <test>
541 <not>
542 <equal>
543 <clip pos="1" part="pr"/>
544 <lit v=""/>
545 </equal>
546 </not>
547 </test>
548 <out>
549 <b pos="4"/>
550 <lu>
551 <clip pos="5" part="whole"/>
552 </lu>
553 </out>
554 </when>
555 </choose>
556 </action>
557 </rule>
559 <rule>
560 <pattern>
561 <pattern-item n="SP6"/>
562 </pattern>
563 <action>
564 <choose>
565 <when>
566 <test>
567 <not>
568 <equal>
569 <clip pos="0" part="a_SP"/>
570 <lit-tag v="SPR-SN"/>
571 </equal>
572 </not>
573 </test>
574 <out>
575 <lu>
576 <clip pos="1" part="whole"/>
577 </lu>
578 <b pos="1"/>
579 </out>
580 </when>
581 <otherwise>
582 <call-macro n="f_bcond">
583 <with-param pos="1"/>
584 </call-macro>
585 </otherwise>
586 </choose>
587 <out>
588 <lu>
589 <clip pos="2" part="whole"/>
590 </lu>
591 <b pos="2"/>
592 <lu>
593 <clip pos="3" part="whole"/>
594 </lu>
595 <b pos="3"/>
596 <lu>
597 <clip pos="4" part="whole"/>
598 </lu>
599 <b pos="4"/>
600 <lu>
601 <clip pos="5" part="whole"/>
602 </lu>
603 </out>
604 <choose>
605 <when>
606 <test>
607 <not>
608 <equal>
609 <clip pos="1" part="pr"/>
610 <lit v=""/>
611 </equal>
612 </not>
613 </test>
614 <out>
615 <b pos="5"/>
616 <lu>
617 <clip pos="6" part="whole"/>
618 </lu>
619 </out>
620 </when>
621 </choose>
622 </action>
623 </rule>
625 <rule>
626 <pattern>
627 <pattern-item n="SP8"/>
628 </pattern>
629 <action>
630 <choose>
631 <when>
632 <test>
633 <not>
634 <equal>
635 <clip pos="0" part="a_SP"/>
636 <lit-tag v="SPR-SN"/>
637 </equal>
638 </not>
639 </test>
640 <out>
641 <lu>
642 <clip pos="1" part="whole"/>
643 </lu>
644 <b pos="1"/>
645 </out>
646 </when>
647 <otherwise>
648 <call-macro n="f_bcond">
649 <with-param pos="1"/>
650 </call-macro>
651 </otherwise>
652 </choose>
653 <out>
654 <lu>
655 <clip pos="2" part="whole"/>
656 </lu>
657 <b pos="2"/>
658 <lu>
659 <clip pos="3" part="whole"/>
660 </lu>
661 <b pos="3"/>
662 <lu>
663 <clip pos="4" part="whole"/>
664 </lu>
665 <b pos="4"/>
666 <lu>
667 <clip pos="5" part="whole"/>
668 </lu>
669 <b pos="5"/>
670 <lu>
671 <clip pos="6" part="whole"/>
672 </lu>
673 <b pos="6"/>
674 <lu>
675 <clip pos="7" part="whole"/>
676 </lu>
677 </out>
678 <choose>
679 <when>
680 <test>
681 <not>
682 <equal>
683 <clip pos="1" part="pr"/>
684 <lit v=""/>
685 </equal>
686 </not>
687 </test>
688 <out>
689 <b pos="7"/>
690 <lu>
691 <clip pos="8" part="whole"/>
692 </lu>
693 </out>
694 </when>
695 </choose>
696 </action>
697 </rule>
700 <rule>
701 <pattern>
702 <pattern-item n="SP9"/>
703 </pattern>
704 <action>
705 <choose>
706 <when>
707 <test>
708 <not>
709 <equal>
710 <clip pos="0" part="a_SP"/>
711 <lit-tag v="SPR-SN"/>
712 </equal>
713 </not>
714 </test>
715 <out>
716 <lu>
717 <clip pos="1" part="whole"/>
718 </lu>
719 <b pos="1"/>
720 </out>
721 </when>
722 <otherwise>
723 <call-macro n="f_bcond">
724 <with-param pos="1"/>
725 </call-macro>
726 </otherwise>
727 </choose>
728 <out>
729 <lu>
730 <clip pos="2" part="whole"/>
731 </lu>
732 <b pos="2"/>
733 <lu>
734 <clip pos="3" part="whole"/>
735 </lu>
736 <b pos="3"/>
737 <lu>
738 <clip pos="4" part="whole"/>
739 </lu>
740 <b pos="4"/>
741 <lu>
742 <clip pos="5" part="whole"/>
743 </lu>
744 <b pos="5"/>
745 <lu>
746 <clip pos="6" part="whole"/>
747 </lu>
748 <b pos="6"/>
749 <lu>
750 <clip pos="7" part="whole"/>
751 </lu>
752 <b pos="7"/>
753 <lu>
754 <clip pos="8" part="whole"/>
755 </lu>
756 </out>
757 <choose>
758 <when>
759 <test>
760 <not>
761 <equal>
762 <clip pos="1" part="pr"/>
763 <lit v=""/>
764 </equal>
765 </not>
766 </test>
767 <out>
768 <b pos="8"/>
769 <lu>
770 <clip pos="9" part="whole"/>
771 </lu>
772 </out>
773 </when>
774 </choose>
775 </action>
776 </rule>
778 <rule>
779 <pattern>
780 <pattern-item n="SP7"/>
781 </pattern>
782 <action>
783 <choose>
784 <when>
785 <test>
786 <not>
787 <equal>
788 <clip pos="0" part="a_SP"/>
789 <lit-tag v="SPR-SN"/>
790 </equal>
791 </not>
792 </test>
793 <out>
794 <lu>
795 <clip pos="1" part="whole"/>
796 </lu>
797 <b pos="1"/>
798 </out>
799 </when>
800 <otherwise>
801 <call-macro n="f_bcond">
802 <with-param pos="1"/>
803 </call-macro>
804 </otherwise>
805 </choose>
806 <out>
807 <lu>
808 <clip pos="2" part="whole"/>
809 </lu>
810 <b pos="2"/>
811 <lu>
812 <clip pos="3" part="whole"/>
813 </lu>
814 <b pos="3"/>
815 <lu>
816 <clip pos="4" part="whole"/>
817 </lu>
818 <b pos="4"/>
819 <lu>
820 <clip pos="5" part="whole"/>
821 </lu>
822 <b pos="5"/>
823 <lu>
824 <clip pos="6" part="whole"/>
825 </lu>
826 </out>
827 <choose>
828 <when>
829 <test>
830 <not>
831 <equal>
832 <clip pos="1" part="pr"/>
833 <lit v=""/>
834 </equal>
835 </not>
836 </test>
837 <out>
838 <b pos="6"/>
839 <lu>
840 <clip pos="7" part="whole"/>
841 </lu>
842 </out>
843 </when>
844 </choose>
845 </action>
846 </rule>
849 </section-rules>
850 </postchunk>