Anoter
[apertium.git] / apertium-en-ca / apertium-en-ca.ca-en.t3x
blobfe288a37a1027de7923c13822882e50bc6b3c299
1 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
2 <postchunk>
3 <section-def-cats>
6 <def-cat n="inf">
7 <cat-item name="inf"/>
8 </def-cat>
10 <!-- <def-cat n="SV">
11 <cat-item name="verbcj"/>
12 <cat-item name="aux_verb"/>
13 <cat-item name="haver_pp"/>
14 <cat-item name="aux_haver_pp"/>
15 <cat-item name="inf"/>
16 </def-cat> -->
19 <def-cat n="verbcj">
20 <cat-item name="verbcj"/>
21 </def-cat>
23 <def-cat n="aux_verb">
24 <cat-item name="aux_verb"/>
25 </def-cat>
27 <def-cat n="haver_pp">
28 <cat-item name="haver_pp"/>
29 </def-cat>
31 <def-cat n="aux_haver_pp">
32 <cat-item name="aux_haver_pp"/>
33 </def-cat>
35 <def-cat n="be_adj">
36 <cat-item name="be_adj"/>
37 </def-cat>
39 <def-cat n="haverhi">
40 <cat-item name="haverhi"/>
41 </def-cat>
43 <def-cat n="haverhi_pp">
44 <cat-item name="haverhi_pp"/>
45 </def-cat>
47 <def-cat n="aux_haverhi">
48 <cat-item name="aux_haverhi"/>
49 </def-cat>
51 <def-cat n="aux_haverhi_pp">
52 <cat-item name="aux_haverhi_pp"/>
53 </def-cat>
55 <def-cat n="SUBJ">
56 <cat-item name="subj"/>
57 </def-cat>
60 </section-def-cats>
62 <section-def-attrs>
64 <def-attr n="pers">
65 <attr-item tags="p1"/>
66 <attr-item tags="p2"/>
67 <attr-item tags="p3"/>
68 <attr-item tags="PD"/>
69 </def-attr>
71 <def-attr n="gen">
72 <attr-item tags="m"/>
73 <attr-item tags="f"/>
74 <attr-item tags="mf"/>
75 <attr-item tags="GD"/>
76 <attr-item tags="nt"/>
77 </def-attr>
79 <def-attr n="nbr">
80 <attr-item tags="sg"/>
81 <attr-item tags="pl"/>
82 <attr-item tags="sp"/>
83 <attr-item tags="ND"/>
84 </def-attr>
87 <def-attr n="a_verb">
88 <attr-item tags="vblex"/>
89 <attr-item tags="vbser"/>
90 <attr-item tags="vbhaver"/>
91 <attr-item tags="vbmod"/>
92 <attr-item tags="vaux"/>
93 </def-attr>
96 <def-attr n="temps">
97 <attr-item tags="inf"/>
98 <attr-item tags="pres"/>
99 <attr-item tags="past"/>
100 <attr-item tags="pri"/>
101 <attr-item tags="prs"/>
102 <attr-item tags="imp"/>
103 <attr-item tags="pii"/>
104 <attr-item tags="cni"/>
105 <attr-item tags="ifi"/>
106 <attr-item tags="pis"/>
107 <attr-item tags="pp"/>
108 <attr-item tags="ger"/>
109 <attr-item tags="pprs"/>
110 <attr-item tags="subs"/>
111 <attr-item tags="fti"/>
113 </def-attr>
115 <def-attr n="a_SV">
116 <attr-item tags="SVneg"/>
117 <attr-item tags="SV"/>
118 </def-attr>
121 </section-def-attrs>
122 <section-def-vars>
123 <def-var n="paraula"/>
124 <def-var n="temps_aux"/>
125 </section-def-vars>
128 <section-rules>
130 <!--REGLES PER A NEGACIONS (I ADVERBIS INTERCALATS) -->
132 <rule comment="CHUNK: HAVER_PP">
133 <pattern>
134 <pattern-item n="haver_pp"/>
135 </pattern>
136 <action>
137 <choose>
138 <when>
139 <test>
140 <equal>
141 <clip pos="0" part="a_SV"/>
142 <lit-tag v="SVneg"/>
143 </equal>
144 </test>
145 <out>
146 <lu>
147 <clip pos="1" part="whole"/>
148 </lu>
149 <b pos="1"/>
150 <lu>
151 <lit v="not"/>
152 <lit-tag v="adv"/>
153 </lu>
154 <b/>
155 <lu>
156 <clip pos="2" part="whole"/>
157 </lu>
158 </out>
159 </when>
160 <otherwise>
161 <out>
162 <lu>
163 <clip pos="1" part="whole"/>
164 </lu>
165 <b pos="1"/>
166 <lu>
167 <clip pos="2" part="whole"/>
168 </lu>
169 </out>
170 </otherwise>
171 </choose>
172 </action>
173 </rule>
176 <rule comment="CHUNK: AUX VERB">
177 <pattern>
178 <pattern-item n="aux_verb"/>
179 </pattern>
180 <action>
181 <choose>
182 <when>
183 <test>
184 <equal>
185 <clip pos="0" part="a_SV"/>
186 <lit-tag v="SVneg"/>
187 </equal>
188 </test>
189 <out>
190 <lu>
191 <clip pos="1" part="whole"/>
192 </lu>
193 <b pos="1"/>
194 <lu>
195 <lit v="not"/>
196 <lit-tag v="adv"/>
197 </lu>
198 <b/>
199 <lu>
200 <clip pos="2" part="whole"/>
201 </lu>
202 </out>
203 </when>
204 <otherwise>
205 <out>
206 <lu>
207 <clip pos="1" part="whole"/>
208 </lu>
209 <b pos="1"/>
210 <lu>
211 <clip pos="2" part="whole"/>
212 </lu>
213 </out>
214 </otherwise>
215 </choose>
216 </action>
217 </rule>
219 <rule comment="CHUNK: AUX HAVER PP">
220 <pattern>
221 <pattern-item n="aux_haver_pp"/>
222 </pattern>
223 <action>
224 <choose>
225 <when>
226 <test>
227 <equal>
228 <clip pos="0" part="a_SV"/>
229 <lit-tag v="SVneg"/>
230 </equal>
231 </test>
232 <out>
233 <lu>
234 <clip pos="1" part="whole"/>
235 </lu>
236 <b pos="1"/>
237 <lu>
238 <lit v="not"/>
239 <lit-tag v="adv"/>
240 </lu>
241 <b pos="2"/>
242 <lu>
243 <clip pos="2" part="whole"/>
244 </lu>
245 <b/>
246 <lu>
247 <clip pos="3" part="whole"/>
248 </lu>
249 </out>
250 </when>
251 <otherwise>
252 <out>
253 <lu>
254 <clip pos="1" part="whole"/>
255 </lu>
256 <b pos="1"/>
257 <lu>
258 <clip pos="2" part="whole"/>
259 </lu>
260 <b pos="2"/>
261 <lu>
262 <clip pos="3" part="whole"/>
263 </lu>
264 </out>
265 </otherwise>
266 </choose>
267 </action>
268 </rule>
270 <rule comment="CHUNK: VERB CONJUGAT">
271 <pattern>
272 <pattern-item n="verbcj"/>
273 </pattern>
274 <action>
275 <choose>
276 <when>
277 <test>
278 <equal>
279 <clip pos="0" part="a_SV"/>
280 <lit-tag v="SVneg"/>
281 </equal>
282 </test>
283 <choose>
284 <when>
285 <test>
286 <or>
287 <equal>
288 <clip pos="0" part="a_verb"/>
289 <lit-tag v="vbser"/>
290 </equal>
291 <equal>
292 <clip pos="0" part="a_verb"/>
293 <lit-tag v="vaux"/>
294 </equal>
295 </or>
296 </test>
297 <out>
298 <lu>
299 <clip pos="1" part="whole"/>
300 </lu>
301 <b/>
302 <lu>
303 <lit v="not"/>
304 <lit-tag v="adv"/>
305 </lu>
306 </out>
307 </when>
308 <otherwise>
309 <choose>
310 <when>
311 <test>
312 <and>
313 <equal>
314 <clip pos="0" part="temps"/>
315 <lit-tag v="pri"/>
316 </equal>
317 <equal>
318 <clip pos="0" part="pers"/>
319 <lit-tag v="p3"/>
320 </equal>
321 <equal>
322 <clip pos="0" part="nbr"/>
323 <lit-tag v="sg"/>
324 </equal>
325 </and>
326 </test>
327 <let>
328 <var n="temps_aux"/>
329 <lit-tag v="pri.p3.sg"/>
330 </let>
331 <let>
332 <clip pos="1" part="temps"/>
333 <lit-tag v="inf"/>
334 </let>
335 <let>
336 <clip pos="1" part="pers"/>
337 <lit v=""/>
338 </let>
339 <let>
340 <clip pos="1" part="nbr"/>
341 <lit v=""/>
342 </let>
343 </when>
344 <when>
345 <test>
346 <or>
347 <equal>
348 <clip pos="0" part="temps"/>
349 <lit-tag v="pri"/>
350 </equal>
351 <equal>
352 <clip pos="0" part="temps"/>
353 <lit-tag v="prs"/>
354 </equal>
355 <equal>
356 <clip pos="0" part="temps"/>
357 <lit-tag v="imp"/>
358 </equal>
359 </or>
360 </test>
361 <let>
362 <var n="temps_aux"/>
363 <lit-tag v="pres"/>
364 </let>
365 </when>
366 <when>
367 <test>
368 <or>
369 <equal>
370 <clip pos="0" part="temps"/>
371 <lit-tag v="cni"/>
372 </equal>
373 <equal>
374 <clip pos="0" part="temps"/>
375 <lit-tag v="ifi"/>
376 </equal>
377 <equal>
378 <clip pos="0" part="temps"/>
379 <lit-tag v="pii"/>
380 </equal>
381 <equal>
382 <clip pos="0" part="temps"/>
383 <lit-tag v="pis"/>
384 </equal>
385 <equal>
386 <clip pos="0" part="temps"/>
387 <lit-tag v="past"/>
388 </equal>
389 </or>
390 </test>
391 <let>
392 <var n="temps_aux"/>
393 <lit-tag v="past"/>
394 </let>
395 <let>
396 <clip pos="1" part="temps"/>
397 <lit-tag v="inf"/>
398 </let>
399 </when>
400 </choose>
401 <out>
402 <lu>
403 <get-case-from pos="1">
404 <lit v="do"/>
405 </get-case-from>
406 <lit-tag v="vbdo"/>
407 <var n="temps_aux"/>
408 </lu>
409 <b/>
410 <lu>
411 <lit v="not"/>
412 <lit-tag v="adv"/>
413 </lu>
414 <b/>
415 </out>
416 <choose>
417 <when>
418 <test>
419 <equal>
420 <case-of pos="1" part="lem"/>
421 <lit v="Aa"/>
422 </equal>
423 </test>
424 <modify-case>
425 <clip pos="1" part="lem"/>
426 <lit v="aa"/>
427 </modify-case>
428 </when>
429 </choose>
430 <out>
431 <lu>
432 <clip pos="1" part="whole"/>
433 </lu>
434 </out>
435 </otherwise>
436 </choose>
437 </when>
438 <otherwise>
439 <out>
440 <lu>
441 <clip pos="1" part="whole"/>
442 </lu>
443 </out>
444 </otherwise>
445 </choose>
446 </action>
447 </rule>
449 <!-- <rule comment="CHUNK: AUX HAVER PP">
450 <pattern>
451 <pattern-item n="be_adj"/>
452 </pattern>
453 <action>
454 <choose>
455 <when>
456 <test>
457 <equal>
458 <clip pos="0" part="neg"/>
459 <lit-tag v="NEG"/>
460 </equal>
461 </test>
462 <out>
463 <lu>
464 <clip pos="1" part="lemh"/>
465 <clip pos="1" part="a_verb"/>
466 <clip pos="1" part="temps"/>
467 <clip pos="1" part="pers"/>
468 <clip pos="1" part="nbr"/>
469 </lu>
470 <b/>
471 <lu>
472 <lit v="not"/>
473 <lit-tag v="adv"/>
474 <clip pos="1" part="lemq"/>
475 </lu>
476 </out>
477 </when>
478 <otherwise>
479 <out>
480 <lu>
481 <clip pos="1" part="whole"/>
482 </lu>
483 </out>
484 </otherwise>
485 </choose>
486 </action>
487 </rule> -->
489 <rule comment="CHUNK: SUBJ">
490 <pattern>
491 <pattern-item n="SUBJ"/>
492 </pattern>
493 <action>
494 <choose>
495 <when>
496 <test>
497 <and>
498 <equal>
499 <clip pos="1" part="pers"/>
500 <lit-tag v="p3"/>
501 </equal>
502 <equal>
503 <clip pos="1" part="nbr"/>
504 <lit-tag v="sg"/>
505 </equal>
506 </and>
507 </test>
508 <let>
509 <clip pos="1" part="gen"/>
510 <lit-tag v="nt"/>
511 </let>
512 </when>
513 <when>
514 <test>
515 <equal>
516 <clip pos="1" part="pers"/>
517 <lit-tag v="p2"/>
518 </equal>
519 </test>
520 <let>
521 <clip pos="1" part="nbr"/>
522 <lit-tag v="sp"/>
523 </let>
524 <let>
525 <clip pos="1" part="gen"/>
526 <lit-tag v="mf"/>
527 </let>
528 </when>
529 <otherwise>
530 <let>
531 <clip pos="1" part="gen"/>
532 <lit-tag v="mf"/>
533 </let>
534 </otherwise>
535 </choose>
536 <out>
537 <lu>
538 <clip pos="1" part="whole"/>
539 </lu>
540 </out>
541 </action>
542 </rule>
546 <rule comment="CHUNK: HAVER-HI">
547 <pattern>
548 <pattern-item n="haverhi"/>
549 </pattern>
550 <action>
551 <choose><!--Si en el t2x s'ha posat nombre pl, cal canviar manera d'enviar verb perquè no doni error (sense persona ni nombre, coses del diccionari) -->
552 <when>
553 <test>
554 <and>
555 <equal>
556 <clip pos="0" part="temps"/>
557 <lit-tag v="pri"/>
558 </equal>
559 <equal>
560 <clip pos="0" part="nbr"/>
561 <lit-tag v="pl"/>
562 </equal>
563 </and>
564 </test>
565 <out>
566 <lu>
567 <clip pos="1" part="whole"/>
568 </lu>
569 <b pos="1"/>
570 <lu>
571 <clip pos="2" part="lem"/>
572 <clip pos="2" part="a_verb"/>
573 <lit-tag v="pres"/>
574 </lu>
575 </out>
576 </when>
577 <when>
578 <test>
579 <and>
580 <equal>
581 <clip pos="0" part="temps"/>
582 <lit-tag v="past"/>
583 </equal>
584 <equal>
585 <clip pos="0" part="nbr"/>
586 <lit-tag v="pl"/>
587 </equal>
588 </and>
589 </test>
590 <out>
591 <lu>
592 <clip pos="1" part="whole"/>
593 </lu>
594 <b pos="1"/>
595 <lu>
596 <clip pos="2" part="lem"/>
597 <clip pos="2" part="a_verb"/>
598 <clip pos="2" part="temps"/>
599 </lu>
600 </out>
601 </when>
602 <otherwise>
603 <out>
604 <lu>
605 <clip pos="1" part="whole"/>
606 </lu>
607 <b pos="1"/>
608 <lu>
609 <clip pos="2" part="whole"/>
610 </lu>
611 </out>
612 </otherwise>
613 </choose>
614 <choose>
615 <when>
616 <test>
617 <equal>
618 <clip pos="0" part="a_SV"/>
619 <lit-tag v="SVneg"/>
620 </equal>
621 </test>
622 <out>
623 <b/>
624 <lu>
625 <lit v="not"/>
626 <lit-tag v="adv"/>
627 </lu>
628 </out>
629 </when>
630 </choose>
631 <choose>
632 <when><!--segons si porta aux o no, pot haver-hi una tercera lu, envia-la si hi és -->
633 <test>
634 <or>
635 <equal>
636 <clip pos="0" part="temps"/>
637 <lit-tag v="cni"/>
638 </equal>
639 <equal>
640 <clip pos="0" part="temps"/>
641 <lit-tag v="fti"/>
642 </equal>
643 </or>
644 </test>
645 <out>
646 <b pos="2"/>
647 <lu>
648 <clip pos="3" part="whole"/>
649 </lu>
650 </out>
651 </when>
652 </choose>
653 </action>
654 </rule>
656 <rule comment="CHUNK: HAVER-HI">
657 <pattern>
658 <pattern-item n="haverhi_pp"/>
659 </pattern>
660 <action>
661 <choose><!--Si en el t2x s'ha posat nombre pl, cal canviar manera d'enviar verb perquè no doni error (sense persona ni nombre, coses del diccionari) -->
662 <when>
663 <test>
664 <and>
665 <equal>
666 <clip pos="0" part="nbr"/>
667 <lit-tag v="pl"/>
668 </equal>
669 <equal>
670 <clip pos="0" part="temps"/>
671 <lit-tag v="pri"/>
672 </equal>
673 </and>
674 </test>
675 <out>
676 <lu>
677 <clip pos="1" part="whole"/>
678 </lu>
679 <b pos="1"/>
680 <lu>
681 <clip pos="2" part="lem"/>
682 <clip pos="2" part="a_verb"/>
683 <lit-tag v="pres"/>
684 </lu>
685 <b pos="2"/>
686 </out>
687 </when>
688 <when>
689 <test>
690 <and>
691 <equal>
692 <clip pos="0" part="nbr"/>
693 <lit-tag v="pl"/>
694 </equal>
695 <equal>
696 <clip pos="0" part="temps"/>
697 <lit-tag v="past"/>
698 </equal>
699 </and>
700 </test>
701 <out>
702 <lu>
703 <clip pos="1" part="whole"/>
704 </lu>
705 <b pos="1"/>
706 <lu>
707 <clip pos="2" part="lem"/>
708 <clip pos="2" part="a_verb"/>
709 <clip pos="2" part="temps"/>
710 </lu>
711 <b pos="2"/>
712 </out>
713 </when>
715 <otherwise>
716 <out>
717 <lu>
718 <clip pos="1" part="whole"/>
719 </lu>
720 <b pos="1"/>
721 <lu>
722 <clip pos="2" part="whole"/>
723 </lu>
724 <b pos="2"/>
725 </out>
726 </otherwise>
727 </choose>
728 <choose><!--si és negatiu, imprimeix el 'not', sempre en 2a posició, tant si porta aux com no (there would have been, there has not been). -->
729 <when>
730 <test>
731 <equal>
732 <clip pos="0" part="a_SV"/>
733 <lit-tag v="SVneg"/>
734 </equal>
735 </test>
736 <out>
737 <lu>
738 <lit v="not"/>
739 <lit-tag v="adv"/>
740 </lu>
741 <b/>
742 </out>
743 </when>
744 </choose>
745 <out><!--el tercer chunk sempre hi és -->
746 <lu>
747 <clip pos="3" part="whole"/>
748 </lu>
749 </out>
750 <choose>
751 <when><!--segons si porta aux o no, pot haver-hi una quarta lu, envia-la si hi és -->
752 <test>
753 <or>
754 <equal>
755 <clip pos="0" part="temps"/>
756 <lit-tag v="cni"/>
757 </equal>
758 <equal>
759 <clip pos="0" part="temps"/>
760 <lit-tag v="fti"/>
761 </equal>
762 </or>
763 </test>
764 <out>
765 <b pos="3"/>
766 <lu>
767 <clip pos="4" part="whole"/>
768 </lu>
769 </out>
770 </when>
771 </choose>
772 </action>
773 </rule>
777 </section-rules>
778 </postchunk>