Few more
[apertium.git] / apertium-en-ca / apertium-en-ca.trules-en-ca.xml
blob8a6107527b1711537e0d126d48cacc9e70e17d4c
1 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
2 <transfer>
3 <section-def-cats>
4 <def-cat n="nom">
5           <cat-item tags="n.*"/>
6           <cat-item tags="np.*"/>
7      </def-cat>
9 <def-cat n="adj">
10           <cat-item tags="adj"/>
11           <cat-item tags="adj.comp"/> 
12           <cat-item tags="adj.sup"/> 
13           <cat-item tags="adj.pos"/>
14           <cat-item tags="adj.sint"/>
15           <cat-item tags="adj.sint.*"/>
16 <!--      <cat-item tags="adj.sint.comp"/>
17           <cat-item tags="adj.sint.sup"/> -->
18      </def-cat>
20 <def-cat n="adj2"><!--revisar regles amb 'adj' i 'adj2' -->
21           <cat-item tags="adj"/>
22           <cat-item tags="adj.sint"/>
23           <cat-item tags="adj.sint.*"/>
24           <cat-item tags="adj.comp"/>
25           <cat-item tags="adj.sup"/>
26      </def-cat> 
28 <def-cat n="num">
29           <cat-item tags="num.*"/>
30           
31 </def-cat>
33 <def-cat n="det"><!--Determinants i predeterminants, van anteposats en català -->
34           <cat-item tags="det.dem.*"/>
35           <cat-item tags="det.ind.*"/>
36           <cat-item tags="det.def.*"/>
37           <cat-item tags="det.pos.*"/>
38           <cat-item tags="det.qnt.*"/>
39           <cat-item tags="det.itg.*"/>
40           <cat-item tags="det.ord.*"/>
41         <!--  <cat-item tags="num.*"/> -->
42           <cat-item tags="predet.*"/>
43      </def-cat>
45 <def-cat n="det2"><!--Poden anar precedits d'un altre determinant i anar després d'un genitiu saxó -->
46           <cat-item tags="det.qnt.*"/>
47           <cat-item tags="det.ord.*"/>
48      </def-cat>
50 <def-cat n="prep">
51           <cat-item tags="pr"/>
52      </def-cat>
54 <def-cat n="probj">
55           <cat-item tags="prn.obj.*"/>
56      </def-cat>
58 <def-cat n="prsubj">
59           <cat-item tags="prn.subj.*"/>
60      </def-cat>
62 <def-cat n="tn_itg">
63           <cat-item tags="prn.tn.*"/>
64           <cat-item tags="prn.itg.*"/>
65      </def-cat>
66 <def-cat n="prnpos">
67           <cat-item tags="prn.pos.*"/>
68      </def-cat>
69 <def-cat n="verbcj">
70 <!--      <cat-item tags="vblex.inf"/>-->
71           <cat-item tags="vblex.pres"/>
72           <cat-item tags="vblex.past"/>
73           <cat-item tags="vblex.past.*"/><!--Per a la forma 'was' en el verb lèxic -->
74           <cat-item tags="vblex.pri.*"/>
76           <cat-item tags="vblex.sep.pres"/>
77           <cat-item tags="vblex.sep.past"/>
78           <cat-item tags="vblex.sep.past.*"/>
79           <cat-item tags="vblex.sep.pri.*"/>
81 <!--      <cat-item tags="vbser.inf"/> -->
82           <cat-item tags="vbser.pres"/>
83           <cat-item tags="vbser.past"/>
84           <cat-item tags="vbser.past.*"/>
85           <cat-item tags="vbser.pri.*"/>
86 <!--      <cat-item tags="vbhaver.inf"/> -->
87           <cat-item tags="vbhaver.pres"/><!--afegit 29/08, per quan es cola per aquesta regla un vbhaver mal desambiguat -->
88           <cat-item tags="vbhaver.past"/>
89           <cat-item tags="vbhaver.pri.*"/>
90           <cat-item lemma="can" tags="vaux.*"/><!--perquè quan vagi sol entri per aquesta regla (I can, workers can) -->
91          <!-- <cat-item tags="vbhaver.*"/> -->
92           
93 </def-cat>
95 <def-cat n="inf">
96   <cat-item tags="vblex.inf"/>
97   <cat-item tags="vblex.sep.inf"/>
98   <cat-item tags="vbser.inf"/>
99   <cat-item tags="vbmod.inf"/>
100   <cat-item tags="vaux.inf"/>
101 </def-cat>
103 <def-cat n="infpres">
104   <cat-item tags="vblex.inf"/>
105   <cat-item tags="vblex.pres"/><!--De moment detectem tb aquest a l'espera de veure si el tagger els distingeix. Canviar-ho més endavant si de cas. -->
106    <cat-item tags="vblex.sep.inf"/>
107   <cat-item tags="vblex.sep.pres"/>
108   <cat-item tags="vbser.inf"/><!--afegit 4/08 -->
109   <cat-item tags="vbser.pres"/><!--afegit 4/08 -->
110 </def-cat>
113 <def-cat n="modinf"><!--Verbs modals (have to, want to, be able to), que van seguits d'infinitiu (com els auxiliars) i es conjuguen (will have to, will be able to). A diferència, els auxiliars  no poden portar altres aux davant (*I will can, I do not can) : 'have to', 'want to'-->
114           <cat-item tags="vbmod.inf"/>
115           <cat-item tags="vbmod.pres"/><!--De moment detectem tb aquest a l'espera de veure si el tagger els distingeix -->
116 </def-cat>
118 <def-cat n="mod"><!--Verbs modals (have to, want to, be able to), que van seguits d'infinitiu (com els auxiliars) i es conjuguen (will have to, will be able to). A diferència, els auxiliars no poden portar altres aux davant (*I will can, I do not can). Per això els poso en categories diferents, perquè funcionen diferent amb negacions, adverbis intercalats, preguntes, etc. -->
119           <cat-item tags="vbmod.*"/>
120 </def-cat>
122 <def-cat n="ger">
123   <cat-item tags="vblex.ger"/>
124   <cat-item tags="vblex.sep.ger"/>
125   <cat-item tags="vbser.ger"/>
126 </def-cat>
128 <def-cat n="aux"><!-- will, would, can, do (must, should, ought to, may, might, shall -->
129           <cat-item tags="vaux.*"/>
130           <cat-item lemma="do" tags="vbdo.*"/>
131           <cat-item lemma="do" tags="vblex.*"/><!--MG: ATENCIÓ, només per ara perquè el tagger s'equivoca. -->
132 </def-cat>
135 <def-cat n="auxnocan"><!-- will, would,may, might, do (must, should, ought to, may, might, shall -->
136           <cat-item lemma ="will" tags="vaux.*"/>
137           <cat-item lemma ="would" tags="vaux.*"/>
138           <cat-item lemma ="may" tags="vaux.*"/>
139           <cat-item lemma ="might" tags="vaux.*"/>
140           <cat-item lemma="do" tags="vbdo.*"/>
141           <cat-item lemma="do" tags="vblex.*"/><!--MG: ATENCIÓ, només per ara perquè el tagger s'equivoca. -->
142 </def-cat>
144 <def-cat n="have_aux">
145   <cat-item tags="vbhaver.*"/>
146 </def-cat>
148 <def-cat n="ppadj"><!--Participis que poden actuar com a adjectius (el verb 'ser' va aquí?) -->
149   <cat-item tags="vblex.pp"/>
150   <cat-item tags="vblex.sep.pp"/>
151   <cat-item tags="vbser.pp"/>
152 </def-cat>
154 <def-cat n="pp">
155   <cat-item tags="vblex.pp"/>
156   <cat-item tags="vblex.sep.pp"/>
157   <cat-item tags="vbser.pp"/>
158   <cat-item tags="vbmod.pp"/>
159 </def-cat>
161 <def-cat n="pprs">
162   <cat-item tags="vblex.pprs"/>
163   <cat-item tags="vblex.sep.pprs"/>
164   <cat-item tags="vbhaver.pprs"/>
165   <cat-item tags="vbser.pprs"/>
166   <cat-item tags="vbmod.pprs"/>
167 </def-cat>
169 <def-cat n="vbsubs">
170   <cat-item tags="vblex.subs"/>
171   <cat-item tags="vblex.sep.subs"/>
172   <cat-item tags="vbhaver.subs"/>
173   <cat-item tags="vbser.subs"/>
174   <cat-item tags="vbmod.subs"/>
175 </def-cat>
177 <def-cat n="adv">
178           <cat-item tags="preadv"/>
179           <cat-item tags="adv"/>
180 </def-cat>
181 <def-cat n="preadv">
182           <cat-item tags="preadv"/>
183 </def-cat>
184 <def-cat n="such_a">
185   <cat-item lemma="such a" tags="det.ind.sg"/>
186 </def-cat>
188 <def-cat n="genitiu">
189           <cat-item tags="gen"/>
190 </def-cat>
192 <def-cat n="be">
193   <cat-item lemma="be" tags="vbser.*"/>
194 </def-cat>
197 <def-cat n="sent">
198   <cat-item tags="sent"/>
199 </def-cat>
201 <def-cat n="guio">
202   <cat-item tags="guio"/>
203 </def-cat>
205 <!--Marta-->
206 <def-cat n="cnjcoo">
207   <cat-item lemma="and" tags="cnjcoo"/>
208 </def-cat>
209 <def-cat n="to">
210   <cat-item lemma="to" tags="pr"/>
211 </def-cat>
215 </section-def-cats>
216 <section-def-attrs>
217      <def-attr n="a_nom">
218           <attr-item tags="n"/>
219           <attr-item tags="n.acr"/>
220           <attr-item tags="np.loc"/>
221           <attr-item tags="np.ant"/>
222           <attr-item tags="np.cog"/>
223           <attr-item tags="np.al"/>       
224      </def-attr>
226  <def-attr n="a_np">
227           <attr-item tags="np"/>
228      </def-attr>
230  <def-attr n="a_adj">          
231           <attr-item tags="adj"/>
232           <attr-item tags="adj.pos"/>
233      </def-attr>  
236  <def-attr n="grau_adj">          
237           <attr-item tags="comp"/>
238           <attr-item tags="sup"/>
239      </def-attr>  
241 <def-attr n="a_det">
242           <attr-item tags="det.dem"/>
243           <attr-item tags="det.ind"/>
244           <attr-item tags="det.def"/>
245           <attr-item tags="det.pos"/>
246           <attr-item tags="det.qnt"/>
247           <attr-item tags="det.itg"/>            
248           <attr-item tags="det.ord"/>
249           <attr-item tags="adj.pos"/>
250           <attr-item tags="num"/>
251           <attr-item tags="predet"/>
252 </def-attr>
253 <def-attr n="a_num">
254           <attr-item tags="num"/>
255 </def-attr>
257 <def-attr n="a_verb">
258           <attr-item tags="vblex"/>       
259           <attr-item tags="vblex.pron"/>
260           <attr-item tags="vbhaver"/>
261           <attr-item tags="vbser"/>
262           <attr-item tags="vbmod"/>
263 </def-attr>
265 <def-attr n="a_have_aux">
266           <attr-item tags="vbhaver"/>
267 </def-attr>
269 <def-attr n="a_pp">
270           <attr-item tags="vblex.pp"/>
271           <attr-item tags="vblex.pron.pp"/>
272           <attr-item tags="vbser.pp"/>
273           <attr-item tags="vbmod.pp"/>
274 </def-attr>
277 <def-attr n="a_aux">
278           <attr-item tags="vaux"/>
279 </def-attr>
281 <def-attr n="a_tn_itg">
282           <attr-item tags="prn.tn"/>
283           <attr-item tags="prn.itg"/>
284 </def-attr>
285 <def-attr n="a_prnpos">
286           <attr-item tags="prn.pos"/>
287 </def-attr>
289 <def-attr n="tipus_prn">
290           <attr-item tags="prn.subj"/>
291           <attr-item tags="prn.obj"/>
292 </def-attr>
293 <def-attr n="pers">
294           <attr-item tags="p1"/>
295           <attr-item tags="p2"/>
296           <attr-item tags="p3"/>
297 </def-attr>
299       <def-attr n="gen">
300           <attr-item tags="m"/>
301           <attr-item tags="f"/>
302           <attr-item tags="mf"/>
303           <attr-item tags="GD"/>
304           <attr-item tags="nt"/>
305       </def-attr>
307    <def-attr n="nbr">
308           <attr-item tags="sg"/>
309           <attr-item tags="pl"/>
310           <attr-item tags="sp"/>
311           <attr-item tags="ND"/>
312       </def-attr>
314       <def-attr n="temps">
315           <attr-item tags="inf"/>
316           <attr-item tags="pres"/>
317           <attr-item tags="past"/>
318           <attr-item tags="pri"/>
319           <attr-item tags="pp"/>
320           <attr-item tags="ger"/>
321           <attr-item tags="pprs"/>
322           <attr-item tags="subs"/>
323       </def-attr>
324       
325   
327 </section-def-attrs>
328 <section-def-vars>
329       <def-var n="uno"/>
330       <def-var n="genere"/>
331       <def-var n="nombre"/>
332       <def-var n="concDet"/>
333       <def-var n="concAdj"/>
334       <def-var n="concPrimero"/>
335       <def-var n="concSegundo"/>
336       <def-var n="concTercero"/>
337       <def-var n="interrogativa"/>
338       <def-var n="exclamativa"/>
339       <def-var n="adjectiu"/>
340 </section-def-vars>
342    
343 <section-def-macros>
345 <def-macro n="genere_nombre" npar="1">
346  <choose><!--To determine value of variables of gender and
347                  number and propagate to other rules.  Variables are
348                  not used again in this rule -->
349           <when> 
350             <test>
351               <equal>
352                 <clip pos="1" side="tl" part="gen"/>
353                 <lit-tag v="m"/>
354               </equal>
355             </test>
356             <let><var n="genere"/><lit-tag v="m"/></let>
357           </when>
358           <when>
359             <test>
360               <equal>
361                 <clip pos="1" side="tl" part="gen"/>
362                 <lit-tag v="f"/>
363               </equal>
364             </test>
365             <let><var n="genere"/><lit-tag v="f"/></let>
366           </when>
367         </choose> 
368         <choose>
369           <when> 
370             <test>
371               <equal>
372                 <clip pos="1" side="tl" part="nbr"/>
373                 <lit-tag v="sg"/>
374               </equal>
375             </test>
376             <let><var n="nombre"/><lit-tag v="sg"/></let>
377           </when>
378           <when>
379             <test>
380               <equal>
381                 <clip pos="1" side="tl" part="nbr"/>
382                 <lit-tag v="pl"/>
383               </equal>
384             </test>
385             <let><var n="nombre"/><lit-tag v="pl"/></let>
386           </when>
387         </choose> 
388 </def-macro>
390 <!-- <def-macro n="inici_nombre">      NO FUNCIONA SENSE PARÀMETRES
391   <choose>
392     <when>
393       <test>
394         <equal>
395           <var n="nombre"/>
396           <lit v=""/>
397         </equal>
398       </test>
399       <let>
400         <var n="nombre"/>
401         <lit-tag v="sg"/>
402       </let>
403     </when>
404   </choose>
405 </def-macro> -->
407 <def-macro n="f_bcond" npar="1"><!--Per mirar si el blanc conté o no format. Cal posar aquesta funció en les regles en què desaparegui alguna paraula, per tal de decidir si el blanc de la paraula eliminada s'ha d'eliminar o conservar. Si conté format cal conservar-la, si no en conté cal eliminar-la perquè no apareguin dos espais seguits. -->
408         <choose>
409           <when>
410             <test>
411               <not>
412                 <equal>
413                   <b pos="1"/>
414                   <lit v=" "/>
415                 </equal>
416               </not>
417             </test>
418             <out>
419               <b pos="1"/>
420             </out>
421           </when>           
422         </choose>
423      </def-macro>
425 <def-macro n="maj_nom_envia" npar="2"><!--Quan hi ha canvi de posició del nom, pq agafi la majúscula corresponent excepte si es tracta d'un nom propi. MG: revisar on cal posar-la i on no -->
426     <choose>
427       <when>
428         <test>
429             <equal>
430               <clip pos="2" side="tl" part="a_np"/>
431               <lit-tag v="np"/>
432             </equal>
433         </test>
434         <out> 
435           <lu>
436             <clip pos="2" side="tl" part="lemh"/> 
437             <clip pos="2" side="tl" part="a_nom"/>
438             <clip pos="2" side="tl" part="gen"/>
439             <clip pos="2" side="tl" part="nbr"/>
440             <clip pos="2" side="tl" part="lemq"/> 
441           </lu>
442         </out>
443       </when>
444       <otherwise>
445         <out> 
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="gen"/>
450               <clip pos="2" side="tl" part="nbr"/>
451               <clip pos="2" side="tl" part="lemq"/> 
452             </lu>
453         </out>
454       </otherwise>
455     </choose>
456   </def-macro>
458 <def-macro n="maj_adj" npar="2"><!--Falla en "against British food: contra Menjar britànic. Caldria que si és un gentilici no mantingui la majúscula.-->
459   <choose>
460     <when>
461       <test>
462         <equal>
463           <case-of pos="2" side="sl" part="lem"/>
464           <lit v="aa"/>
465         </equal>
466       </test>
467       <modify-case>
468         <clip pos="1" side="tl" part="lem"/>
469         <lit v="aa"/>
470       </modify-case>
471     </when>
472   </choose>
473 </def-macro>
475 <def-macro n="million" npar="1">
476   <choose>
477           <when> 
478             <test>
479                 <equal caseless="yes">
480                   <clip pos="1" side="tl" part="lem"/>
481                   <lit v="milió"/>
482                 </equal>
483             </test>
484             <let>
485               <clip pos="1" side="tl" part="lem"/>
486               <lit v="milió de"/>
487             </let>
488           </when>
489           <when> 
490             <test>
491                 <equal caseless="yes">
492                   <clip pos="1" side="tl" part="lem"/>
493                   <lit v="un milió"/>
494                 </equal>
495             </test>
496             <let>
497               <clip pos="1" side="tl" part="lem"/>
498               <lit v="un milió de"/>
499             </let>
500           </when>
501   </choose>
502   
503 </def-macro>
506 <def-macro n="flexio_numerals" npar="2">
507   <choose>
508     <when>
509       <test>
510         <equal>
511           <clip pos="1" side="tl" part="gen"/>
512           <lit-tag v="GD"/>
513         </equal>
514       </test>   
515         <let>
516           <clip pos="1" side="tl" part="gen"/>
517           <clip pos="2" side="tl" part="gen"/>
518         </let>
519       </when>
520     </choose>
521 </def-macro>
524 <def-macro n="det_no" npar="2"><!--No cars -> cap cotxe (canvia nombre del nom de pl a sg) -->
526   <choose>
527     <when> 
528       <test>
529         <and>
530           <equal caseless="yes">
531             <clip pos="1" side="sl" part="lem"/>
532             <lit v="no"/>
533           </equal>
534           <equal>
535             <clip pos="2" side="sl" part="nbr"/>
536             <lit-tag v="pl"/>
537           </equal>
538         </and>
539       </test>
540       <let>
541         <clip pos="2" side="tl" part="nbr"/>
542         <lit-tag v="sg"/>
543       </let>
544     </when>
545   </choose>
547 </def-macro>
549 <def-macro n="envia_adj" npar="2"><!--per a afegir adverbi 'més' en adjs comparatius. 1er paràmetre=adjectiu, 2n paràmetre=nom amb què concorda. -->
550   <choose>
551     <when>
552       <test>
553         <or>
554           <equal>
555             <clip pos="1" side="sl" part="grau_adj"/>
556             <lit-tag v="comp"/>
557           </equal>
558           <equal>
559             <clip pos="1" side="sl" part="grau_adj"/>
560             <lit-tag v="sup"/>
561           </equal>
562         </or>     
563       </test>
564       <choose>
565         <when>
566           <test>
567             <not>
568               <or>
569                 <equal caseless="yes">
570                   <clip pos="1" side="sl" part="lem"/>
571                   <lit v="good"/>
572                 </equal>
573                 <equal caseless="yes">
574                   <clip pos="1" side="sl" part="lem"/>
575                   <lit v="bad"/>
576                 </equal>
577               </or>
578             </not>
579           </test>
580           <out>
581             <lu>
582               <lit v="més"/>
583               <lit-tag v="preadv"/>
584             </lu>
585             <b/>
586           </out>
587         </when>
588       </choose>
589     </when>
590   </choose>
591   <out>
592     <lu>  
593       <clip pos="1" side="tl" part="lem"/> 
594       <clip pos="1" side="tl" part="a_adj"/>
595       <clip pos="2" side="tl" part="gen"/>
596       <clip pos="2" side="tl" part="nbr"/>
597     </lu>
598   </out>
599 </def-macro>
601 <def-macro n="comparatiu" npar="1"><!--per a afegir adverbi 'més' en adjs comparatius. 1er paràmetre=adjectiu, 2n paràmetre=nom amb què concorda. -->
602   <let>
603     <var n="adjectiu"/>
604     <lit v=""/>
605   </let>
606   <choose>
607     <when>
608       <test>
609         <or>
610           <equal>
611             <clip pos="1" side="sl" part="grau_adj"/>
612             <lit-tag v="comp"/>
613           </equal>
614           <equal>
615             <clip pos="1" side="sl" part="grau_adj"/>
616             <lit-tag v="sup"/>
617           </equal>
618         </or>     
619       </test>
620       <choose>
621         <when>
622           <test>
623             <not>
624               <or>
625                 <equal caseless="yes">
626                   <clip pos="1" side="sl" part="lem"/>
627                   <lit v="good"/>
628                 </equal>
629                 <equal caseless="yes">
630                   <clip pos="1" side="sl" part="lem"/>
631                   <lit v="bad"/>
632                 </equal>
633               </or>
634             </not>
635           </test>
636            <append n="adjectiu">
637               <lit v="més"/>
638               <lit-tag v="preadv"/>
639               <lit v="$ ^"/>
640             <!--  <clip pos="1" side="tl" part="lem"/>  -->
641           </append>       
642         </when>
643       </choose>
644     </when>
645     <otherwise>
646       <append n="adjectiu">
647         <lit v=""/>
648 <!--clip pos="1" side="tl" part="lem"/>  -->
649       </append>
650     </otherwise>
651   </choose>
652 </def-macro>
654 </section-def-macros>
656 <section-rules>
658 <!--********************************* REGLES DE SN ***************************************************** -->
660  <rule> <!-- REGLA: ADJ NOM -->
661       <pattern>
662         <pattern-item n="adj"/>
663         <pattern-item n="nom"/>
664       </pattern>
665       <action>
666         <call-macro n="genere_nombre">
667           <with-param pos="2"/>
668         </call-macro>
669         <call-macro n="maj_adj">
670           <with-param pos="1"/>
671           <with-param pos="2"/>
672         </call-macro>   
673         <call-macro n="maj_nom_envia">
674           <with-param pos="1"/>
675           <with-param pos="2"/>
676         </call-macro>
677         <call-macro n="comparatiu">
678           <with-param pos="1"/>
679         </call-macro>
680         <out> 
681           <b pos="1"/>
682           <lu>  
683             <var n="adjectiu"/> 
684             <clip pos="1" side="tl" part="lem"/>
685             <clip pos="1" side="tl" part="a_adj"/>
686             <clip pos="2" side="tl" part="gen"/>
687             <clip pos="2" side="tl" part="nbr"/>
688           </lu> 
690         </out> 
691 <!--    <call-macro n="envia_adj">
692           <with-param pos="1"/>
693           <with-param pos="2"/>
694         </call-macro> -->           
695        </action>
696      </rule> 
700 <rule> <!-- REGLA: NOM TO INF => NOM DE INF Marta -->
701       <pattern>
702         <pattern-item n="nom"/>
703         <pattern-item n="to"/>
704         <pattern-item n="inf"/>
705       </pattern>
706       <action>
707          <call-macro n="genere_nombre">
708           <with-param pos="1"/>
709         </call-macro>
710         <out>
711         <lu>
712               <clip pos="1" side="tl" part="lemh"/>
713               <clip pos="1" side="tl" part="a_nom"/>
714               <clip pos="1" side="tl" part="gen"/>
715               <clip pos="1" side="tl" part="nbr"/>
716               <clip pos="1" side="tl" part="lemq"/>
717             </lu>
718           </out>
719           <out>             
720             <b pos="1"/>
721           <lu>
722             <lit v="de"/>
723             <lit-tag v="pr"/>
724           </lu>
725             <b pos="2"/>
726             <lu>   
727               <clip pos="3" side="tl" part="whole"/> 
728             </lu> 
729           </out>
730        </action>
731      </rule>
733 <rule> <!-- REGLA: DET NOM TO INF => DET NOM DE INF Marta -->
734       <pattern>
735         <pattern-item n="det"/>
736         <pattern-item n="nom"/>
737         <pattern-item n="to"/>
738         <pattern-item n="inf"/>
739       </pattern>
740       <action>
741          <call-macro n="genere_nombre">
742           <with-param pos="2"/>
743         </call-macro>
744         <call-macro n="det_no">
745           <with-param pos="1"/>
746           <with-param pos="2"/>
747         </call-macro>
748           <out>
749             <lu>
750               <clip pos="1" side="tl" part="lem"/>
751               <clip pos="1" side="tl" part="a_det"/>
752               <clip pos="2" side="tl" part="gen"/>
753               <clip pos="2" side="tl" part="nbr"/>
754             </lu>
755             <b pos="1"/>
756             <lu>
757               <clip pos="2" side="tl" part="lemh"/>
758               <clip pos="2" side="tl" part="a_nom"/>
759               <clip pos="2" side="tl" part="gen"/>
760               <clip pos="2" side="tl" part="nbr"/>
761               <clip pos="2" side="tl" part="lemq"/>
762             </lu>
763           </out>
764           <out>             
765             <b pos="2"/>
766           <lu>
767             <lit v="de"/>
768             <lit-tag v="pr"/>
769           </lu>
770             <b pos="3"/>
771             <lu>   
772               <clip pos="4" side="tl" part="whole"/> 
773             </lu> 
774           </out>
775        </action>
776      </rule>
778 <rule> <!-- REGLA: DET ADJ NOM TO INF => DET ADJ NOM DE INF Marta -->
779       <pattern>
780         <pattern-item n="det"/>
781         <pattern-item n="adj"/>
782         <pattern-item n="nom"/>
783         <pattern-item n="to"/>
784         <pattern-item n="inf"/>
785       </pattern>
786       <action>
787          <call-macro n="genere_nombre">
788           <with-param pos="3"/>
789         </call-macro>
790         <call-macro n="det_no">
791           <with-param pos="1"/>
792           <with-param pos="3"/>
793         </call-macro>
794           <out>
795             <lu>
796               <clip pos="1" side="tl" part="lem"/>
797               <clip pos="1" side="tl" part="a_det"/>
798               <clip pos="3" side="tl" part="gen"/>
799               <clip pos="3" side="tl" part="nbr"/>
800             </lu>
801             <b pos="1"/>
802          </out>
803           <call-macro n="envia_adj">
804             <with-param pos="2"/>
805             <with-param pos="3"/>
806           </call-macro>
807          <out>
808             <b pos="2"/>
809             <lu>
810               <clip pos="3" side="tl" part="lemh"/>
811               <clip pos="3" side="tl" part="a_nom"/>
812               <clip pos="3" side="tl" part="gen"/>
813               <clip pos="3" side="tl" part="nbr"/>
814               <clip pos="2" side="tl" part="lemq"/>
815             </lu>
816           </out>
817           <out>             
818             <b pos="3"/>
819           <lu>
820             <lit v="de"/>
821             <lit-tag v="pr"/>
822           </lu>
823             <b pos="4"/>
824             <lu>   
825               <clip pos="5" side="tl" part="whole"/> 
826             </lu> 
827           </out>
828        </action>
829      </rule>
831  <rule> <!-- REGLA: DET NOM -->
832       <pattern>
833         <pattern-item n="det"/>
834         <pattern-item n="nom"/>
835       </pattern>
836       <action>
837         <call-macro n="genere_nombre">
838           <with-param pos="2"/>
839         </call-macro>
840         <call-macro n="det_no">
841           <with-param pos="1"/>
842           <with-param pos="2"/>
843         </call-macro>
844           <out> 
845             <lu>   
846               <clip pos="1" side="tl" part="lem"/> 
847               <clip pos="1" side="tl" part="a_det"/>
848               <clip pos="2" side="tl" part="gen"/>
849               <clip pos="2" side="tl" part="nbr"/>
850             </lu> 
851             <b pos="1"/>
852             <lu> 
853               <clip pos="2" side="tl" part="lemh"/> 
854               <clip pos="2" side="tl" part="a_nom"/>
855               <clip pos="2" side="tl" part="gen"/>
856               <clip pos="2" side="tl" part="nbr"/>
857               <clip pos="2" side="tl" part="lemq"/> 
858             </lu> 
859          </out>
860        </action>
861      </rule>
865 <rule> <!-- REGLA: NUM NOM -->
866       <pattern>
867         <pattern-item n="num"/>
868         <pattern-item n="nom"/>
869       </pattern>
870       <action>
871         <call-macro n="genere_nombre">
872           <with-param pos="2"/>
873         </call-macro>
874         <call-macro n="million">
875           <with-param pos="1"/>
876         </call-macro>
877         <call-macro n="flexio_numerals">
878           <with-param pos="1"/>
879           <with-param pos="2"/>
880         </call-macro>
881         <out> 
882           <lu>   
883             <clip pos="1" side="tl" part="lem"/> 
884             <clip pos="1" side="tl" part="tags"/>
885           </lu> 
886           <b pos="1"/>
887           <lu> 
888             <clip pos="2" side="tl" part="lemh"/> 
889             <clip pos="2" side="tl" part="tags"/>
890             <clip pos="2" side="tl" part="lemq"/> 
891           </lu> 
892         </out>
893       </action>
894 </rule>
896  <rule> <!-- REGLA: DET DET NOM -->
897       <pattern>
898         <pattern-item n="det"/>
899         <pattern-item n="det"/>
900         <pattern-item n="nom"/>
901       </pattern>
902       <action>
903         <call-macro n="genere_nombre">
904           <with-param pos="3"/>
905         </call-macro>
906         
907           <out> 
908             <lu>   
909               <clip pos="1" side="tl" part="lem"/> 
910               <clip pos="1" side="tl" part="a_det"/>
911               <clip pos="3" side="tl" part="gen"/>
912               <clip pos="3" side="tl" part="nbr"/>
913             </lu> 
914             <b pos="1"/>
915             <lu>   
916               <clip pos="2" side="tl" part="lem"/> 
917               <clip pos="2" side="tl" part="a_det"/>
918               <clip pos="3" side="tl" part="gen"/>
919               <clip pos="3" side="tl" part="nbr"/>
920             </lu> 
921             <b pos="2"/>
922             <lu> 
923               <clip pos="3" side="tl" part="lemh"/> 
924               <clip pos="3" side="tl" part="a_nom"/>
925               <clip pos="3" side="tl" part="gen"/>
926               <clip pos="3" side="tl" part="nbr"/>
927               <clip pos="3" side="tl" part="lemq"/> 
928             </lu> 
929          </out>
930        </action>
931      </rule>
933 <rule> <!-- REGLA: DET NUM NOM -->
934       <pattern>
935         <pattern-item n="det"/>
936         <pattern-item n="num"/>
937         <pattern-item n="nom"/>
938       </pattern>
939       <action>
940         <call-macro n="genere_nombre">
941           <with-param pos="3"/>
942         </call-macro>
943         <call-macro n="million">
944           <with-param pos="2"/>
945         </call-macro>
946         <call-macro n="flexio_numerals">
947           <with-param pos="2"/>
948           <with-param pos="3"/>
949         </call-macro>
950         <out> 
951           <lu>
952             <clip pos="1" side="tl" part="lem"/>
953             <clip pos="1" side="tl" part="a_det"/>
954             <clip pos="3" side="tl" part="gen"/>
955             <clip pos="3" side="tl" part="nbr"/> 
956           </lu> 
957           <b pos="1"/>
958           <lu>   
959             <clip pos="2" side="tl" part="lem"/> 
960             <clip pos="2" side="tl" part="tags"/>
961           </lu> 
962           <b pos="2"/>
963           <lu> 
964             <clip pos="3" side="tl" part="lemh"/> 
965             <clip pos="3" side="tl" part="tags"/>
966             <clip pos="3" side="tl" part="lemq"/> 
967           </lu> 
968         </out>
969        </action>
970      </rule>
973  <rule> <!-- REGLA: NUM NUM NOM -->
974       <pattern>
975         <pattern-item n="num"/>
976         <pattern-item n="num"/>
977         <pattern-item n="nom"/>
978       </pattern>
979       <action>
980         <call-macro n="genere_nombre">
981           <with-param pos="3"/>
982         </call-macro>
983         <call-macro n="million">
984           <with-param pos="2"/>
985         </call-macro>
986         <call-macro n="flexio_numerals">
987           <with-param pos="1"/>
988           <with-param pos="3"/>
989         </call-macro>
990         <call-macro n="flexio_numerals">
991           <with-param pos="2"/>
992           <with-param pos="3"/>
993         </call-macro>
995             <out> 
996               <lu>   
997                 <clip pos="1" side="tl" part="lem"/> 
998                 <clip pos="1" side="tl" part="tags"/>
999               </lu> 
1000               <b pos="1"/>
1001               <lu>   
1002                 <clip pos="2" side="tl" part="lem"/> 
1003                 <clip pos="2" side="tl" part="tags"/>
1004               </lu> 
1005               <b pos="2"/>
1006               <lu> 
1007                 <clip pos="3" side="tl" part="lemh"/> 
1008                 <clip pos="3" side="tl" part="a_nom"/>
1009                 <clip pos="3" side="tl" part="gen"/>
1010                 <clip pos="3" side="tl" part="nbr"/>
1011                 <clip pos="3" side="tl" part="lemq"/> 
1012               </lu> 
1013             </out>
1014       </action>
1015  </rule>
1018 <rule> <!-- REGLA: DET DET NUM NOM -->
1019       <pattern>
1020         <pattern-item n="det"/>
1021         <pattern-item n="det"/>
1022         <pattern-item n="num"/>
1023         <pattern-item n="nom"/>
1024       </pattern>
1025       <action>
1026         <call-macro n="genere_nombre">
1027           <with-param pos="4"/>
1028         </call-macro>
1029         <call-macro n="million">
1030           <with-param pos="3"/>
1031         </call-macro>
1032         <call-macro n="flexio_numerals">
1033           <with-param pos="3"/>
1034           <with-param pos="4"/>
1035         </call-macro>
1036           <out> 
1037             <lu>   
1038               <clip pos="1" side="tl" part="lem"/> 
1039               <clip pos="1" side="tl" part="a_det"/>
1040               <clip pos="4" side="tl" part="gen"/>
1041               <clip pos="4" side="tl" part="nbr"/>
1042             </lu> 
1043             <b pos="1"/>
1044             <lu>   
1045               <clip pos="2" side="tl" part="lem"/> 
1046               <clip pos="2" side="tl" part="a_det"/>
1047               <clip pos="4" side="tl" part="gen"/>
1048               <clip pos="4" side="tl" part="nbr"/>
1049             </lu> 
1050             <b pos="2"/>
1051             <lu>   
1052               <clip pos="3" side="tl" part="lem"/> 
1053               <clip pos="3" side="tl" part="tags"/>
1054             </lu> 
1055             <b pos="3"/>
1056             <lu>  
1057               <clip pos="4" side="tl" part="lemh"/> 
1058               <clip pos="4" side="tl" part="a_nom"/>
1059               <clip pos="4" side="tl" part="gen"/>
1060               <clip pos="4" side="tl" part="nbr"/>
1061               <clip pos="4" side="tl" part="lemq"/>  
1062             </lu>
1063           </out>
1064       </action>
1065 </rule>
1067 <rule> <!-- REGLA: DET NUM NUM NOM -->
1068       <pattern>
1069         <pattern-item n="det"/>
1070         <pattern-item n="num"/>
1071         <pattern-item n="num"/>
1072         <pattern-item n="nom"/>
1073       </pattern>
1074       <action>
1075         <call-macro n="genere_nombre">
1076           <with-param pos="4"/>
1077         </call-macro>
1078         <call-macro n="million">
1079           <with-param pos="3"/>
1080         </call-macro>
1081         <call-macro n="flexio_numerals">
1082           <with-param pos="2"/>
1083           <with-param pos="4"/>
1084         </call-macro>
1085         <call-macro n="flexio_numerals">
1086           <with-param pos="3"/>
1087           <with-param pos="4"/>
1088         </call-macro>
1089           <out> 
1090             <lu>   
1091               <clip pos="1" side="tl" part="lem"/> 
1092               <clip pos="1" side="tl" part="a_det"/>
1093               <clip pos="4" side="tl" part="gen"/>
1094               <clip pos="4" side="tl" part="nbr"/>
1095             </lu> 
1096             <b pos="1"/>
1097             <lu>   
1098               <clip pos="2" side="tl" part="lem"/> 
1099               <clip pos="2" side="tl" part="tags"/>
1100             </lu> 
1101             <b pos="2"/>
1102             <lu>   
1103               <clip pos="3" side="tl" part="lem"/> 
1104               <clip pos="3" side="tl" part="tags"/>
1105             </lu> 
1106             <b pos="3"/>
1107             <lu>  
1108               <clip pos="4" side="tl" part="lemh"/> 
1109               <clip pos="4" side="tl" part="a_nom"/>
1110               <clip pos="4" side="tl" part="gen"/>
1111               <clip pos="4" side="tl" part="nbr"/>
1112               <clip pos="4" side="tl" part="lemq"/>  
1113             </lu>
1114           </out>
1115       </action>
1116 </rule>
1119 <rule> <!-- REGLA: such a ADJ NOM (afegir tb una regla such a ADJ ADJ NOM?-->
1120   <!--Aquí no he posat funció 'envia_adj' i per tant desapareix el comparatiu/superlatiu: such a bigger field = un camp tan gran. Pensar-hi -->
1121       <pattern>
1122         <pattern-item n="such_a"/>
1123         <pattern-item n="adj"/>
1124         <pattern-item n="nom"/>
1125       </pattern>
1126       <action>
1127         <call-macro n="genere_nombre">
1128           <with-param pos="3"/>
1129         </call-macro>
1130           <out> 
1131             <lu>   
1132               <lit v="un"/>
1133               <lit-tag v="det.ind"/>
1134               <clip pos="3" side="tl" part="gen"/>
1135               <clip pos="3" side="tl" part="nbr"/>
1136             </lu> 
1137             <b pos="1"/>
1138             <lu>   
1139               <clip pos="3" side="tl" part="lemh"/> 
1140               <clip pos="3" side="tl" part="a_nom"/>
1141               <clip pos="3" side="tl" part="gen"/>
1142               <clip pos="3" side="tl" part="nbr"/>
1143               <clip pos="3" side="tl" part="lemq"/>
1144             </lu> 
1145             <b pos="2"/>
1146             <lu>
1147               <lit v="tan"/>
1148               <lit-tag v="preadv"/>
1149             </lu>
1150             <b/>
1151             <lu>   
1152               <clip pos="2" side="tl" part="lem"/> 
1153               <clip pos="2" side="tl" part="a_adj"/>
1154               <clip pos="3" side="tl" part="gen"/>
1155               <clip pos="3" side="tl" part="nbr"/>
1156             </lu> 
1157          </out>
1158        </action>
1159      </rule>
1160           
1161  <rule> <!-- REGLA: DET ADJ NOM -->
1162       <pattern>
1163         <pattern-item n="det"/>
1164         <pattern-item n="adj"/>
1165         <pattern-item n="nom"/>
1166       </pattern>
1167       <action>
1168         <call-macro n="genere_nombre">
1169           <with-param pos="3"/>
1170         </call-macro>
1171         <call-macro n="det_no">
1172           <with-param pos="1"/>
1173           <with-param pos="3"/>
1174         </call-macro>
1175           <out> 
1176             <lu>   
1177               <clip pos="1" side="tl" part="lem"/> 
1178               <clip pos="1" side="tl" part="a_det"/>
1179               <clip pos="3" side="tl" part="gen"/>
1180               <clip pos="3" side="tl" part="nbr"/>
1181             </lu> 
1182             <b pos="1"/>
1183             <lu> 
1184               <clip pos="3" side="tl" part="lemh"/> 
1185               <clip pos="3" side="tl" part="a_nom"/>
1186               <clip pos="3" side="tl" part="gen"/>
1187               <clip pos="3" side="tl" part="nbr"/>
1188               <clip pos="3" side="tl" part="lemq"/>  
1189             </lu> 
1190             <b pos="2"/>
1191           </out>
1192           <call-macro n="envia_adj">
1193             <with-param pos="2"/>
1194             <with-param pos="3"/>
1195           </call-macro> 
1196            
1197        </action>
1198      </rule>
1200 <rule> <!-- REGLA: NUM ADJ NOM -->
1201       <pattern>
1202         <pattern-item n="num"/>
1203         <pattern-item n="adj"/>
1204         <pattern-item n="nom"/>
1205       </pattern>
1206       <action>
1207         <call-macro n="genere_nombre">
1208           <with-param pos="3"/>
1209         </call-macro>
1210         <call-macro n="million">
1211           <with-param pos="1"/>
1212         </call-macro>
1213         <call-macro n="flexio_numerals">
1214           <with-param pos="1"/>
1215           <with-param pos="3"/>
1216         </call-macro>
1217           <out> 
1218             <lu>   
1219               <clip pos="1" side="tl" part="lem"/> 
1220               <clip pos="1" side="tl" part="tags"/>
1221             </lu> 
1222             <b pos="1"/>
1223             <lu> 
1224               <clip pos="3" side="tl" part="lemh"/> 
1225               <clip pos="3" side="tl" part="a_nom"/>
1226               <clip pos="3" side="tl" part="gen"/>
1227               <clip pos="3" side="tl" part="nbr"/>
1228               <clip pos="3" side="tl" part="lemq"/>  
1229             </lu> 
1230             <b pos="2"/>
1231           </out>
1232            <call-macro n="envia_adj">
1233             <with-param pos="2"/>
1234             <with-param pos="3"/>
1235           </call-macro> 
1236            
1237        </action>
1238      </rule>
1240 <rule> <!-- REGLA: DET ADJ ADJ NOM -->
1241       <pattern>
1242         <pattern-item n="det"/>
1243         <pattern-item n="adj"/>
1244         <pattern-item n="adj"/>
1245         <pattern-item n="nom"/>
1246       </pattern>
1247       <action>
1248         <call-macro n="genere_nombre">
1249           <with-param pos="4"/>
1250         </call-macro>
1251         <call-macro n="det_no">
1252           <with-param pos="1"/>
1253           <with-param pos="4"/>
1254         </call-macro>
1255           <out> 
1256             <lu>   
1257               <clip pos="1" side="tl" part="lem"/> 
1258               <clip pos="1" side="tl" part="a_det"/>
1259               <clip pos="4" side="tl" part="gen"/>
1260               <clip pos="4" side="tl" part="nbr"/>
1261             </lu> 
1262             <b pos="1"/>
1263             <lu> 
1264               <clip pos="4" side="tl" part="lemh"/> 
1265               <clip pos="4" side="tl" part="a_nom"/>
1266               <clip pos="4" side="tl" part="gen"/>
1267               <clip pos="4" side="tl" part="nbr"/>
1268               <clip pos="4" side="tl" part="lemq"/> 
1269             </lu> 
1270             <b pos="2"/>
1271           </out>
1272           <call-macro n="envia_adj">
1273             <with-param pos="3"/>
1274             <with-param pos="4"/>
1275           </call-macro>
1276           <out>
1277             <b pos="3"/>
1278           </out>
1279           <call-macro n="envia_adj">
1280             <with-param pos="2"/>
1281             <with-param pos="4"/>
1282           </call-macro>
1283           
1284        </action>
1285      </rule>
1286 <!-- REGLA: DET ADJ AND ADJ NOM Marta-->
1291  <rule> <!-- REGLA: NUM ADJ ADJ NOM -->
1292       <pattern>
1293         <pattern-item n="num"/>
1294         <pattern-item n="adj"/>
1295         <pattern-item n="adj"/>
1296         <pattern-item n="nom"/>
1297       </pattern>
1298       <action>
1299         <call-macro n="genere_nombre">
1300           <with-param pos="4"/>
1301         </call-macro>
1302         <call-macro n="million">
1303           <with-param pos="1"/>
1304         </call-macro>
1305         <call-macro n="flexio_numerals">
1306           <with-param pos="1"/>
1307           <with-param pos="4"/>
1308         </call-macro>
1309           <out> 
1310             <lu>   
1311               <clip pos="1" side="tl" part="lem"/> 
1312               <clip pos="1" side="tl" part="tags"/>
1313             </lu> 
1314             <b pos="1"/>
1315             <lu> 
1316               <clip pos="4" side="tl" part="lemh"/> 
1317               <clip pos="4" side="tl" part="a_nom"/>
1318               <clip pos="4" side="tl" part="gen"/>
1319               <clip pos="4" side="tl" part="nbr"/>
1320               <clip pos="4" side="tl" part="lemq"/> 
1321             </lu> 
1322             <b pos="2"/>
1323           </out>
1324           <call-macro n="envia_adj">
1325             <with-param pos="3"/>
1326             <with-param pos="4"/>
1327           </call-macro>
1328           <out>
1329             <b pos="3"/>
1330           </out>
1331           <call-macro n="envia_adj">
1332             <with-param pos="2"/>
1333             <with-param pos="4"/>
1334           </call-macro>
1335            
1336        </action>
1337      </rule>
1339 <rule> <!-- REGLA: DET DET ADJ NOM (your many beautiful cats)-->
1340       <pattern>
1341         <pattern-item n="det"/>
1342         <pattern-item n="det"/>
1343         <pattern-item n="adj"/>
1344         <pattern-item n="nom"/>
1345       </pattern>
1346       <action>
1347         <call-macro n="genere_nombre">
1348           <with-param pos="4"/>
1349         </call-macro>
1350           <out> 
1351             <lu>   
1352               <clip pos="1" side="tl" part="lem"/> 
1353               <clip pos="1" side="tl" part="a_det"/>
1354               <clip pos="4" side="tl" part="gen"/>
1355               <clip pos="4" side="tl" part="nbr"/>
1356             </lu> 
1357             <b pos="1"/>
1358             <lu>   
1359               <clip pos="2" side="tl" part="lem"/> 
1360               <clip pos="2" side="tl" part="a_det"/>
1361               <clip pos="4" side="tl" part="gen"/>
1362               <clip pos="4" side="tl" part="nbr"/>
1363             </lu> 
1364             <b pos="2"/>
1365             <lu>   
1366               <clip pos="4" side="tl" part="lemh"/> 
1367               <clip pos="4" side="tl" part="a_nom"/>
1368               <clip pos="4" side="tl" part="gen"/>
1369               <clip pos="4" side="tl" part="nbr"/>
1370               <clip pos="4" side="tl" part="lemq"/> 
1371             </lu>
1372             <b pos="3"/>
1373           </out>
1374            <call-macro n="envia_adj">
1375             <with-param pos="3"/>
1376             <with-param pos="4"/>
1377           </call-macro>
1378       </action>
1379      </rule>
1381 <rule> <!-- REGLA: DET NUM ADJ NOM (your three beautiful cats)-->
1382       <pattern>
1383         <pattern-item n="det"/>
1384         <pattern-item n="num"/>
1385         <pattern-item n="adj"/>
1386         <pattern-item n="nom"/>
1387       </pattern>
1388       <action>
1389         <call-macro n="genere_nombre">
1390           <with-param pos="4"/>
1391         </call-macro>
1392         <call-macro n="million">
1393           <with-param pos="2"/>
1394         </call-macro>
1395         <call-macro n="flexio_numerals">
1396           <with-param pos="2"/>
1397           <with-param pos="4"/>
1398         </call-macro>
1399           <out> 
1400             <lu>   
1401               <clip pos="1" side="tl" part="lem"/> 
1402               <clip pos="1" side="tl" part="a_det"/>
1403               <clip pos="4" side="tl" part="gen"/>
1404               <clip pos="4" side="tl" part="nbr"/>
1405             </lu> 
1406             <b pos="1"/>
1407             <lu>   
1408               <clip pos="2" side="tl" part="lem"/> 
1409               <clip pos="2" side="tl" part="tags"/>
1410             </lu> 
1411             <b pos="2"/>
1412             <lu>   
1413               <clip pos="4" side="tl" part="lemh"/> 
1414               <clip pos="4" side="tl" part="a_nom"/>
1415               <clip pos="4" side="tl" part="gen"/>
1416               <clip pos="4" side="tl" part="nbr"/>
1417               <clip pos="4" side="tl" part="lemq"/> 
1418             </lu>
1419             <b pos="3"/>
1420           </out>
1421           <call-macro n="envia_adj">
1422             <with-param pos="3"/>
1423             <with-param pos="4"/>
1424           </call-macro>
1425       </action>
1426      </rule>
1428 <rule> <!-- REGLA: ADJ ADJ NOM -->
1429       <pattern>
1430         <pattern-item n="adj"/>
1431         <pattern-item n="adj"/>
1432         <pattern-item n="nom"/>
1433       </pattern>
1434       <action>
1435         <call-macro n="genere_nombre">
1436           <with-param pos="3"/>
1437         </call-macro>
1438           <out> 
1439             <lu>  
1440               <clip pos="3" side="tl" part="lemh"/> 
1441               <clip pos="3" side="tl" part="a_nom"/>
1442               <clip pos="3" side="tl" part="gen"/>
1443               <clip pos="3" side="tl" part="nbr"/>
1444               <clip pos="3" side="tl" part="lemq"/> 
1445             </lu> 
1446             <b pos="1"/>
1447           </out>
1448           <call-macro n="envia_adj">
1449             <with-param pos="2"/>
1450             <with-param pos="3"/>
1451           </call-macro>
1452           <out>
1453             <b pos="2"/>
1454           </out>
1455           <call-macro n="envia_adj">
1456             <with-param pos="1"/>
1457             <with-param pos="3"/>
1458           </call-macro>
1459             
1460        </action>
1461      </rule>
1464 <rule> <!-- REGLA: ADJ CONJ ADJ NOM Marta-->
1465       <pattern>
1466         <pattern-item n="adj"/>
1467 <pattern-item n="cnjcoo"/>
1468         <pattern-item n="adj"/>
1469         <pattern-item n="nom"/>
1470       </pattern>
1471       <action>
1472         <call-macro n="genere_nombre">
1473           <with-param pos="4"/>
1474         </call-macro>
1475           <out> 
1476             <lu>  
1477               <clip pos="4" side="tl" part="lemh"/> 
1478               <clip pos="4" side="tl" part="a_nom"/>
1479               <clip pos="4" side="tl" part="gen"/>
1480               <clip pos="4" side="tl" part="nbr"/>
1481               <clip pos="4" side="tl" part="lemq"/> 
1482             </lu> 
1483             <b pos="1"/>
1484           </out>
1485           <call-macro n="envia_adj">
1486             <with-param pos="1"/>
1487             <with-param pos="4"/>
1488           </call-macro>
1489           <out>
1490             <b pos="2"/>
1491           
1492           <lu>   
1493               <clip pos="2" side="tl" part="whole"/> 
1494             </lu>
1495            
1496             <b pos="3"/>
1497           </out> 
1498           <call-macro n="envia_adj">
1499             <with-param pos="3"/>
1500             <with-param pos="4"/>
1501           </call-macro>
1502        </action>
1503      </rule>
1506 <rule> <!-- REGLA: ADJ TO INF => ADJ DE INF Marta -->
1507       <pattern>
1508         <pattern-item n="adj"/>
1509         <pattern-item n="to"/>
1510         <pattern-item n="inf"/>
1511       </pattern>
1512       <action>
1514 <choose>
1515              <when>
1516                <test>
1517                  <equal>
1518                    <var n="nombre"/>
1519                    <lit v=""/>
1520                  </equal>
1521                </test>
1522                <let>
1523                  <var n="nombre"/>
1524                  <lit-tag v="sg"/>
1525                </let>
1526              </when>
1527            </choose>
1529 <choose>
1530              <when>
1531                <test>
1532                  <equal>
1533                    <var n="genere"/>
1534                    <lit v=""/>
1535                  </equal>
1536                </test>
1537                <let>
1538                  <var n="genere"/>
1539                  <lit-tag v="m"/>
1540                </let>
1541              </when>
1542            </choose>
1544 <out>
1545          <lu>
1546             <var n="adjectiu"/>
1547             <clip pos="1" side="tl" part="lem"/>
1548             <clip pos="1" side="tl" part="a_adj"/>
1549             <var n="genere"/>
1550             <var n="nombre"/>
1551           </lu>
1552 </out>
1554           <out>             
1555             <b pos="1"/>
1556           <lu>
1557             <lit v="de"/>
1558             <lit-tag v="pr"/>
1559           </lu>
1560             <b pos="2"/>
1561             <lu>   
1562               <clip pos="3" side="tl" part="whole"/> 
1563             </lu> 
1564           </out>
1565        </action>
1566      </rule>
1568 <rule> <!-- REGLA: PREADV ADJ NOM -->
1569       <pattern>
1570         <pattern-item n="preadv"/>
1571         <pattern-item n="adj"/>
1572         <pattern-item n="nom"/>
1573       </pattern>
1574       <action>
1575         <call-macro n="genere_nombre">
1576           <with-param pos="3"/>
1577         </call-macro>
1578           <out>             
1579             <lu> 
1580               <clip pos="3" side="tl" part="lemh"/> 
1581               <clip pos="3" side="tl" part="a_nom"/>
1582               <clip pos="3" side="tl" part="gen"/>
1583               <clip pos="3" side="tl" part="nbr"/>
1584               <clip pos="3" side="tl" part="lemq"/>   
1585             </lu> 
1586             <b pos="1"/>
1587             <lu>   
1588               <clip pos="1" side="tl" part="whole"/> 
1589             </lu> 
1590             <b pos="2"/>
1591           </out>
1592           <call-macro n="envia_adj">
1593             <with-param pos="2"/>
1594             <with-param pos="3"/>
1595           </call-macro>
1596        </action>
1597      </rule>
1599 <rule> <!-- REGLA: DET ADV (incl preadv) ADJ NOM -->
1600       <pattern>
1601         <pattern-item n="det"/>
1602         <pattern-item n="adv"/>
1603         <pattern-item n="adj"/>
1604         <pattern-item n="nom"/>
1605       </pattern>
1606       <action>
1607         <call-macro n="genere_nombre">
1608           <with-param pos="4"/>
1609         </call-macro>
1610         <call-macro n="det_no">
1611           <with-param pos="1"/>
1612           <with-param pos="4"/>
1613         </call-macro>
1614           <out> 
1615             <lu>   
1616               <clip pos="1" side="tl" part="lem"/> 
1617               <clip pos="1" side="tl" part="a_det"/>
1618               <clip pos="4" side="tl" part="gen"/>
1619               <clip pos="4" side="tl" part="nbr"/>
1620             </lu> 
1621             <b pos="1"/>            
1622             <lu>   
1623               <clip pos="4" side="tl" part="lemh"/> 
1624               <clip pos="4" side="tl" part="a_nom"/>
1625               <clip pos="4" side="tl" part="gen"/>
1626               <clip pos="4" side="tl" part="nbr"/>
1627               <clip pos="4" side="tl" part="lemq"/> 
1628             </lu> 
1629             <b pos="2"/>
1630             <lu>   
1631               <clip pos="2" side="tl" part="whole"/> 
1632             </lu> 
1633             <b pos="3"/>
1634           </out>
1635           <call-macro n="envia_adj">
1636             <with-param pos="3"/>
1637             <with-param pos="4"/>
1638           </call-macro>
1639        </action>
1640      </rule>
1642 <rule> <!-- REGLA: NUM ADV (incl preadv) ADJ NOM -->
1643       <pattern>
1644         <pattern-item n="num"/>
1645         <pattern-item n="adv"/>
1646         <pattern-item n="adj"/>
1647         <pattern-item n="nom"/>
1648       </pattern>
1649       <action>
1650         <call-macro n="genere_nombre">
1651           <with-param pos="4"/>
1652         </call-macro>
1653         <call-macro n="million">
1654           <with-param pos="1"/>
1655         </call-macro>
1656         <call-macro n="flexio_numerals">
1657           <with-param pos="1"/>
1658           <with-param pos="4"/>
1659         </call-macro>
1660           <out> 
1661             <lu>   
1662               <clip pos="1" side="tl" part="lem"/> 
1663               <clip pos="1" side="tl" part="tags"/>
1664             </lu> 
1665             <b pos="1"/>            
1666             <lu>   
1667               <clip pos="4" side="tl" part="lemh"/> 
1668               <clip pos="4" side="tl" part="a_nom"/>
1669               <clip pos="4" side="tl" part="gen"/>
1670               <clip pos="4" side="tl" part="nbr"/>
1671               <clip pos="4" side="tl" part="lemq"/> 
1672             </lu> 
1673             <b pos="2"/>
1674             <lu>   
1675               <clip pos="2" side="tl" part="whole"/> 
1676             </lu> 
1677             <b pos="3"/>
1678           </out>
1679            <call-macro n="envia_adj">
1680             <with-param pos="3"/>
1681             <with-param pos="4"/>
1682           </call-macro>
1683        </action>
1684      </rule>
1686 <rule> <!-- REGLA: DET PP NOM  (The preferred model - el model preferit. An increased risk - un risc augmentat (major)-->
1687       <pattern>
1688         <pattern-item n="det"/>
1689         <pattern-item n="ppadj"/>
1690         <pattern-item n="nom"/>
1691       </pattern>
1692       <action>
1693         <call-macro n="genere_nombre">
1694           <with-param pos="3"/>
1695         </call-macro>
1696         <out>  
1697           <lu>   
1698             <clip pos="1" side="tl" part="lem"/> 
1699             <clip pos="1" side="tl" part="a_det"/>
1700             <clip pos="3" side="tl" part="gen"/>
1701             <clip pos="3" side="tl" part="nbr"/>
1702           </lu> 
1703           <b pos="1"/>
1704           <lu>  
1705             <clip pos="3" side="tl" part="lemh"/> 
1706             <clip pos="3" side="tl" part="a_nom"/>
1707             <clip pos="3" side="tl" part="gen"/>
1708             <clip pos="3" side="tl" part="nbr"/>
1709             <clip pos="3" side="tl" part="lemq"/> 
1710           </lu> 
1711           <b pos="2"/>
1712           <lu>  
1713             <clip pos="2" side="tl" part="lem"/> 
1714             <clip pos="2" side="tl" part="a_pp"/>
1715             <clip pos="3" side="tl" part="gen"/>
1716             <clip pos="3" side="tl" part="nbr"/>
1717           </lu> 
1718         </out>
1719       </action>
1720 </rule>  
1722 <!-- <rule> <!-*- REGLA: NUM PP NOM  (Three preferred models - tres models preferits)-*->
1723       <pattern>
1724         <pattern-item n="num"/>
1725         <pattern-item n="ppadj"/>
1726         <pattern-item n="nom"/>
1727       </pattern>
1728       <action>
1729         <call-macro n="genere_nombre">
1730           <with-param pos="3"/>
1731         </call-macro>
1732         <call-macro n="million">
1733           <with-param pos="1"/>
1734         </call-macro>
1735         <out>  
1736           <lu>   
1737             <clip pos="1" side="tl" part="lem"/> 
1738             <clip pos="1" side="tl" part="a_det"/>
1739             <clip pos="3" side="tl" part="gen"/>
1740             <clip pos="3" side="tl" part="nbr"/>
1741           </lu> 
1742           <b pos="1"/>
1743           <lu>  
1744             <clip pos="3" side="tl" part="lemh"/> 
1745             <clip pos="3" side="tl" part="a_nom"/>
1746             <clip pos="3" side="tl" part="gen"/>
1747             <clip pos="3" side="tl" part="nbr"/>
1748             <clip pos="3" side="tl" part="lemq"/> 
1749           </lu> 
1750           <b pos="2"/>
1751           <lu>  
1752             <clip pos="2" side="tl" part="lem"/> 
1753             <clip pos="2" side="tl" part="a_pp"/>
1754             <clip pos="3" side="tl" part="gen"/>
1755             <clip pos="3" side="tl" part="nbr"/>
1756           </lu> 
1757         </out>
1758       </action>
1759 </rule>  -->
1762 <rule><!--REGLA: NOM (per a donar valor a la variable de gènere, i per a col·locar la cua en les multiparaules <g>) -->
1763   <pattern>
1764     <pattern-item n="nom"/>
1765   </pattern>
1766   <action>
1767         <call-macro n="genere_nombre">
1768           <with-param pos="1"/>
1769         </call-macro>
1770         <out>
1771           <lu>   
1772             <clip pos="1" side="tl" part="lemh"/> 
1773             <clip pos="1" side="tl" part="a_nom"/>
1774             <clip pos="1" side="tl" part="gen"/>
1775             <clip pos="1" side="tl" part="nbr"/>
1776             <clip pos="1" side="tl" part="lemq"/>
1777           </lu>
1778         </out>
1779   </action>
1780 </rule>
1782 <rule><!--REGLA: NOM1 NOM2 -> NOM2 de NOM1-->
1783   <pattern>
1784     <pattern-item n="nom"/>
1785     <pattern-item n="nom"/>
1786   </pattern>
1787   <action>
1788         <call-macro n="genere_nombre">
1789           <with-param pos="2"/>
1790         </call-macro>
1791         <out>
1792           <lu> 
1793             <clip pos="2" side="tl" part="lemh"/> 
1794             <clip pos="2" side="tl" part="a_nom"/>
1795             <clip pos="2" side="tl" part="gen"/>
1796             <clip pos="2" side="tl" part="nbr"/>
1797             <clip pos="2" side="tl" part="lemq"/>
1798           </lu>
1799           <b pos="1"/>
1800           <lu>
1801             <lit v="de"/>
1802             <lit-tag v="pr"/>
1803           </lu>
1804           <b/>
1805           <lu> 
1806             <clip pos="1" side="tl" part="lemh"/> 
1807             <clip pos="1" side="tl" part="a_nom"/>
1808             <clip pos="1" side="tl" part="gen"/>
1809             <clip pos="1" side="tl" part="nbr"/>
1810             <clip pos="1" side="tl" part="lemq"/>
1811           </lu>
1812         </out>
1813   </action>
1814 </rule>
1816 <rule><!--REGLA: DET NOM1 NOM2 -> DET NOM2 de NOM1-->
1817   <pattern>
1818     <pattern-item n="det"/>
1819     <pattern-item n="nom"/>
1820     <pattern-item n="nom"/>
1821   </pattern>
1822   <action>
1823         <call-macro n="genere_nombre">
1824           <with-param pos="3"/>
1825         </call-macro>
1826         <out>
1827           <lu>   
1828               <clip pos="1" side="tl" part="lem"/> 
1829               <clip pos="1" side="tl" part="a_det"/>
1830               <clip pos="3" side="tl" part="gen"/>
1831               <clip pos="3" side="tl" part="nbr"/>
1832             </lu> 
1833             <b pos="1"/>
1834           <lu>   
1835             <clip pos="3" side="tl" part="lemh"/> 
1836             <clip pos="3" side="tl" part="a_nom"/>
1837             <clip pos="3" side="tl" part="gen"/>
1838             <clip pos="3" side="tl" part="nbr"/>
1839             <clip pos="3" side="tl" part="lemq"/>
1840           </lu>
1841           <b pos="2"/>
1842           <lu>
1843             <lit v="de"/>
1844             <lit-tag v="pr"/>
1845           </lu>
1846           <b/>
1847           <lu>   
1848             <clip pos="2" side="tl" part="lemh"/> 
1849             <clip pos="2" side="tl" part="a_nom"/>
1850             <clip pos="2" side="tl" part="gen"/>
1851             <clip pos="2" side="tl" part="nbr"/>
1852             <clip pos="2" side="tl" part="lemq"/>
1853           </lu>
1854         </out>
1855   </action>
1856 </rule>
1858 <rule><!--REGLA: NUM NOM1 NOM2 -> NUM NOM2 de NOM1 (Three street chairs)-->
1859   <pattern>
1860     <pattern-item n="num"/>
1861     <pattern-item n="nom"/>
1862     <pattern-item n="nom"/>
1863   </pattern>
1864   <action>
1865         <call-macro n="genere_nombre">
1866           <with-param pos="3"/>
1867         </call-macro>
1868         <call-macro n="million">
1869           <with-param pos="1"/>
1870         </call-macro>
1871         <call-macro n="flexio_numerals">
1872           <with-param pos="1"/>
1873           <with-param pos="3"/>
1874         </call-macro>
1875         <out>
1876           <lu>   
1877               <clip pos="1" side="tl" part="lem"/> 
1878               <clip pos="1" side="tl" part="tags"/>
1879             </lu> 
1880             <b pos="1"/>
1881           <lu>   
1882             <clip pos="3" side="tl" part="lemh"/> 
1883             <clip pos="3" side="tl" part="a_nom"/>
1884             <clip pos="3" side="tl" part="gen"/>
1885             <clip pos="3" side="tl" part="nbr"/>
1886             <clip pos="3" side="tl" part="lemq"/>
1887           </lu>
1888           <b pos="2"/>
1889           <lu>
1890             <lit v="de"/>
1891             <lit-tag v="pr"/>
1892           </lu>
1893           <b/>
1894           <lu>   
1895             <clip pos="2" side="tl" part="lemh"/> 
1896             <clip pos="2" side="tl" part="a_nom"/>
1897             <clip pos="2" side="tl" part="gen"/>
1898             <clip pos="2" side="tl" part="nbr"/>
1899             <clip pos="2" side="tl" part="lemq"/>
1900           </lu>
1901         </out>
1902   </action>
1903 </rule>
1905 <rule><!--REGLA: NUM-NOM1 NOM2 -> NOM2 de NUM NOM1(pl) (Three-month extension - extensió de tres mesos-->
1906   <pattern>
1907     <pattern-item n="num"/>
1908     <pattern-item n="guio"/>
1909     <pattern-item n="nom"/>
1910     <pattern-item n="nom"/>
1911   </pattern>
1912   <action>
1913         <call-macro n="genere_nombre">
1914           <with-param pos="4"/>
1915         </call-macro>
1916         <call-macro n="million">
1917           <with-param pos="1"/>
1918         </call-macro>
1919         <call-macro n="flexio_numerals">
1920           <with-param pos="1"/>
1921           <with-param pos="3"/>
1922         </call-macro>
1923         <out>     
1924           <lu>   
1925             <clip pos="4" side="tl" part="lemh"/> 
1926             <clip pos="4" side="tl" part="a_nom"/>
1927             <clip pos="4" side="tl" part="gen"/>
1928             <clip pos="4" side="tl" part="nbr"/>
1929             <clip pos="4" side="tl" part="lemq"/>
1930           </lu>
1931           <b pos="3"/>
1932           <lu>
1933             <lit v="de"/>
1934             <lit-tag v="pr"/>
1935           </lu>
1936           <b/>
1937           <lu>   
1938             <clip pos="1" side="tl" part="lem"/> 
1939             <clip pos="1" side="tl" part="tags"/>
1940           </lu> 
1941           <b/>
1942           <lu>   
1943             <clip pos="3" side="tl" part="lemh"/> 
1944             <clip pos="3" side="tl" part="a_nom"/>
1945             <clip pos="3" side="tl" part="gen"/>
1946             <lit-tag v="pl"/>
1947             <clip pos="3" side="tl" part="lemq"/>
1948           </lu>
1949         </out>
1950   </action>
1951 </rule>
1953 <rule><!--REGLA: DET DET NOM1 NOM2 -> DET DET NOM2 de NOM1-->
1954   <pattern>
1955     <pattern-item n="det"/>
1956     <pattern-item n="det"/>
1957     <pattern-item n="nom"/>
1958     <pattern-item n="nom"/>
1959   </pattern>
1960   <action>
1961         <call-macro n="genere_nombre">
1962           <with-param pos="4"/>
1963         </call-macro>
1964         <out>
1965           <lu>   
1966               <clip pos="1" side="tl" part="lem"/> 
1967               <clip pos="1" side="tl" part="a_det"/>
1968               <clip pos="4" side="tl" part="gen"/>
1969               <clip pos="4" side="tl" part="nbr"/>
1970             </lu> 
1971             <b pos="1"/>
1972           <lu>   
1973               <clip pos="2" side="tl" part="lem"/> 
1974               <clip pos="2" side="tl" part="a_det"/>
1975               <clip pos="4" side="tl" part="gen"/>
1976               <clip pos="4" side="tl" part="nbr"/>
1977             </lu> 
1978             <b pos="2"/>
1979           <lu>   
1980             <clip pos="4" side="tl" part="lemh"/> 
1981             <clip pos="4" side="tl" part="a_nom"/>
1982             <clip pos="4" side="tl" part="gen"/>
1983             <clip pos="4" side="tl" part="nbr"/>
1984             <clip pos="4" side="tl" part="lemq"/>
1985           </lu>
1986           <b pos="3"/>
1987           <lu>
1988             <lit v="de"/>
1989             <lit-tag v="pr"/>
1990           </lu>
1991           <b/>
1992           <lu>   
1993             <clip pos="3" side="tl" part="lemh"/> 
1994             <clip pos="3" side="tl" part="a_nom"/>
1995             <clip pos="3" side="tl" part="gen"/>
1996             <clip pos="3" side="tl" part="nbr"/>
1997             <clip pos="3" side="tl" part="lemq"/>
1998           </lu>
1999         </out>
2000   </action>
2001 </rule>
2004 <rule><!--REGLA: DET NUM NOM1 NOM2 -> DET NUM NOM2 de NOM1-->
2005   <pattern>
2006     <pattern-item n="det"/>
2007     <pattern-item n="num"/>
2008     <pattern-item n="nom"/>
2009     <pattern-item n="nom"/>
2010   </pattern>
2011   <action>
2012         <call-macro n="genere_nombre">
2013           <with-param pos="4"/>
2014         </call-macro>
2015         <call-macro n="million">
2016           <with-param pos="2"/>
2017         </call-macro>
2018         <call-macro n="flexio_numerals">
2019           <with-param pos="2"/>
2020           <with-param pos="4"/>
2021         </call-macro>
2022         <out>
2023           <lu>   
2024               <clip pos="1" side="tl" part="lem"/> 
2025               <clip pos="1" side="tl" part="a_det"/>
2026               <clip pos="4" side="tl" part="gen"/>
2027               <clip pos="4" side="tl" part="nbr"/>
2028             </lu> 
2029             <b pos="1"/>
2030           <lu>   
2031               <clip pos="2" side="tl" part="lem"/> 
2032               <clip pos="2" side="tl" part="tags"/>
2033             </lu> 
2034             <b pos="2"/>
2035           <lu>   
2036             <clip pos="4" side="tl" part="lemh"/> 
2037             <clip pos="4" side="tl" part="a_nom"/>
2038             <clip pos="4" side="tl" part="gen"/>
2039             <clip pos="4" side="tl" part="nbr"/>
2040             <clip pos="4" side="tl" part="lemq"/>
2041           </lu>
2042           <b pos="3"/>
2043           <lu>
2044             <lit v="de"/>
2045             <lit-tag v="pr"/>
2046           </lu>
2047           <b/>
2048           <lu>   
2049             <clip pos="3" side="tl" part="lemh"/> 
2050             <clip pos="3" side="tl" part="a_nom"/>
2051             <clip pos="3" side="tl" part="gen"/>
2052             <clip pos="3" side="tl" part="nbr"/>
2053             <clip pos="3" side="tl" part="lemq"/>
2054           </lu>
2055         </out>
2056   </action>
2057 </rule>
2059 <rule><!--REGLA: DET NUM-NOM1 NOM2 -> NOM2 de NUM NOM1(pl) (A three-month extension - una extensió de tres mesos-->
2060   <pattern>
2061     <pattern-item n="det"/>
2062     <pattern-item n="num"/>
2063     <pattern-item n="guio"/>
2064     <pattern-item n="nom"/>
2065     <pattern-item n="nom"/>
2066   </pattern>
2067   <action>
2068         <call-macro n="genere_nombre">
2069           <with-param pos="5"/>
2070         </call-macro>
2071         <call-macro n="million">
2072           <with-param pos="2"/>
2073         </call-macro>
2074         <call-macro n="flexio_numerals">
2075           <with-param pos="2"/>
2076           <with-param pos="4"/>
2077         </call-macro>
2078         <out>
2079           <lu>   
2080               <clip pos="1" side="tl" part="lem"/> 
2081               <clip pos="1" side="tl" part="a_det"/>
2082               <clip pos="5" side="tl" part="gen"/>
2083               <clip pos="5" side="tl" part="nbr"/>
2084             </lu> 
2085             <b pos="1"/>
2086           <lu>   
2087             <clip pos="5" side="tl" part="lemh"/> 
2088             <clip pos="5" side="tl" part="a_nom"/>
2089             <clip pos="5" side="tl" part="gen"/>
2090             <clip pos="5" side="tl" part="nbr"/>
2091             <clip pos="5" side="tl" part="lemq"/>
2092           </lu>
2093           <b/>
2094           <lu>
2095             <lit v="de"/>
2096             <lit-tag v="pr"/>
2097           </lu>
2098           <b/>
2099           <lu>   
2100             <clip pos="2" side="tl" part="lem"/> 
2101             <clip pos="2" side="tl" part="tags"/>
2102           </lu> 
2103           <b pos="4"/>
2104           <lu>   
2105             <clip pos="4" side="tl" part="lemh"/> 
2106             <clip pos="4" side="tl" part="a_nom"/>
2107             <clip pos="4" side="tl" part="gen"/>
2108             <lit-tag v="pl"/>
2109             <clip pos="4" side="tl" part="lemq"/>
2110           </lu>
2111         </out>
2112   </action>
2113 </rule>
2116 <rule><!--REGLA: ADJ NOM1 NOM2 -> NOM2 de NOM1 ADJ-->
2117   <pattern>
2118     <pattern-item n="adj"/>
2119     <pattern-item n="nom"/>
2120     <pattern-item n="nom"/>
2121   </pattern>
2122   <action>
2123         <call-macro n="genere_nombre">
2124           <with-param pos="3"/>
2125         </call-macro>
2126         <out>
2127           <lu>  
2128             <clip pos="3" side="tl" part="lemh"/> 
2129             <clip pos="3" side="tl" part="a_nom"/>
2130             <clip pos="3" side="tl" part="gen"/>
2131             <clip pos="3" side="tl" part="nbr"/>
2132             <clip pos="3" side="tl" part="lemq"/> 
2133           </lu>
2134           <b pos="1"/>
2135           <lu>
2136             <lit v="de"/>
2137             <lit-tag v="pr"/>
2138           </lu>
2139           <b/>
2140           <lu>   
2141             <clip pos="2" side="tl" part="lemh"/> 
2142             <clip pos="2" side="tl" part="a_nom"/>
2143             <clip pos="2" side="tl" part="gen"/>
2144             <clip pos="2" side="tl" part="nbr"/>
2145             <clip pos="2" side="tl" part="lemq"/> 
2146           </lu>
2147           <b pos="2"/>
2148         </out>
2149         <call-macro n="envia_adj">
2150             <with-param pos="1"/>
2151             <with-param pos="2"/><!--Gènere i nombre del primer nom, tot i que no sempre és correcte -->
2152           </call-macro>
2153   </action>
2154 </rule>
2156 <rule><!--REGLA: DET ADJ NOM1 NOM2 -> DET NOM2 de NOM1 ADJ-->
2157   <pattern>
2158     <pattern-item n="det"/>
2159     <pattern-item n="adj"/>
2160     <pattern-item n="nom"/>
2161     <pattern-item n="nom"/>
2162   </pattern>
2163   <action>
2164         <call-macro n="genere_nombre">
2165           <with-param pos="4"/>
2166         </call-macro>
2167         <out>
2168           <lu>   
2169               <clip pos="1" side="tl" part="lem"/> 
2170               <clip pos="1" side="tl" part="a_det"/>
2171               <clip pos="4" side="tl" part="gen"/>
2172               <clip pos="4" side="tl" part="nbr"/>
2173             </lu> 
2174             <b pos="1"/>
2175           <lu>  
2176             <clip pos="4" side="tl" part="lemh"/> 
2177             <clip pos="4" side="tl" part="a_nom"/>
2178             <clip pos="4" side="tl" part="gen"/>
2179             <clip pos="4" side="tl" part="nbr"/>
2180             <clip pos="4" side="tl" part="lemq"/> 
2181           </lu>
2182           <b pos="2"/>
2183           <lu>
2184             <lit v="de"/>
2185             <lit-tag v="pr"/>
2186           </lu>
2187           <b/>
2188           <lu>   
2189             <clip pos="3" side="tl" part="lemh"/> 
2190             <clip pos="3" side="tl" part="a_nom"/>
2191             <clip pos="3" side="tl" part="gen"/>
2192             <clip pos="3" side="tl" part="nbr"/>
2193             <clip pos="3" side="tl" part="lemq"/> 
2194           </lu>
2195           <b pos="3"/>
2196         </out>
2197         <call-macro n="envia_adj">
2198             <with-param pos="2"/>
2199             <with-param pos="4"/><!--Gènere i nombre del segon nom en aquest cas, tot i que no sempre és correcte -->
2200           </call-macro>
2201   </action>
2202 </rule>
2204 <rule><!--REGLA: NOM1 NOM2 NOM3 -> NOM3 de NOM2 del NOM1-->
2205   <pattern>
2206     <pattern-item n="nom"/>
2207     <pattern-item n="nom"/>
2208     <pattern-item n="nom"/>
2209   </pattern>
2210   <action>
2211         <call-macro n="genere_nombre">
2212           <with-param pos="3"/>
2213         </call-macro>
2214         <out>
2215           <lu> 
2216             <clip pos="3" side="tl" part="lemh"/> 
2217             <clip pos="3" side="tl" part="a_nom"/>
2218             <clip pos="3" side="tl" part="gen"/>
2219             <clip pos="3" side="tl" part="nbr"/>
2220             <clip pos="3" side="tl" part="lemq"/>
2221           </lu>
2222           <b pos="1"/>
2223           <lu>
2224             <lit v="de"/>
2225             <lit-tag v="pr"/>
2226           </lu>
2227           <b/>
2228           <lu> 
2229             <clip pos="2" side="tl" part="lemh"/> 
2230             <clip pos="2" side="tl" part="a_nom"/>
2231             <clip pos="2" side="tl" part="gen"/>
2232             <clip pos="2" side="tl" part="nbr"/>
2233             <clip pos="2" side="tl" part="lemq"/>
2234           </lu>
2235            <b pos="2"/>
2236           <lu>
2237             <lit v="de"/>
2238             <lit-tag v="pr"/>
2239           </lu>
2240            <b/>
2241           <lu>
2242             <lit v="el"/><!--De moment hi posarem article, potser no sempre és correcte, estudiar-ho. -->
2243             <lit-tag v="det.def"/>
2244             <clip pos="1" side="tl" part="gen"/>
2245             <clip pos="1" side="tl" part="nbr"/>
2246           </lu>
2247           <b/>
2248           <lu> 
2249             <clip pos="1" side="tl" part="lemh"/> 
2250             <clip pos="1" side="tl" part="a_nom"/>
2251             <clip pos="1" side="tl" part="gen"/>
2252             <clip pos="1" side="tl" part="nbr"/>
2253             <clip pos="1" side="tl" part="lemq"/>
2254           </lu>
2255         </out>
2256   </action>
2257 </rule>
2259 <rule><!--REGLA: DET NOM1 NOM2 NOM3 -> DET NOM3 de NOM2 del NOM1-->
2260   <pattern>
2261     <pattern-item n="det"/>
2262     <pattern-item n="nom"/>
2263     <pattern-item n="nom"/>
2264     <pattern-item n="nom"/>
2265   </pattern>
2266   <action>
2267         <call-macro n="genere_nombre">
2268           <with-param pos="4"/>
2269         </call-macro>
2270         <out>
2271           <lu>   
2272             <clip pos="1" side="tl" part="lem"/> 
2273             <clip pos="1" side="tl" part="a_det"/>
2274             <clip pos="4" side="tl" part="gen"/>
2275             <clip pos="4" side="tl" part="nbr"/>
2276           </lu> 
2277           <b pos="1"/>
2278           <lu> 
2279             <clip pos="4" side="tl" part="lemh"/> 
2280             <clip pos="4" side="tl" part="a_nom"/>
2281             <clip pos="4" side="tl" part="gen"/>
2282             <clip pos="4" side="tl" part="nbr"/>
2283             <clip pos="4" side="tl" part="lemq"/>
2284           </lu>
2285           <b pos="2"/>
2286           <lu>
2287             <lit v="de"/>
2288             <lit-tag v="pr"/>
2289           </lu>
2290           <b/>
2291           <lu> 
2292             <clip pos="3" side="tl" part="lemh"/> 
2293             <clip pos="3" side="tl" part="a_nom"/>
2294             <clip pos="3" side="tl" part="gen"/>
2295             <clip pos="3" side="tl" part="nbr"/>
2296             <clip pos="3" side="tl" part="lemq"/>
2297           </lu>
2298            <b pos="3"/>
2299           <lu>
2300             <lit v="de"/>
2301             <lit-tag v="pr"/>
2302           </lu>
2303            <b/>
2304           <lu>
2305             <lit v="el"/><!--De moment hi posarem article, potser no sempre és correcte, estudiar-ho. -->
2306             <lit-tag v="det.def"/>
2307             <clip pos="2" side="tl" part="gen"/>
2308             <clip pos="2" side="tl" part="nbr"/>
2309           </lu>
2310           <b/>
2311           <lu> 
2312             <clip pos="2" side="tl" part="lemh"/> 
2313             <clip pos="2" side="tl" part="a_nom"/>
2314             <clip pos="2" side="tl" part="gen"/>
2315             <clip pos="2" side="tl" part="nbr"/>
2316             <clip pos="2" side="tl" part="lemq"/>
2317           </lu>
2318         </out>
2319   </action>
2320 </rule>
2322 <rule><!--REGLA: ADJ NOM1 NOM2 NOM3 -> NOM3 de NOM2 de NOM1 ADJ (professional video game design -> disseny de joc de vídeo professional (?)-->
2323   <pattern>
2324     <pattern-item n="adj"/>
2325     <pattern-item n="nom"/>
2326     <pattern-item n="nom"/>
2327     <pattern-item n="nom"/>
2328   </pattern>
2329   <action>
2330         <call-macro n="genere_nombre">
2331           <with-param pos="4"/>
2332         </call-macro>
2333         <out>
2334           <lu> 
2335             <clip pos="4" side="tl" part="lemh"/> 
2336             <clip pos="4" side="tl" part="a_nom"/>
2337             <clip pos="4" side="tl" part="gen"/>
2338             <clip pos="4" side="tl" part="nbr"/>
2339             <clip pos="4" side="tl" part="lemq"/>
2340           </lu>
2341           <b pos="1"/>
2342           <lu>
2343             <lit v="de"/>
2344             <lit-tag v="pr"/>
2345           </lu>
2346           <b/>
2347           <lu> 
2348             <clip pos="3" side="tl" part="lemh"/> 
2349             <clip pos="3" side="tl" part="a_nom"/>
2350             <clip pos="3" side="tl" part="gen"/>
2351             <clip pos="3" side="tl" part="nbr"/>
2352             <clip pos="3" side="tl" part="lemq"/>
2353           </lu>
2354            <b pos="2"/>
2355           <lu>
2356             <lit v="de"/>
2357             <lit-tag v="pr"/>
2358           </lu>
2359           <b/>
2360           <lu> 
2361             <clip pos="2" side="tl" part="lemh"/> 
2362             <clip pos="2" side="tl" part="a_nom"/>
2363             <clip pos="2" side="tl" part="gen"/>
2364             <clip pos="2" side="tl" part="nbr"/>
2365             <clip pos="2" side="tl" part="lemq"/>
2366           </lu>
2367           <b pos="3"/>
2368         </out>
2369         <call-macro n="envia_adj">
2370           <with-param pos="1"/>
2371           <with-param pos="4"/>
2372         </call-macro>
2373   </action>
2374 </rule>
2376 <rule><!--REGLA: DET ADJ NOM1 NOM2 NOM3 -> DET NOM3 de NOM2 de NOM1 ADJ-->
2377   <pattern>
2378     <pattern-item n="det"/>
2379     <pattern-item n="adj"/>
2380     <pattern-item n="nom"/>
2381     <pattern-item n="nom"/>
2382     <pattern-item n="nom"/>
2383   </pattern>
2384   <action>
2385         <call-macro n="genere_nombre">
2386           <with-param pos="5"/>
2387         </call-macro>
2388         <out>
2389           <lu>   
2390             <clip pos="1" side="tl" part="lem"/> 
2391             <clip pos="1" side="tl" part="a_det"/>
2392             <clip pos="5" side="tl" part="gen"/>
2393             <clip pos="5" side="tl" part="nbr"/>
2394           </lu> 
2395           <b pos="1"/>
2396           <lu> 
2397             <clip pos="5" side="tl" part="lemh"/> 
2398             <clip pos="5" side="tl" part="a_nom"/>
2399             <clip pos="5" side="tl" part="gen"/>
2400             <clip pos="5" side="tl" part="nbr"/>
2401             <clip pos="5" side="tl" part="lemq"/>
2402           </lu>
2403           <b pos="2"/>
2404           <lu>
2405             <lit v="de"/>
2406             <lit-tag v="pr"/>
2407           </lu>
2408           <b/>
2409           <lu> 
2410             <clip pos="4" side="tl" part="lemh"/> 
2411             <clip pos="4" side="tl" part="a_nom"/>
2412             <clip pos="4" side="tl" part="gen"/>
2413             <clip pos="4" side="tl" part="nbr"/>
2414             <clip pos="4" side="tl" part="lemq"/>
2415           </lu>
2416            <b pos="3"/>
2417           <lu>
2418             <lit v="de"/>
2419             <lit-tag v="pr"/>
2420           </lu>
2421           <b pos="4"/>
2422           <lu> 
2423             <clip pos="3" side="tl" part="lemh"/> 
2424             <clip pos="3" side="tl" part="a_nom"/>
2425             <clip pos="3" side="tl" part="gen"/>
2426             <clip pos="3" side="tl" part="nbr"/>
2427             <clip pos="3" side="tl" part="lemq"/>
2428           </lu>
2429           <b/>
2430         </out>
2431           <call-macro n="envia_adj">
2432           <with-param pos="2"/>
2433           <with-param pos="5"/>
2434         </call-macro>
2435   </action>
2436 </rule>
2438 <rule><!--REGLA: NOM1 NOM2 NOM3 NOM4-> NOM4 de NOM3 de NOM2 de NOM1 (video game design industry -> indústria de disseny de joc de vídeo (?)-->
2439   <pattern>
2440     <pattern-item n="nom"/>
2441     <pattern-item n="nom"/>
2442     <pattern-item n="nom"/>
2443     <pattern-item n="nom"/>
2444   </pattern>
2445   <action>
2446         <call-macro n="genere_nombre">
2447           <with-param pos="4"/>
2448         </call-macro>
2449         <out>
2450           <lu> 
2451             <clip pos="4" side="tl" part="lemh"/> 
2452             <clip pos="4" side="tl" part="a_nom"/>
2453             <clip pos="4" side="tl" part="gen"/>
2454             <clip pos="4" side="tl" part="nbr"/>
2455             <clip pos="4" side="tl" part="lemq"/>
2456           </lu>
2457           <b pos="1"/>
2458           <lu>
2459             <lit v="de"/>
2460             <lit-tag v="pr"/>
2461           </lu>
2462           <b/>
2463           <lu> 
2464             <clip pos="3" side="tl" part="lemh"/> 
2465             <clip pos="3" side="tl" part="a_nom"/>
2466             <clip pos="3" side="tl" part="gen"/>
2467             <clip pos="3" side="tl" part="nbr"/>
2468             <clip pos="3" side="tl" part="lemq"/>
2469           </lu>
2470           <b pos="2"/>
2471           <lu>
2472             <lit v="de"/>
2473             <lit-tag v="pr"/>
2474           </lu>
2475           <b/>
2476           <lu> 
2477             <clip pos="2" side="tl" part="lemh"/> 
2478             <clip pos="2" side="tl" part="a_nom"/>
2479             <clip pos="2" side="tl" part="gen"/>
2480             <clip pos="2" side="tl" part="nbr"/>
2481             <clip pos="2" side="tl" part="lemq"/>
2482           </lu>
2483            <b pos="3"/>
2484           <lu>
2485             <lit v="de"/>
2486             <lit-tag v="pr"/>
2487           </lu>
2488            <b/>
2489           <lu> 
2490             <clip pos="1" side="tl" part="lemh"/> 
2491             <clip pos="1" side="tl" part="a_nom"/>
2492             <clip pos="1" side="tl" part="gen"/>
2493             <clip pos="1" side="tl" part="nbr"/>
2494             <clip pos="1" side="tl" part="lemq"/>
2495           </lu>
2496         </out>
2497   </action>
2498 </rule>
2500 <rule><!--REGLA: DET NOM1 NOM2 NOM3 NOM4-> DET NOM4 de NOM3 de NOM2 de NOM1 (the video game design industry -> la indústria de disseny de joc de vídeo (?)-->
2501   <pattern>
2502     <pattern-item n="det"/>
2503     <pattern-item n="nom"/>
2504     <pattern-item n="nom"/>
2505     <pattern-item n="nom"/>
2506     <pattern-item n="nom"/>
2507   </pattern>
2508   <action>
2509         <call-macro n="genere_nombre">
2510           <with-param pos="5"/>
2511         </call-macro>
2512         <out>
2513           <lu>   
2514             <clip pos="1" side="tl" part="lem"/> 
2515             <clip pos="1" side="tl" part="a_det"/>
2516             <clip pos="5" side="tl" part="gen"/>
2517             <clip pos="5" side="tl" part="nbr"/>
2518           </lu> 
2519           <b pos="1"/>
2520           <lu> 
2521             <clip pos="5" side="tl" part="lemh"/> 
2522             <clip pos="5" side="tl" part="a_nom"/>
2523             <clip pos="5" side="tl" part="gen"/>
2524             <clip pos="5" side="tl" part="nbr"/>
2525             <clip pos="5" side="tl" part="lemq"/>
2526           </lu>
2527           <b pos="2"/>
2528           <lu>
2529             <lit v="de"/>
2530             <lit-tag v="pr"/>
2531           </lu>
2532           <b/>
2533           <lu> 
2534             <clip pos="4" side="tl" part="lemh"/> 
2535             <clip pos="4" side="tl" part="a_nom"/>
2536             <clip pos="4" side="tl" part="gen"/>
2537             <clip pos="4" side="tl" part="nbr"/>
2538             <clip pos="4" side="tl" part="lemq"/>
2539           </lu>
2540           <b pos="3"/>
2541           <lu>
2542             <lit v="de"/>
2543             <lit-tag v="pr"/>
2544           </lu>
2545           <b/>
2546           <lu> 
2547             <clip pos="3" side="tl" part="lemh"/> 
2548             <clip pos="3" side="tl" part="a_nom"/>
2549             <clip pos="3" side="tl" part="gen"/>
2550             <clip pos="3" side="tl" part="nbr"/>
2551             <clip pos="3" side="tl" part="lemq"/>
2552           </lu>
2553            <b pos="4"/>
2554           <lu>
2555             <lit v="de"/>
2556             <lit-tag v="pr"/>
2557           </lu>
2558            <b/>
2559           <lu> 
2560             <clip pos="2" side="tl" part="lemh"/> 
2561             <clip pos="2" side="tl" part="a_nom"/>
2562             <clip pos="2" side="tl" part="gen"/>
2563             <clip pos="2" side="tl" part="nbr"/>
2564             <clip pos="2" side="tl" part="lemq"/>
2565           </lu>
2566         </out>
2567   </action>
2568 </rule>
2571 <rule><!--REGLA: ADJECTIU (per a assignar-li gènere i nombre) -->
2572   <pattern>
2573     <pattern-item n="adj"/>
2574   </pattern>
2575   <action>
2576    
2577     <choose>  
2578       <when>
2579         <test>
2580           <equal>
2581             <var n="genere"/>
2582             <lit v=""/>
2583           </equal>
2584         </test>
2585           <let>
2586             <var n="genere"/>
2587             <lit-tag v="m"/>
2588           </let>
2589       </when>
2590     </choose>
2591     <choose>  
2592       <when>
2593         <test>
2594           <equal>
2595             <var n="nombre"/>
2596             <lit v=""/>
2597           </equal>
2598         </test>
2599           <let>
2600             <var n="nombre"/>
2601             <lit-tag v="sg"/>
2602           </let>
2603       </when>
2604     </choose>   
2605     <choose>
2606     <when>
2607       <test>
2608         <or>
2609           <equal>
2610             <clip pos="1" side="sl" part="grau_adj"/>
2611             <lit-tag v="comp"/>
2612           </equal>
2613           <equal>
2614             <clip pos="1" side="sl" part="grau_adj"/>
2615             <lit-tag v="sup"/>
2616           </equal>
2617         </or>     
2618       </test>
2619       <out>
2620         <lu>
2621           <lit v="més"/>
2622           <lit-tag v="preadv"/>
2623         </lu>
2624         <b/>
2625       </out>
2626     </when>
2627   </choose>
2628       <out>             
2629         <lu>   
2630           <clip pos="1" side="tl" part="lem"/> 
2631           <clip pos="1" side="tl" part="a_adj"/>
2632           <var n="genere"/>
2633           <var n="nombre"/>
2634         </lu> 
2635       </out>
2636   </action>
2637 </rule> 
2639 <rule><!--REGLA: NUMERAL (perquè no doni error si va davant de desconegudes i no es pot assignar gènere).
2640           SOLUCIÓ PROVISIONAL!!!!!!!!! -->
2641  <pattern>
2642     <pattern-item n="num"/>
2643   </pattern>
2644   <action>
2645     <choose>  
2646       <when>
2647         <test>
2648           <equal>
2649             <var n="genere"/>
2650             <lit v=""/>
2651           </equal>
2652         </test>
2653           <let>
2654             <var n="genere"/>
2655             <lit-tag v="m"/>
2656           </let>
2657       </when>
2658     </choose>
2659     <choose>
2660       <when>
2661         <test>
2662           <equal>
2663             <clip pos="1" side="tl" part="gen"/>
2664             <lit-tag v="GD"/>
2665           </equal>
2666         </test>
2667         <let>
2668           <clip pos="1" side="tl" part="gen"/>
2669           <var n="genere"/>
2670         </let>
2671       </when>
2672     </choose>
2673     <out>
2674       <lu>   
2675         <clip pos="1" side="tl" part="lem"/> 
2676         <clip pos="1" side="tl" part="tags"/>
2677       </lu> 
2678     </out>
2679   </action>
2680 </rule>
2683 <rule><!--REGLA: DETERMINANT (perquè no doni error si va davant de desconegudes i no es pot assignar gènere).
2684           SOLUCIÓ PROVISIONAL!!!!!!!!! (tot i que numerals estan inclosos en 'det', entren per la regla anterior perquè està definida en primer lloc-->
2685   <pattern>
2686     <pattern-item n="det"/>
2687   </pattern>
2688   <action>
2689     <choose>
2690       
2691       <when>
2692         <test>
2693             <equal>
2694               <clip pos="1" side="sl" part="nbr"/>
2695               <lit-tag v="pl"/>
2696             </equal>
2697         </test>
2698         <out><!--S'ha de fer un out per a cada cas pq no es pot assignar amb un let un valor a nbr pq en sl moltes paraules no tenen cap valor i per tant no se'ls pot assignar res a un clip buit. -->
2699           <lu>   
2700             <clip pos="1" side="tl" part="lem"/> 
2701             <clip pos="1" side="tl" part="a_det"/>
2702             <lit-tag v="m"/>
2703             <clip pos="1" side="tl" part="nbr"/>
2704           </lu> 
2705         </out>
2706       </when>
2707       <otherwise>
2708         <out>
2709           <lu>   
2710             <clip pos="1" side="tl" part="lem"/> 
2711             <clip pos="1" side="tl" part="a_det"/>
2712             <lit-tag v="m"/>
2713             <lit-tag v="sg"/>
2714           </lu> 
2715         </out>
2716       </otherwise>
2717     </choose>
2718   </action>
2719 </rule>
2722 <rule><!--REGLA: DET NUM (per quan va davant de desconegudes, almenys que concordin entre ells) - The two xxx : els dos xxx -->
2723   <pattern>
2724     <pattern-item n="det"/>
2725     <pattern-item n="num"/>
2726   </pattern>
2727   <action>
2728     <choose>  
2729       <when>
2730         <test>
2731           <equal>
2732             <var n="genere"/>
2733             <lit v=""/>
2734           </equal>
2735         </test>
2736           <let>
2737             <var n="genere"/>
2738             <lit-tag v="m"/>
2739           </let>
2740       </when>
2741     </choose>
2742     <choose>
2743       <when>
2744         <test>
2745           <equal>
2746             <clip pos="2" side="tl" part="gen"/>
2747             <lit-tag v="GD"/>
2748           </equal>
2749         </test>
2750         <let>
2751           <clip pos="2" side="tl" part="gen"/>
2752           <var n="genere"/>
2753         </let>
2754       </when>
2755     </choose>
2756     <out>
2757       <lu>   
2758         <clip pos="1" side="tl" part="lem"/> 
2759         <clip pos="1" side="tl" part="a_det"/>
2760         <lit-tag v="m"/>
2761         <lit-tag v="pl"/>
2762       </lu> 
2763       <b pos="1"/>
2764       <lu>   
2765         <clip pos="2" side="tl" part="lem"/> 
2766         <clip pos="2" side="tl" part="tags"/>
2767       </lu> 
2768     </out>
2769   </action>
2770 </rule>
2772  <rule> <!-- REGLA: NOM GENITIU NOM (Mexico's history) -->
2773       <pattern>
2774         <pattern-item n="nom"/>
2775         <pattern-item n="genitiu"/>
2776         <pattern-item n="nom"/>
2777       </pattern>
2778       <action>  
2779         <call-macro n="genere_nombre">
2780           <with-param pos="3"/>
2781         </call-macro>
2782         <out>
2783           <lu>
2784             <lit v="el"/>
2785             <lit-tag v="det.def"/>
2786             <clip pos="3" side="tl" part="gen"/>
2787             <clip pos="3" side="tl" part="nbr"/>
2788           </lu>
2789           <b pos="2"/>
2790           <lu> 
2791             <clip pos="3" side="tl" part="lemh"/> 
2792             <clip pos="3" side="tl" part="a_nom"/>
2793             <clip pos="3" side="tl" part="gen"/>
2794             <clip pos="3" side="tl" part="nbr"/>
2795             <clip pos="3" side="tl" part="lemq"/> 
2796           </lu>
2797           <b/>
2798           <lu>   
2799             <lit v="de"/>
2800             <lit-tag v="pr"/>
2801           </lu>
2802           <b/>
2803           <lu> 
2804             <clip pos="1" side="tl" part="lemh"/> 
2805             <clip pos="1" side="tl" part="a_nom"/>
2806             <clip pos="1" side="tl" part="gen"/>
2807             <clip pos="1" side="tl" part="nbr"/>
2808             <clip pos="1" side="tl" part="lemq"/> 
2809           </lu>
2810         </out>
2811       </action>
2812 </rule>
2814  <rule> <!-- REGLA: DET NOM GENITIU NOM (my mother's house) -->
2815       <pattern>
2816         <pattern-item n="det"/>
2817         <pattern-item n="nom"/>
2818         <pattern-item n="genitiu"/>
2819         <pattern-item n="nom"/>
2820       </pattern>
2821       <action>  
2822         <call-macro n="genere_nombre">
2823           <with-param pos="4"/>
2824         </call-macro>
2825         <out>
2826           <lu>
2827             <lit v="el"/>
2828             <lit-tag v="det.def"/>
2829             <clip pos="4" side="tl" part="gen"/>
2830             <clip pos="4" side="tl" part="nbr"/>
2831           </lu>
2832           <b pos="1"/>
2833           <lu> 
2834             <clip pos="4" side="tl" part="lemh"/> 
2835             <clip pos="4" side="tl" part="a_nom"/>
2836             <clip pos="4" side="tl" part="gen"/>
2837             <clip pos="4" side="tl" part="nbr"/>
2838             <clip pos="4" side="tl" part="lemq"/> 
2839           </lu>
2840           <b pos="3"/>
2841           <lu>   
2842             <lit v="de"/>
2843             <lit-tag v="pr"/>
2844           </lu>
2845           <b/>
2846           <lu>   
2847             <clip pos="1" side="tl" part="lem"/> 
2848             <clip pos="1" side="tl" part="a_det"/>
2849             <clip pos="2" side="tl" part="gen"/>
2850             <clip pos="2" side="tl" part="nbr"/>
2851           </lu> 
2852           <b/>
2853           <lu> 
2854             <clip pos="2" side="tl" part="lemh"/> 
2855             <clip pos="2" side="tl" part="a_nom"/>
2856             <clip pos="2" side="tl" part="gen"/>
2857             <clip pos="2" side="tl" part="nbr"/>
2858             <clip pos="2" side="tl" part="lemq"/> 
2859           </lu>
2860         </out>
2861       </action>
2862 </rule>
2864  <rule> <!-- REGLA: NOM GENITIU ADJ NOM (Mexico's long history) -->
2865       <pattern>
2866         <pattern-item n="nom"/>
2867         <pattern-item n="genitiu"/>
2868         <pattern-item n="adj2"/>
2869         <pattern-item n="nom"/>
2870       </pattern>
2871       <action>  
2872         <call-macro n="genere_nombre">
2873           <with-param pos="4"/>
2874         </call-macro>
2875         <out>
2876           <lu>
2877             <lit v="el"/>
2878             <lit-tag v="det.def"/>
2879             <clip pos="4" side="tl" part="gen"/>
2880             <clip pos="4" side="tl" part="nbr"/>
2881           </lu>
2882           <b pos="2"/>
2883           <lu> 
2884             <clip pos="4" side="tl" part="lemh"/> 
2885             <clip pos="4" side="tl" part="a_nom"/>
2886             <clip pos="4" side="tl" part="gen"/>
2887             <clip pos="4" side="tl" part="nbr"/>
2888             <clip pos="4" side="tl" part="lemq"/> 
2889           </lu>
2890           <b pos="3"/>
2891         </out>
2892         <call-macro n="envia_adj">
2893           <with-param pos="3"/>
2894           <with-param pos="4"/>
2895         </call-macro>
2896         <out>
2897           <b/>
2898           <lu>   
2899             <lit v="de"/>
2900             <lit-tag v="pr"/>
2901           </lu>
2902           <b/>
2903           <lu> 
2904             <clip pos="1" side="tl" part="lemh"/> 
2905             <clip pos="1" side="tl" part="a_nom"/>
2906             <clip pos="1" side="tl" part="gen"/>
2907             <clip pos="1" side="tl" part="nbr"/>
2908             <clip pos="1" side="tl" part="lemq"/> 
2909           </lu>
2910         </out>
2911       </action>
2912 </rule>
2914 <rule> <!-- REGLA: DET NOM GENITIU DET NOM (my mother's first house) -->
2915       <pattern>
2916         <pattern-item n="det"/>
2917         <pattern-item n="nom"/>
2918         <pattern-item n="genitiu"/>     
2919         <pattern-item n="det2"/>
2920         <pattern-item n="nom"/>
2921       </pattern>
2922       <action>  
2923         <call-macro n="genere_nombre">
2924           <with-param pos="5"/>
2925         </call-macro>
2926         <out>
2927           <lu>
2928             <lit v="el"/>
2929             <lit-tag v="det.def"/>
2930             <clip pos="5" side="tl" part="gen"/>
2931             <clip pos="5" side="tl" part="nbr"/>
2932           </lu>
2933           <b pos="1"/>
2934           <lu>
2935             <clip pos="4" side="tl" part="lem"/> 
2936             <clip pos="4" side="tl" part="a_det"/>
2937             <clip pos="5" side="tl" part="gen"/>
2938             <clip pos="5" side="tl" part="nbr"/>
2939           </lu> 
2940           <b pos="3"/>
2941           <lu> 
2942             <clip pos="5" side="tl" part="lemh"/> 
2943             <clip pos="5" side="tl" part="a_nom"/>
2944             <clip pos="5" side="tl" part="gen"/>
2945             <clip pos="5" side="tl" part="nbr"/>
2946             <clip pos="5" side="tl" part="lemq"/> 
2947           </lu>
2948           <b pos="4"/>
2949           <lu>   
2950             <lit v="de"/>
2951             <lit-tag v="pr"/>
2952           </lu>
2953           <b/>
2954           <lu>   
2955             <clip pos="1" side="tl" part="lem"/> 
2956             <clip pos="1" side="tl" part="a_det"/>
2957             <clip pos="2" side="tl" part="gen"/>
2958             <clip pos="2" side="tl" part="nbr"/>
2959           </lu> 
2960           <b/>
2961           <lu> 
2962             <clip pos="2" side="tl" part="lemh"/> 
2963             <clip pos="2" side="tl" part="a_nom"/>
2964             <clip pos="2" side="tl" part="gen"/>
2965             <clip pos="2" side="tl" part="nbr"/>
2966             <clip pos="2" side="tl" part="lemq"/> 
2967           </lu>
2968         </out>
2969       </action>
2970 </rule>
2973 <rule> <!-- REGLA: DET NOM GENITIU ADJ NOM (my mother's big house) -->
2974       <pattern>
2975         <pattern-item n="det"/>
2976         <pattern-item n="nom"/>
2977         <pattern-item n="genitiu"/>     
2978         <pattern-item n="adj2"/>
2979         <pattern-item n="nom"/>
2980       </pattern>
2981       <action>  
2982         <call-macro n="genere_nombre">
2983           <with-param pos="5"/>
2984         </call-macro>
2985         <out>
2986           <lu>
2987             <lit v="el"/>
2988             <lit-tag v="det.def"/>
2989             <clip pos="5" side="tl" part="gen"/>
2990             <clip pos="5" side="tl" part="nbr"/>
2991           </lu>
2992           <b pos="1"/>
2993           <lu> 
2994             <clip pos="5" side="tl" part="lemh"/> 
2995             <clip pos="5" side="tl" part="a_nom"/>
2996             <clip pos="5" side="tl" part="gen"/>
2997             <clip pos="5" side="tl" part="nbr"/>
2998             <clip pos="5" side="tl" part="lemq"/> 
2999           </lu>
3000           <b pos="3"/>
3001         </out>
3002         <call-macro n="envia_adj">
3003           <with-param pos="4"/>
3004           <with-param pos="5"/>
3005         </call-macro>
3006         <out>
3007           <b pos="4"/>
3008           <lu>   
3009             <lit v="de"/>
3010             <lit-tag v="pr"/>
3011           </lu>
3012           <b/>
3013           <lu>   
3014             <clip pos="1" side="tl" part="lem"/> 
3015             <clip pos="1" side="tl" part="a_det"/>
3016             <clip pos="2" side="tl" part="gen"/>
3017             <clip pos="2" side="tl" part="nbr"/>
3018           </lu> 
3019           <b/>
3020           <lu> 
3021             <clip pos="2" side="tl" part="lemh"/> 
3022             <clip pos="2" side="tl" part="a_nom"/>
3023             <clip pos="2" side="tl" part="gen"/>
3024             <clip pos="2" side="tl" part="nbr"/>
3025             <clip pos="2" side="tl" part="lemq"/> 
3026           </lu>
3027         </out>
3028       </action>
3029 </rule>
3031 <rule> <!-- REGLA: DET NOM GENITIU NUM NOM (my mother's two houses) -->
3032       <pattern>
3033         <pattern-item n="det"/>
3034         <pattern-item n="nom"/>
3035         <pattern-item n="genitiu"/>     
3036         <pattern-item n="num"/>
3037         <pattern-item n="nom"/>
3038       </pattern>
3039       <action>  
3040         <call-macro n="genere_nombre">
3041           <with-param pos="5"/>
3042         </call-macro>
3043         <call-macro n="million">
3044           <with-param pos="4"/>
3045         </call-macro>
3046         <call-macro n="flexio_numerals">
3047           <with-param pos="4"/>
3048           <with-param pos="5"/>
3049         </call-macro>
3050         <out>
3051           <lu>
3052             <lit v="el"/>
3053             <lit-tag v="det.def"/>
3054             <clip pos="5" side="tl" part="gen"/>
3055             <clip pos="5" side="tl" part="nbr"/>
3056           </lu>
3057           <b pos="1"/>
3058           <lu>
3059             <clip pos="4" side="tl" part="lem"/> 
3060             <clip pos="4" side="tl" part="tags"/>
3061           </lu> 
3062           <b pos="3"/>
3063           <lu> 
3064             <clip pos="5" side="tl" part="lemh"/> 
3065             <clip pos="5" side="tl" part="a_nom"/>
3066             <clip pos="5" side="tl" part="gen"/>
3067             <clip pos="5" side="tl" part="nbr"/>
3068             <clip pos="5" side="tl" part="lemq"/> 
3069           </lu>
3070           <b pos="4"/>
3071           <lu>   
3072             <lit v="de"/>
3073             <lit-tag v="pr"/>
3074           </lu>
3075           <b/>
3076           <lu>   
3077             <clip pos="1" side="tl" part="lem"/> 
3078             <clip pos="1" side="tl" part="a_det"/>
3079             <clip pos="2" side="tl" part="gen"/>
3080             <clip pos="2" side="tl" part="nbr"/>
3081           </lu> 
3082           <b/>
3083           <lu> 
3084             <clip pos="2" side="tl" part="lemh"/> 
3085             <clip pos="2" side="tl" part="a_nom"/>
3086             <clip pos="2" side="tl" part="gen"/>
3087             <clip pos="2" side="tl" part="nbr"/>
3088             <clip pos="2" side="tl" part="lemq"/> 
3089           </lu>
3090         </out>
3091       </action>
3092 </rule>
3096  <rule> <!-- REGLA: ADJ NOM GENITIU NOM -->
3097       <pattern>
3098         <pattern-item n="adj2"/>
3099         <pattern-item n="nom"/>
3100         <pattern-item n="genitiu"/>
3101         <pattern-item n="nom"/>
3102       </pattern>
3103       <action>  
3104         <call-macro n="genere_nombre">
3105           <with-param pos="4"/>
3106         </call-macro>
3107         <out>
3108           <lu>
3109             <lit v="el"/>
3110             <lit-tag v="det.def"/>
3111             <clip pos="4" side="tl" part="gen"/>
3112             <clip pos="4" side="tl" part="nbr"/>
3113           </lu>
3114           <b pos="1"/>
3115           <lu> 
3116             <clip pos="4" side="tl" part="lemh"/> 
3117             <clip pos="4" side="tl" part="a_nom"/>
3118             <clip pos="4" side="tl" part="gen"/>
3119             <clip pos="4" side="tl" part="nbr"/>
3120             <clip pos="4" side="tl" part="lemq"/> 
3121           </lu>
3122           <b pos="3"/>
3123           <lu>   
3124             <lit v="de"/>
3125             <lit-tag v="pr"/>
3126           </lu>
3127           <b/>
3128           <lu>
3129             <lit v="el"/><!--Està bé posar l'article davant el primer nom? -->
3130             <lit-tag v="det.def"/>
3131             <clip pos="2" side="tl" part="gen"/>
3132             <clip pos="2" side="tl" part="nbr"/>
3133           </lu>
3134           <b/>
3135           <lu> 
3136             <clip pos="2" side="tl" part="lemh"/> 
3137             <clip pos="2" side="tl" part="a_nom"/>
3138             <clip pos="2" side="tl" part="gen"/>
3139             <clip pos="2" side="tl" part="nbr"/>
3140             <clip pos="2" side="tl" part="lemq"/> 
3141           </lu>
3142           <b/>
3143         </out>
3144         <call-macro n="envia_adj">
3145           <with-param pos="1"/>
3146           <with-param pos="2"/>
3147         </call-macro>
3148       </action>
3149 </rule>
3151 <rule> <!-- REGLA: NOM GENITIU NOM NOM (Mexico's emergencies ministry) -->
3152       <pattern>
3153         <pattern-item n="nom"/>
3154         <pattern-item n="genitiu"/>
3155         <pattern-item n="nom"/>
3156         <pattern-item n="nom"/>
3157       </pattern>
3158       <action>  
3159         <call-macro n="genere_nombre">
3160           <with-param pos="4"/>
3161         </call-macro>
3162         <out>
3163           <lu>
3164             <lit v="el"/>
3165             <lit-tag v="det.def"/>
3166             <clip pos="4" side="tl" part="gen"/>
3167             <clip pos="4" side="tl" part="nbr"/>
3168           </lu>
3169           <b pos="2"/>
3170           <lu> 
3171             <clip pos="4" side="tl" part="lemh"/> 
3172             <clip pos="4" side="tl" part="a_nom"/>
3173             <clip pos="4" side="tl" part="gen"/>
3174             <clip pos="4" side="tl" part="nbr"/>
3175             <clip pos="4" side="tl" part="lemq"/> 
3176           </lu>
3177           <b/>
3178           <lu>   
3179             <lit v="de"/>
3180             <lit-tag v="pr"/>
3181           </lu>
3182           <b pos="3"/>
3183           <lu> 
3184             <clip pos="3" side="tl" part="lemh"/> 
3185             <clip pos="3" side="tl" part="a_nom"/>
3186             <clip pos="3" side="tl" part="gen"/>
3187             <clip pos="3" side="tl" part="nbr"/>
3188             <clip pos="3" side="tl" part="lemq"/> 
3189           </lu>
3190           <b/>
3191           <lu>   
3192             <lit v="de"/>
3193             <lit-tag v="pr"/>
3194           </lu>
3195           <b/>
3196           <lu> 
3197             <clip pos="1" side="tl" part="lemh"/> 
3198             <clip pos="1" side="tl" part="a_nom"/>
3199             <clip pos="1" side="tl" part="gen"/>
3200             <clip pos="1" side="tl" part="nbr"/>
3201             <clip pos="1" side="tl" part="lemq"/> 
3202           </lu>
3203         </out>
3204       </action>
3205 </rule>
3207 <rule> <!-- REGLA: DET ADJ NOM GENITIU NOM (the American public's imagination)-->
3208       <pattern>
3209         <pattern-item n="det"/>
3210         <pattern-item n="adj2"/>
3211         <pattern-item n="nom"/>
3212         <pattern-item n="genitiu"/>
3213         <pattern-item n="nom"/>
3214       </pattern>
3215       <action>  
3216         <call-macro n="genere_nombre">
3217           <with-param pos="5"/>
3218         </call-macro>
3219         <out>
3220           <lu>
3221             <lit v="el"/>
3222             <lit-tag v="det.def"/>
3223             <clip pos="5" side="tl" part="gen"/>
3224             <clip pos="5" side="tl" part="nbr"/>
3225           </lu>
3226           <b pos="1"/>
3227           <lu> 
3228             <clip pos="5" side="tl" part="lemh"/> 
3229             <clip pos="5" side="tl" part="a_nom"/>
3230             <clip pos="5" side="tl" part="gen"/>
3231             <clip pos="5" side="tl" part="nbr"/>
3232             <clip pos="5" side="tl" part="lemq"/> 
3233           </lu>
3234           <b pos="2"/>
3235           <lu>   
3236             <lit v="de"/>
3237             <lit-tag v="pr"/>
3238           </lu>
3239           <b pos="4"/>
3240           <lu>
3241             <clip pos="1" side="tl" part="lem"/> 
3242             <clip pos="1" side="tl" part="a_det"/>
3243             <clip pos="3" side="tl" part="gen"/>
3244             <clip pos="3" side="tl" part="nbr"/>
3245           </lu>
3246           <b/>
3247           <lu> 
3248             <clip pos="3" side="tl" part="lemh"/> 
3249             <clip pos="3" side="tl" part="a_nom"/>
3250             <clip pos="3" side="tl" part="gen"/>
3251             <clip pos="3" side="tl" part="nbr"/>
3252             <clip pos="3" side="tl" part="lemq"/>
3253           </lu>
3254           <b/>
3255         </out>
3256         <call-macro n="envia_adj">
3257           <with-param pos="2"/>
3258           <with-param pos="3"/>
3259         </call-macro>
3260       </action>
3261 </rule>
3265  <rule> <!-- REGLA: PREPOSICIÓ PRONOM_OBJECTE : with him - amb ell-->
3266       <pattern>
3267         <pattern-item n="prep"/>
3268         <pattern-item n="probj"/>
3269       </pattern>
3270       <action>
3271         <choose>
3272           <when>
3273             <test>
3274               <and>
3275               <equal>
3276                 <clip pos="2" side="sl" part="pers"/> 
3277                 <lit-tag v="p3"/>
3278               </equal>
3279               <equal>
3280                 <clip pos="2" side="sl" part="nbr"/> 
3281                 <lit-tag v="pl"/>
3282               </equal>
3283             </and>
3284             </test>
3285             <let>
3286               <clip pos="2" side="tl" part="gen"/>
3287               <lit-tag v="m"/><!--with them : amb ells (i no elles)-->
3288             </let>
3289           </when>
3290           <when>
3291             <test>
3292               <and>
3293               <equal>
3294                 <clip pos="2" side="sl" part="pers"/> 
3295                 <lit-tag v="p3"/>
3296               </equal>
3297               <equal>
3298                 <clip pos="2" side="sl" part="nbr"/> 
3299                 <lit-tag v="sg"/>
3300               </equal>
3301             </and>
3302             </test>
3303             <let>
3304               <clip pos="2" side="tl" part="gen"/>
3305               <clip pos="2" side="sl" part="gen"/>
3306             </let><!--with her/him : pq la traducció del pron obj 3a sg és 'mf' en català (li), cal canviar a 'm' o 'f' per al pronom tònic (ell/ella) -->
3307           </when>
3308         </choose>
3309         <choose>
3310           <when>
3311             <test>
3312             <and>
3313               <equal>
3314                 <clip pos="2" side="sl" part="pers"/> 
3315                 <lit-tag v="p1"/>
3316               </equal>
3317               <equal>
3318                 <clip pos="2" side="sl" part="nbr"/> 
3319                 <lit-tag v="sg"/>
3320               </equal>
3321             </and>
3322             </test>
3323             <out>
3324               <lu>   
3325                 <clip pos="1" side="tl" part="whole"/> 
3326               </lu> 
3327               <b pos="1"/>
3328               <lu>  
3329                 <lit v="mi"/>
3330                 <lit-tag v="prn.tn"/>
3331                 <clip pos="2" side="tl" part="pers"/>
3332                 <clip pos="2" side="tl" part="gen"/>
3333                 <clip pos="2" side="tl" part="nbr"/>
3334               </lu> 
3335             </out>
3336           </when>
3337           
3338           <otherwise>      
3339             <out> 
3340               <lu>   
3341                 <clip pos="1" side="tl" part="whole"/> 
3342               </lu> 
3343                 <b pos="1"/>
3344                 <lu>   
3345                   <clip pos="2" side="tl" part="lem"/> 
3346                   <lit-tag v="prn.tn"/> 
3347                   <clip pos="2" side="tl" part="pers"/>
3348                   <clip pos="2" side="tl" part="gen"/>
3349                   <clip pos="2" side="tl" part="nbr"/>
3350                 </lu> 
3351               </out>
3352           </otherwise>
3353         </choose>
3354       </action>
3355  </rule>
3358 <!--****************************************** REGLES DE SV ***************************************-->
3360  <rule><!-- REGLA: PRONOM VERB (I come -> jo vinc)-->
3361          <pattern>
3362                  <pattern-item n="prsubj"/>
3363                  <pattern-item n="verbcj"/>
3364          </pattern>
3365          <action>
3366            <choose>
3367              <when>
3368                <test>
3369                 <!-- <or>
3370                    <equal>
3371                      <clip pos="2" side="sl" part="temps"/>
3372                      <lit-tag v="inf"/>
3373                    </equal> --><!--De moment no sé si el tagger escull bé i els detecto els dos. Canviar potser  -->
3374                    <equal>
3375                      <clip pos="2" side="sl" part="temps"/>
3376                      <lit-tag v="pres"/>
3377                    </equal>
3378                 <!-- </or> -->
3379                </test>
3380                <out>
3381         <!--     <lu>   
3382                    <clip pos="1" side="tl" part="whole"/> 
3383                  </lu> 
3384                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
3385                  <lu> 
3386                    <clip pos="2" side="tl" part="lemh"/> 
3387                    <clip pos="2" side="tl" part="a_verb"/>
3388                    <lit-tag v="pri"/>
3389                    <clip pos="1" side="tl" part="pers"/> 
3390                    <clip pos="1" side="tl" part="nbr"/> 
3391                    <clip pos="2" side="tl" part="lemq"/> 
3392                  </lu>
3393                </out>
3394              </when>
3395              <when>
3396                <test>
3397                  <equal>
3398                    <clip pos="2" side="sl" part="temps"/>
3399                    <lit-tag v="past"/>
3400                  </equal>
3401                </test>
3402                <out>
3403         <!--     <lu>   
3404                    <clip pos="1" side="tl" part="whole"/> 
3405                  </lu> 
3406                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
3407                  <lu>
3408                    <lit v="anar"/>
3409                    <lit-tag v="vaux"/>
3410                    <clip pos="1" side="tl" part="pers"/>
3411                    <clip pos="1" side="tl" part="nbr"/>
3412                  </lu>
3413                  <b/>
3414                  <lu>
3415                    <clip pos="2" side="tl" part="lemh"/>
3416                    <clip pos="2" side="tl" part="a_verb"/><!--Pq vaig posar sl? pingui 00-->
3417                    <lit-tag v="inf"/>
3418                    <clip pos="2" side="tl" part="lemq"/>
3419                  </lu>
3420                </out>
3421              </when>
3422              <otherwise><!--La 3p sg (comes) -->
3423                <out>
3424                 <!-- <lu>   
3425                    <clip pos="1" side="tl" part="whole"/> 
3426                  </lu> 
3427                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
3428                  <lu>   
3429                    <clip pos="2" side="tl" part="lemh"/>
3430                    <clip pos="2" side="tl" part="a_verb"/>
3431                    <clip pos="2" side="tl" part="temps"/>
3432                    <clip pos="2" side="tl" part="pers"/>
3433                    <clip pos="2" side="tl" part="nbr"/>
3434                    <clip pos="2" side="tl" part="lemq"/>
3435                  </lu> 
3436                </out>
3437              </otherwise>
3438            </choose>
3439  </action>
3440  </rule>
3442 <!-- <rule><!-*-REGLA: PART.PRESENT NOM (flying objects-> objectes que volen) 1ª APROXIMACIÓ -*->
3443   <pattern>
3444     <pattern-item n="pprs"/>
3445     <pattern-item n="nom"/>
3446   </pattern>
3447   <action>
3448     <out>
3449       <lu>
3450         <clip pos="2" side="tl" part="lemh"/> 
3451         <clip pos="2" side="tl" part="a_nom"/>
3452         <clip pos="2" side="tl" part="gen"/>
3453         <clip pos="2" side="tl" part="nbr"/>
3454         <clip pos="2" side="tl" part="lemq"/> 
3455       </lu>
3456       <b pos="1"/>
3457       <lu>
3458         <lit v="que"/>
3459         <lit-tag v="cnjsub"/><!-*-CANVIAR PER RELATIU!!!!!!1 -*->
3460       </lu>
3461       <b/>
3462       <lu>      
3463         <clip pos="1" side="tl" part="lem"/> 
3464         <clip pos="1" side="tl" part="a_verb"/>
3465         <lit-tag v="pri.p3"/>
3466         <clip pos="2" side="tl" part="nbr"/>
3467       </lu>
3468     </out>
3469   </action>
3470 </rule> -->
3472 <rule><!--REGLA: INF (per a col·locar la cua en les multiparaules) -->
3473   <pattern>
3474     <pattern-item n="inf"/>
3475   </pattern>
3476   <action>
3477     <choose>
3478       <when>
3479         <test>
3480           <not>
3481             <or>
3482               <equal>           
3483                 <clip pos="1" side="sl" part="lem"/>
3484                 <lit v="will"/>
3485               </equal>
3486               <equal>           
3487                 <clip pos="1" side="sl" part="lem"/>
3488                 <lit v="would"/>
3489               </equal>
3490             </or>
3491           </not>
3492         </test>
3493     <out>
3494       <lu>      
3495         <clip pos="1" side="tl" part="lemh"/> 
3496         <clip pos="1" side="tl" part="a_verb"/>
3497         <clip pos="1" side="tl" part="temps"/>
3498         <clip pos="1" side="tl" part="lemq"/>
3499       </lu>
3500     </out>
3501       </when>
3502     </choose>
3503   </action>
3504 </rule>
3506 <rule><!--REGLA: GER (per a col·locar la cua en les multiparaules) -->
3507   <pattern>
3508     <pattern-item n="ger"/>
3509   </pattern>
3510   <action>
3511     <out>
3512       <lu>      
3513         <clip pos="1" side="tl" part="lemh"/> 
3514         <clip pos="1" side="tl" part="a_verb"/>
3515         <clip pos="1" side="tl" part="temps"/>
3516         <clip pos="1" side="tl" part="lemq"/>
3517       </lu>
3518     </out>
3519   </action>
3520 </rule>
3521     
3522 <rule><!--REGLA: PART.PRESENT (quan el nom és desconegut) 1ª APROXIMACIÓ -->
3523   <pattern>
3524     <pattern-item n="pprs"/>
3525   </pattern>
3526   <action>
3527     <out>
3528       <lu>      
3529         <clip pos="1" side="tl" part="lemh"/> 
3530         <clip pos="1" side="tl" part="a_verb"/>
3531         <lit-tag v="ger"/>
3532         <clip pos="1" side="tl" part="lemq"/>
3533       </lu>
3534     </out>
3535   </action>
3536 </rule>
3537     
3538 <rule><!--REGLA: VERB SUBS (living -> viure) -->
3539   <pattern>
3540     <pattern-item n="vbsubs"/> 
3541   </pattern>
3542   <action>
3543     <out>
3544       <lu>
3545         <clip pos="1" side="tl" part="lemh"/> 
3546         <clip pos="1" side="tl" part="a_verb"/>
3547         <lit-tag v="inf"/>
3548         <clip pos="1" side="tl" part="lemq"/> 
3549       </lu>
3550     </out>
3551   </action>
3552 </rule>
3553             
3554 <rule><!--REGLA: VERB PART (Agafa gènere de l'últim SN detectat, i sinó posa m sg (patients treated). Després caldria afegir el pp en les regles d'adjectiu) -->
3555   <pattern>
3556     <pattern-item n="pp"/> 
3557   </pattern>
3558   <action>
3559     <choose>
3560       <when><!--si és verb 'ser' o 'estar' només pot ser m sg -->
3561         <test>
3562           <or>
3563             <equal>
3564               <clip pos="1" side="tl" part="a_verb"/>
3565               <lit-tag v="vbser"/>
3566             </equal>
3567             <equal caseless="yes">
3568               <clip pos="1" side="tl" part="lemh"/>
3569               <lit v="estar"/><!--tb agafa multiparaules com 'estar d'acord' -->
3570           </equal>
3571           </or>
3572         </test>
3573         <out>
3574           <lu>
3575             <clip pos="1" side="tl" part="lemh"/> 
3576             <clip pos="1" side="tl" part="a_pp"/>
3577             <lit-tag v="m.sg"/>
3578             <clip pos="1" side="tl" part="lemq"/> 
3579           </lu>
3580         </out>
3581       </when>
3582       
3583       <otherwise>
3584         <choose>  
3585           <when>
3586             <test>
3587               <equal>
3588                 <var n="genere"/>
3589                 <lit v=""/>
3590               </equal>
3591             </test>
3592             <let>
3593               <var n="genere"/>
3594               <lit-tag v="m"/>
3595             </let>
3596           </when>
3597         </choose>
3598         <choose>  
3599           <when>
3600             <test>
3601               <equal>
3602                 <var n="nombre"/>
3603                 <lit v=""/>
3604               </equal>
3605             </test>
3606             <let>
3607               <var n="nombre"/>
3608               <lit-tag v="sg"/>
3609             </let>
3610           </when>
3611         </choose>
3612         <out>
3613           <lu>
3614             <clip pos="1" side="tl" part="lemh"/> 
3615             <clip pos="1" side="tl" part="a_pp"/>
3616             <var n="genere"/>
3617             <var n="nombre"/>
3618             <clip pos="1" side="tl" part="lemq"/> 
3619           </lu>
3620         </out>
3621       </otherwise>
3622     </choose>
3623   </action>
3624 </rule>
3625     
3626 <rule><!-- REGLA: VERB   Quan no  hi ha abans pronom, és tercera persona ('My friends come'). En present no hi ha dubte en quant al nombre (come/ comes). En passat, s'agafa per ara el nombre de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The animals of the zoo survived') -->
3627          <pattern>
3628            <pattern-item n="verbcj"/>
3629          </pattern>
3630          <action>
3631            <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
3632              <when>
3633                <test>
3634                  <equal>
3635                    <var n="nombre"/>
3636                    <lit v=""/>
3637                  </equal>
3638                </test>
3639                <let>
3640                  <var n="nombre"/>
3641                  <lit-tag v="sg"/>
3642                </let>
3643              </when>
3644            </choose>
3645            <choose>
3646              <when>
3647                <test>
3648                 <!-- <or> 
3649                    <equal>
3650                      <clip pos="1" side="sl" part="temps"/>
3651                      <lit-tag v="inf"/>
3652                    </equal> --><!--De moment no sé si el tagger escull bé i els detecto els dos -->
3653                    <equal>
3654                      <clip pos="1" side="sl" part="temps"/>
3655                      <lit-tag v="pres"/>
3656                    </equal>
3657                 <!-- </or> -->
3658                </test>
3659                <out>
3660                  <lu>
3661                    <clip pos="1" side="tl" part="lemh"/> 
3662                    <clip pos="1" side="tl" part="a_verb"/>
3663                    <lit-tag v="pri.p3"/>
3664                    <var n="nombre"/>
3665                    <clip pos="1" side="tl" part="lemq"/> 
3666                  </lu>
3667                </out>
3668              </when>
3669              <when>
3670                <test>
3671                  <equal>
3672                    <clip pos="1" side="sl" part="temps"/>
3673                    <lit-tag v="past"/>
3674                  </equal>
3675                </test>
3676                <out>
3677                  <lu>
3678                    <lit v="anar"/>
3679                    <lit-tag v="vaux.p3"/>
3680                    <var n="nombre"/>
3681                  </lu>
3682                  <b/>
3683                  <lu>
3684                    <clip pos="1" side="tl" part="lemh"/>
3685                    <clip pos="1" side="tl" part="a_verb"/>
3686                    <lit-tag v="inf"/>
3687                    <clip pos="1" side="tl" part="lemq"/>
3688                  </lu>
3689                </out>  
3690              </when>
3691              
3693              <otherwise><!-- Quan és 3a sg (comes) -->
3694                <out>
3695                  <lu>   
3696                    <clip pos="1" side="tl" part="lemh"/>
3697                    <clip pos="1" side="tl" part="a_verb"/><!-- pingui 1-->
3698                    <clip pos="1" side="tl" part="temps"/>
3699                    <clip pos="1" side="tl" part="pers"/>
3700                    <clip pos="1" side="tl" part="nbr"/>
3701                    <clip pos="1" side="tl" part="lemq"/> 
3702                  </lu> 
3703                </out>
3704              </otherwise>
3705            </choose>
3706          </action>
3707 </rule>
3710 <rule><!-- REGLA: VERB MODAL (have to, want to). Per quan apareix sol o amb un verb desconegut. Solució basta per ara.
3711            Quan no  hi ha abans pronom, és tercera persona ('My friends come'). En present no hi ha dubte en quant al nombre (come/ comes). En passat, s'agafa per ara el nombre de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The animals of the zoo survived') -->
3712          <pattern>
3713            <pattern-item n="mod"/>
3714          </pattern>
3715          <action>
3716            <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
3717              <when>
3718                <test>
3719                  <equal>
3720                    <var n="nombre"/>
3721                    <lit v=""/>
3722                  </equal>
3723                </test>
3724                <let>
3725                  <var n="nombre"/>
3726                  <lit-tag v="sg"/>
3727                </let>
3728              </when>
3729            </choose>
3730            <choose>
3731              <when>
3732                <test>
3733                  <or>
3734                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
3735                      <clip pos="1" side="sl" part="temps"/>
3736                      <lit-tag v="inf"/>
3737                    </equal>
3738                    <equal>
3739                      <clip pos="1" side="sl" part="temps"/>
3740                      <lit-tag v="pres"/>
3741                    </equal>
3742                  </or>
3743                </test>
3744                <out>
3745                  <lu>
3746                    <clip pos="1" side="tl" part="lemh"/> 
3747                    <clip pos="1" side="tl" part="a_verb"/>
3748                    <lit-tag v="pri.p3"/>
3749                    <var n="nombre"/>
3750                    <clip pos="1" side="tl" part="lemq"/> 
3751                  </lu>
3752                </out>
3753              </when>
3754              <when>
3755                <test>
3756                  <equal>
3757                    <clip pos="1" side="sl" part="temps"/>
3758                    <lit-tag v="past"/>
3759                  </equal>
3760                </test>
3761                <out>
3762                  <lu>
3763                    <lit v="anar"/>
3764                    <lit-tag v="vaux.p3"/>
3765                    <var n="nombre"/>
3766                  </lu>
3767                  <b/>
3768                  <lu>
3769                    <clip pos="1" side="tl" part="lemh"/>
3770                    <clip pos="1" side="tl" part="a_verb"/>
3771                    <lit-tag v="inf"/>
3772                    <clip pos="1" side="tl" part="lemq"/>
3773                  </lu>
3774                </out>  
3775              </when>
3776              
3778              <otherwise><!-- Quan és 3a sg (has to) -->
3779                <out>
3780                  <lu>   
3781                    <clip pos="1" side="tl" part="lemh"/>
3782                    <clip pos="1" side="tl" part="a_verb"/><!-- pingui2-->
3783                    <clip pos="1" side="tl" part="temps"/>
3784                    <clip pos="1" side="tl" part="pers"/>
3785                    <clip pos="1" side="tl" part="nbr"/>
3786                    <clip pos="1" side="tl" part="lemq"/> 
3787                  </lu> 
3788                </out>
3789              </otherwise>
3790            </choose>
3791          </action>
3792 </rule>
3796  <rule><!-- REGLA: PRONOM AUX VERB (I will come -> jo vindré. I can come -> jo puc venir) -->
3797          <pattern>
3798            <pattern-item n="prsubj"/>
3799            <pattern-item n="aux"/>
3800            <pattern-item n="infpres"/>
3801          </pattern>
3802          <action>
3803           <!--  <out>
3804               <lu>   
3805                 <clip pos="1" side="tl" part="whole"/> 
3806               </lu> 
3807               <b pos="1"/>
3808             </out> MG: prova. Posar funció f_bcond si ho deixo així -->
3809           <choose>
3810             <when>
3811               <test>
3812                 <or>
3813                   <equal caseless="yes">
3814                     <clip pos="2" side="sl" part="lem"/>
3815                     <lit v="will"/>
3816                   </equal>
3817                   <equal caseless="yes">
3818                     <clip pos="2" side="sl" part="lem"/>
3819                     <lit v="would"/>
3820                   </equal>
3821                 </or>
3822               </test>
3823               <choose>          
3824                 <when>
3825                   <test>
3826                     <equal caseless="yes">
3827                       <clip pos="2" side="sl" part="lem"/>
3828                       <lit v="will"/>
3829                     </equal>
3830                   </test>
3831                   <let>
3832                     <clip pos="3" side="tl" part="temps"/>
3833                     <lit-tag v="fti"/>
3834                   </let>
3835                 </when>
3836                 <when>
3837                   <test>
3838                     <equal caseless="yes">
3839                       <clip pos="2" side="sl" part="lem"/>
3840                       <lit v="would"/>
3841                     </equal>
3842                   </test>
3843                   <let>
3844                     <clip pos="3" side="tl" part="temps"/>
3845                     <lit-tag v="cni"/>
3846                   </let>
3847                 </when>         
3848               </choose>
3849               <out>
3850                 <lu>
3851                   <clip pos="3" side="tl" part="lemh"/> 
3852                   <clip pos="3" side="tl" part="a_verb"/>
3853                   <clip pos="3" side="tl" part="temps"/>
3854                   <clip pos="1" side="tl" part="pers"/> 
3855                   <clip pos="1" side="tl" part="nbr"/> 
3856                   <clip pos="3" side="tl" part="lemq"/>
3857                 </lu>
3858               </out>
3859               <call-macro n="f_bcond">
3860                 <with-param pos="2"/>
3861               </call-macro>
3862             </when>
3863             
3864             <when>
3865               <test>
3866                 <or>
3867                   <equal caseless="yes">
3868                     <clip pos="2" side="sl" part="lem"/>
3869                     <lit v="can"/>
3870                   </equal>
3871                   <equal caseless="yes">
3872                     <clip pos="2" side="sl" part="lem"/>
3873                     <lit v="must"/>
3874                   </equal>
3875                   <equal caseless="yes">
3876                     <clip pos="2" side="sl" part="lem"/>
3877                     <lit v="should"/>
3878                   </equal>
3879                   <equal caseless="yes">
3880                     <clip pos="2" side="sl" part="lem"/>
3881                     <lit v="may"/>
3882                   </equal>
3883                   <equal caseless="yes">
3884                     <clip pos="2" side="sl" part="lem"/>
3885                     <lit v="might"/>
3886                   </equal>
3887                 </or>
3888               </test>         
3889               <choose>          
3890                 <when>
3891                   <test>
3892                     <equal caseless="yes">
3893                       <clip pos="2" side="sl" part="lem"/>
3894                       <lit v="can"/>
3895                     </equal>
3896                   </test>
3897                   <choose>
3898                     <when>
3899                       <test>
3900                         <equal>
3901                           <clip pos="2" side="sl" part="temps"/>
3902                           <lit-tag v="pres"/>
3903                         </equal>
3904                       </test>
3905                       <let>
3906                         <clip pos="2" side="tl" part="temps"/>
3907                         <lit-tag v="pri"/>
3908                       </let>
3909                     </when>              
3910                     <when>
3911                       <test>
3912                         <equal>
3913                           <clip pos="2" side="sl" part="temps"/>
3914                           <lit-tag v="past"/>
3915                         </equal>
3916                       </test>
3917                       <let>
3918                         <clip pos="2" side="tl" part="temps"/>
3919                         <lit-tag v="cni"/>
3920                       </let>
3921                     </when>
3922                   </choose>
3923                 </when>
3924                 <when>
3925                   <test>
3926                       <or>
3927                         <equal caseless="yes">
3928                           <clip pos="2" side="sl" part="lem"/>
3929                           <lit v="must"/>
3930                         </equal>
3931                         <equal caseless="yes">
3932                           <clip pos="2" side="sl" part="lem"/>
3933                           <lit v="may"/>
3934                         </equal>
3935                       </or>
3936                   </test>
3937                   <let>
3938                     <clip pos="2" side="tl" part="temps"/>
3939                     <lit-tag v="pri"/>
3940                   </let>
3941                 </when>
3942                   <when>
3943                   <test>
3944                       <or>
3945                         <equal caseless="yes">
3946                           <clip pos="2" side="sl" part="lem"/>
3947                           <lit v="should"/>
3948                         </equal>
3949                         <equal caseless="yes">
3950                           <clip pos="2" side="sl" part="lem"/>
3951                           <lit v="might"/>
3952                         </equal>
3953                       </or>
3954                   </test>
3955                   <let>
3956                     <clip pos="2" side="tl" part="temps"/>
3957                     <lit-tag v="cni"/>
3958                   </let>
3959                 </when>
3960               </choose>      
3962               <out>
3963                 <lu>
3964                   <clip pos="2" side="tl" part="lemh"/>
3965                   <clip pos="2" side="tl" part="a_verb"/>
3966                   <clip pos="2" side="tl" part="temps"/>
3967                   <clip pos="1" side="tl" part="pers"/> 
3968                   <clip pos="1" side="tl" part="nbr"/>
3969                   <clip pos="2" side="tl" part="lemq"/> 
3970                 </lu>
3971                 <b pos="2"/>
3972                 <lu>
3973                   <clip pos="3" side="tl" part="lemh"/> 
3974                   <clip pos="3" side="tl" part="a_verb"/>
3975                   <lit-tag v="inf"/>                    
3976                   <clip pos="3" side="tl" part="lemq"/>
3977                 </lu>
3978               </out>
3979             </when>
3980             <when>
3981               <test>
3982                 <equal caseless="yes">
3983                   <clip pos="2" side="sl" part="lem"/>
3984                   <lit v="do"/>
3985                 </equal>
3986               </test>             
3987               <choose>
3988                 <when>
3989                   <test>
3990                     <or>
3991                       <equal>
3992                         <clip pos="2" side="sl" part="temps"/>
3993                         <lit-tag v="pres"/>
3994                       </equal>
3995                       <equal>
3996                         <clip pos="2" side="sl" part="temps"/>
3997                         <lit-tag v="pri"/>
3998                       </equal>
3999                     </or>
4000                   </test>
4001                   <out>
4002                     <lu>
4003                       <clip pos="3" side="tl" part="lemh"/> 
4004                       <clip pos="3" side="tl" part="a_verb"/>
4005                       <lit-tag v="pri"/>
4006                       <clip pos="1" side="tl" part="pers"/> 
4007                       <clip pos="1" side="tl" part="nbr"/> 
4008                       <clip pos="3" side="tl" part="lemq"/> 
4009                     </lu>
4010                   </out>
4011                 </when>
4012                 <when>
4013                   <test>
4014                     <equal>
4015                       <clip pos="2" side="sl" part="temps"/>
4016                       <lit-tag v="past"/>
4017                     </equal> 
4018                   </test>
4019                   <out>
4020                     <lu>
4021                       <lit v="anar"/>
4022                       <lit-tag v="vaux"/>
4023                       <clip pos="1" side="tl" part="pers"/>
4024                       <clip pos="1" side="tl" part="nbr"/>
4025                     </lu>
4026                     <b/>
4027                     <lu>
4028                       <clip pos="3" side="tl" part="lemh"/>
4029                       <clip pos="3" side="tl" part="a_verb"/>
4030                       <lit-tag v="inf"/>
4031                       <clip pos="3" side="tl" part="lemq"/>
4032                     </lu>
4033                   </out>
4034                 </when>
4035               </choose>
4036             </when>             
4037           </choose>      
4038         </action>
4039   </rule>
4040                 
4041        <rule><!-- REGLA: AUX VERB (will come - vindra/vindran. can come - pot/poden venir)
4042                   Quan no  hi ha abans pronom, és tercera persona ('My father will come'). El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The man who bought apples will come')-->
4043          <pattern>
4044            <pattern-item n="aux"/>
4045            <pattern-item n="infpres"/>
4046          </pattern>
4047          <action>
4048            <choose>  <!--Si la variable nombre no té valor, assignar-li valor 'sg' -->
4049              <when>
4050                <test>
4051                  <equal>
4052                    <var n="nombre"/>
4053                    <lit v=""/>
4054                  </equal>
4055                </test>
4056                <let>
4057                  <var n="nombre"/>
4058                  <lit-tag v="sg"/>
4059                </let>
4060              </when>
4061            </choose>
4062            <choose>
4063              <when>
4064                <test>
4065                  <or>
4066                    <equal caseless="yes">
4067                      <clip pos="1" side="sl" part="lem"/>
4068                      <lit v="will"/>
4069                    </equal>
4070                    <equal caseless="yes">
4071                      <clip pos="1" side="sl" part="lem"/>
4072                      <lit v="would"/>
4073                    </equal>
4074                  </or>
4075                </test>
4076                <choose>         
4077                  <when>
4078                    <test>
4079                      <equal caseless="yes">
4080                        <clip pos="1" side="sl" part="lem"/>
4081                        <lit v="will"/>
4082                      </equal>
4083                    </test>
4084                    <let>
4085                      <clip pos="2" side="tl" part="temps"/>
4086                      <lit-tag v="fti"/>
4087                    </let>
4088                  </when>
4089                  <when>
4090                    <test>
4091                      <equal caseless="yes">
4092                        <clip pos="1" side="sl" part="lem"/>
4093                        <lit v="would"/>
4094                      </equal>
4095                    </test>
4096                    <let>
4097                      <clip pos="2" side="tl" part="temps"/>
4098                      <lit-tag v="cni"/>
4099                    </let>
4100                  </when>                
4101                </choose>
4102                <out>
4103                  <lu>
4104                    <clip pos="2" side="tl" part="lemh"/> 
4105                    <clip pos="2" side="tl" part="a_verb"/>
4106                    <clip pos="2" side="tl" part="temps"/>
4107                    <lit-tag v="p3"/>
4108                    <var n="nombre"/>
4109                    <clip pos="2" side="tl" part="lemq"/> 
4110                  </lu>
4111                </out>
4112                <call-macro n="f_bcond">
4113                  <with-param pos="1"/>
4114                </call-macro>
4115              </when>
4117              
4118              <when>
4119                <test>
4120                  <or>
4121                    <equal caseless="yes">
4122                      <clip pos="1" side="sl" part="lem"/>
4123                      <lit v="can"/>
4124                    </equal>
4125                    <equal caseless="yes">
4126                      <clip pos="1" side="sl" part="lem"/>
4127                      <lit v="must"/>
4128                    </equal>
4129                    <equal caseless="yes">
4130                      <clip pos="1" side="sl" part="lem"/>
4131                      <lit v="should"/>
4132                    </equal>
4133                    <equal caseless="yes">
4134                      <clip pos="1" side="sl" part="lem"/>
4135                      <lit v="may"/>
4136                    </equal>
4137                    <equal caseless="yes">
4138                      <clip pos="1" side="sl" part="lem"/>
4139                      <lit v="might"/>
4140                    </equal>
4141                  </or>
4142                </test>        
4143                <choose> 
4145                  <when>
4146                    <test>
4147                      <equal caseless="yes">
4148                        <clip pos="1" side="sl" part="lem"/>
4149                        <lit v="can"/>
4150                      </equal>
4151                    </test>
4152                    <choose>
4153                      <when>
4154                        <test>
4155                          <equal>
4156                            <clip pos="1" side="sl" part="temps"/>
4157                            <lit-tag v="pres"/>
4158                          </equal>
4159                        </test>
4160                        <let>
4161                          <clip pos="1" side="tl" part="temps"/>
4162                          <lit-tag v="pri"/>
4163                        </let>
4164                      </when>             
4165                      <when>
4166                        <test>
4167                          <equal>
4168                            <clip pos="1" side="sl" part="temps"/>
4169                            <lit-tag v="past"/>
4170                          </equal>
4171                        </test>
4172                        <let>
4173                          <clip pos="1" side="tl" part="temps"/>
4174                          <lit-tag v="cni"/>
4175                        </let>
4176                      </when>
4177                    </choose>
4178                  </when>
4179                  <when>
4180                    <test>
4181                      <or>
4182                        <equal caseless="yes">
4183                          <clip pos="1" side="sl" part="lem"/>
4184                          <lit v="must"/>
4185                        </equal>
4186                        <equal caseless="yes">
4187                          <clip pos="1" side="sl" part="lem"/>
4188                          <lit v="may"/>
4189                        </equal>
4190                      </or>
4191                    </test>
4192                    <let>
4193                      <clip pos="1" side="tl" part="temps"/>
4194                      <lit-tag v="pri"/>
4195                    </let>
4196                  </when>
4197                  <when>
4198                    <test>
4199                      <or>
4200                        <equal caseless="yes">
4201                          <clip pos="1" side="sl" part="lem"/>
4202                          <lit v="should"/>
4203                        </equal>
4204                        <equal caseless="yes">
4205                          <clip pos="1" side="sl" part="lem"/>
4206                          <lit v="might"/>
4207                        </equal>
4208                      </or>
4209                    </test>
4210                    <let>
4211                      <clip pos="1" side="tl" part="temps"/>
4212                      <lit-tag v="cni"/>
4213                    </let>
4214                  </when>
4215                </choose>      
4216                <out>
4217                  <lu>
4218                    <clip pos="1" side="tl" part="lemh"/>
4219                    <clip pos="1" side="tl" part="a_verb"/>
4220                    <clip pos="1" side="tl" part="temps"/>
4221                    <lit-tag v="p3"/>
4222                    <var n="nombre"/>
4223                    <clip pos="1" side="tl" part="lemq"/>
4224                  </lu>
4225                  <b pos="1"/>
4226                  <lu>
4227                    <clip pos="2" side="tl" part="lemh"/> 
4228                    <clip pos="2" side="tl" part="a_verb"/>
4229                    <lit-tag v="inf"/>                   
4230                    <clip pos="2" side="tl" part="lemq"/>
4231                  </lu>
4232                </out>
4233              </when>             
4234              
4235              <when>
4236                <test>
4237                  <equal caseless="yes">
4238                    <clip pos="1" side="sl" part="lem"/>
4239                    <lit v="do"/>
4240                  </equal>
4241                </test>
4242                <choose>
4243                  <when>
4244                    <test>
4245                      <equal>
4246                        <clip pos="1" side="sl" part="temps"/>
4247                        <lit-tag v="pri"/>
4248                      </equal>
4249                    </test>
4250                    
4251                    <out>
4252                      <lu>
4253                        <clip pos="2" side="tl" part="lemh"/> 
4254                        <clip pos="2" side="tl" part="a_verb"/>
4255                        <lit-tag v="pri.p3.sg"/>
4256                        <clip pos="2" side="tl" part="lemq"/> 
4257                      </lu>
4258                    </out>
4259                  </when>
4260                  <when>
4261                    <test>
4262                      <equal>
4263                        <clip pos="1" side="sl" part="temps"/>
4264                        <lit-tag v="pres"/>
4265                      </equal>
4266                    </test>
4267                    <out>
4268                      <lu>
4269                        <clip pos="2" side="tl" part="lemh"/> 
4270                        <clip pos="2" side="tl" part="a_verb"/>
4271                        <lit-tag v="pri.p3"/>
4272                        <var n="nombre"/>
4273                        <clip pos="2" side="tl" part="lemq"/> 
4274                      </lu>
4275                    </out>
4276                  </when>
4277                  <when>
4278                    <test>
4279                      <equal>
4280                        <clip pos="1" side="sl" part="temps"/>
4281                        <lit-tag v="past"/>
4282                      </equal> 
4283                    </test>
4284                    <out>
4285                      <lu>
4286                        <lit v="anar"/>
4287                        <lit-tag v="vaux.p3"/>
4288                        <var n="nombre"/>
4289                      </lu>
4290                      <b/>
4291                      <lu>
4292                        <clip pos="2" side="tl" part="lemh"/>
4293                        <clip pos="2" side="tl" part="a_verb"/>
4294                        <lit-tag v="inf"/>
4295                        <clip pos="2" side="tl" part="lemq"/>
4296                      </lu>
4297                    </out>
4298                  </when>
4299                </choose>
4300              </when>
4301            </choose>
4302          </action>
4303 </rule>
4305 <rule><!-- REGLA: PRONOM + MODAL conjugable + VERB (I had to come - Jo vaig haver (havia?) de venir) -->
4306          <pattern>
4307            <pattern-item n="prsubj"/>
4308            <pattern-item n="mod"/>
4309            <pattern-item n="infpres"/>
4310          </pattern>
4311          <action>
4312            <choose>
4313              <when>
4314                <test>
4315                  <or>
4316                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
4317                      <clip pos="2" side="sl" part="temps"/>
4318                      <lit-tag v="inf"/>
4319                    </equal>
4320                    <equal>
4321                      <clip pos="2" side="sl" part="temps"/>
4322                      <lit-tag v="pres"/>
4323                    </equal>
4324                  </or>
4325                </test>
4326                <out>
4327                 <!-- <lu>   
4328                    <clip pos="1" side="tl" part="whole"/> 
4329                  </lu> 
4330                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
4331                  <lu>
4332                    <clip pos="2" side="tl" part="lemh"/> 
4333                    <clip pos="2" side="tl" part="a_verb"/>
4334                    <lit-tag v="pri"/>
4335                    <clip pos="1" side="tl" part="pers"/> 
4336                    <clip pos="1" side="tl" part="nbr"/> 
4337                    <clip pos="2" side="tl" part="lemq"/> 
4338                  </lu>
4339                  <b pos="2"/>
4340                  <lu>
4341                    <clip pos="3" side="tl" part="lemh"/> 
4342                    <clip pos="3" side="tl" part="a_verb"/>
4343                    <lit-tag v="inf"/>
4344                    <clip pos="3" side="tl" part="lemq"/>
4345                  </lu>
4346                </out>
4347              </when>
4348              <when>
4349                <test>
4350                  <equal>
4351                    <clip pos="2" side="sl" part="temps"/>
4352                    <lit-tag v="past"/>
4353                  </equal>
4354                </test>
4355                <out>
4356                 <!-- <lu>   
4357                    <clip pos="1" side="tl" part="whole"/> 
4358                  </lu> 
4359                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
4360                  <lu>
4361                    <lit v="anar"/>
4362                    <lit-tag v="vaux"/>
4363                    <clip pos="1" side="tl" part="pers"/>
4364                    <clip pos="1" side="tl" part="nbr"/>
4365                  </lu>
4366                  <b/>
4367                  <lu>
4368                    <clip pos="2" side="tl" part="lemh"/>
4369                    <clip pos="2" side="tl" part="a_verb"/>
4370                    <lit-tag v="inf"/>
4371                    <clip pos="2" side="tl" part="lemq"/>
4372                  </lu>
4373                   <b pos="2"/>
4374                  <lu>
4375                    <clip pos="3" side="tl" part="lemh"/> 
4376                    <clip pos="3" side="tl" part="a_verb"/>
4377                    <lit-tag v="inf"/>
4378                    <clip pos="3" side="tl" part="lemq"/>
4379                  </lu>
4380                </out>
4381              </when>
4382              <otherwise><!--3a persona sg (has) i qualsevol altra forma que es coli -->
4383                <out>
4384                 <!-- <lu>   
4385                    <clip pos="1" side="tl" part="whole"/> 
4386                  </lu> 
4387                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
4388                  <lu>   
4389                    <clip pos="2" side="tl" part="lemh"/>
4390                    <clip pos="2" side="tl" part="a_verb"/><!--pingui3-->
4391                    <clip pos="2" side="tl" part="temps"/><!--Si per aquí entra pprs o subs, problema: ampliar la regla o especificar millor la categoria detectada! -->
4392                    <clip pos="1" side="tl" part="pers"/>
4393                    <clip pos="1" side="tl" part="nbr"/>
4394                    <clip pos="2" side="tl" part="lemq"/>
4395                  </lu> 
4396                  <b pos="2"/>
4397                  <lu>
4398                    <clip pos="3" side="tl" part="lemh"/> 
4399                    <clip pos="3" side="tl" part="a_verb"/>
4400                    <lit-tag v="inf"/>
4401                    <clip pos="3" side="tl" part="lemq"/>
4402                  </lu>
4403                </out>
4404              </otherwise>
4405            </choose>
4406          </action>
4407 </rule>
4410 <rule><!-- REGLA: MODAL conjugable + VERB (had to come - va/van haver de venir) 
4411            Quan no  hi ha abans pronom, és tercera persona ('My friends have to come'). En present no hi ha dubte en quant al nombre (have/has). En passat, s'agafa per ara el nombre de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The animals of the zoo have survived')-->
4412          <pattern>
4413            <pattern-item n="mod"/>
4414            <pattern-item n="infpres"/>
4415          </pattern>
4416          <action>
4417            <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
4418              <when>
4419                <test>
4420                  <equal>
4421                    <var n="nombre"/>
4422                    <lit v=""/>
4423                  </equal>
4424                </test>
4425                <let>
4426                  <var n="nombre"/>
4427                  <lit-tag v="sg"/>
4428                </let>
4429              </when>
4430            </choose>
4431            <choose>
4432              <when>
4433                <test>
4434                  <or>
4435                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
4436                      <clip pos="1" side="sl" part="temps"/>
4437                      <lit-tag v="inf"/>
4438                    </equal>
4439                    <equal>
4440                      <clip pos="1" side="sl" part="temps"/>
4441                      <lit-tag v="pres"/>
4442                    </equal>
4443                  </or>
4444                </test>
4445                <out>
4446                  <lu>
4447                    <clip pos="1" side="tl" part="lemh"/> 
4448                    <clip pos="1" side="tl" part="a_verb"/>
4449                    <lit-tag v="pri.p3"/>
4450                    <var n="nombre"/>
4451                    <clip pos="1" side="tl" part="lemq"/> 
4452                  </lu>
4453                </out>
4454              </when>
4455              <when>
4456                <test>
4457                  <equal>
4458                    <clip pos="1" side="sl" part="temps"/>
4459                    <lit-tag v="past"/>
4460                  </equal>
4461                </test>
4462                <out>
4463                  <lu>
4464                    <lit v="anar"/>
4465                    <lit-tag v="vaux.p3"/>
4466                    <var n="nombre"/>
4467                  </lu>
4468                  <b/>
4469                  <lu>
4470                    <clip pos="1" side="tl" part="lemh"/>
4471                    <clip pos="1" side="tl" part="a_verb"/><!--pingui 4-->
4472                    <lit-tag v="inf"/>
4473                    <clip pos="1" side="tl" part="lemq"/>
4474                  </lu>
4475                </out>  
4476              </when>         
4478              <otherwise><!-- Quan és 3a sg (has) -->
4479                <out>
4480                  <lu>   
4481                    <clip pos="1" side="tl" part="lemh"/>
4482                    <clip pos="1" side="tl" part="a_verb"/><!--pingui 5-->
4483                    <clip pos="1" side="tl" part="temps"/>
4484                    <clip pos="1" side="tl" part="pers"/>
4485                    <clip pos="1" side="tl" part="nbr"/>
4486                    <clip pos="1" side="tl" part="lemq"/> 
4487                  </lu> 
4488                </out>
4489              </otherwise>
4490            </choose>
4491            <out>
4492              <b pos="1"/>
4493              <lu>
4494                <clip pos="2" side="tl" part="lemh"/>
4495                <clip pos="2" side="tl" part="a_verb"/>
4496                <lit-tag v="inf"/>
4497                <clip pos="2" side="tl" part="lemq"/> 
4498              </lu> 
4499            </out>
4500          </action>
4501 </rule>
4503 <rule><!-- REGLA: PRONOM + AUX + MODAL conjugable + VERB (I will have to come - Jo hauré de venir)-->
4504          <pattern>
4505            <pattern-item n="prsubj"/>
4506            <pattern-item n="auxnocan"/>
4507            <pattern-item n="modinf"/>
4508            <pattern-item n="infpres"/>
4509          </pattern>
4510          <action>
4511            <!--  <out>
4512                 <lu>   
4513                 <clip pos="1" side="tl" part="whole"/> 
4514                 </lu> 
4515                 <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així
4516                 </out> -->
4517            <choose>
4518              <when>
4519                <test>
4520                  <or>
4521                    <equal caseless="yes">
4522                      <clip pos="2" side="sl" part="lem"/>
4523                      <lit v="will"/>
4524                    </equal>
4525                    <equal caseless="yes">
4526                      <clip pos="2" side="sl" part="lem"/>
4527                      <lit v="would"/>
4528                    </equal>
4529                  </or>
4530                </test>
4531                <choose>         
4532                  <when>
4533                    <test>
4534                      <equal caseless="yes">
4535                        <clip pos="2" side="sl" part="lem"/>
4536                        <lit v="will"/>
4537                      </equal>
4538                    </test>
4539                    <let>
4540                      <clip pos="3" side="tl" part="temps"/>
4541                      <lit-tag v="fti"/>
4542                    </let>
4543                  </when>
4544                  <when>
4545                    <test>
4546                      <equal caseless="yes">
4547                        <clip pos="2" side="sl" part="lem"/>
4548                        <lit v="would"/>
4549                      </equal>
4550                    </test>
4551                    <let>
4552                      <clip pos="3" side="tl" part="temps"/>
4553                      <lit-tag v="cni"/>
4554                    </let>
4555                  </when>                
4556                </choose>
4557                <out>
4558                  <lu>
4559                    <clip pos="3" side="tl" part="lemh"/> 
4560                    <clip pos="3" side="tl" part="a_verb"/>
4561                    <clip pos="3" side="tl" part="temps"/>
4562                    <clip pos="1" side="tl" part="pers"/> 
4563                    <clip pos="1" side="tl" part="nbr"/> 
4564                    <clip pos="3" side="tl" part="lemq"/>
4565                  </lu>
4566                </out>
4567                <call-macro n="f_bcond">
4568                  <with-param pos="2"/>
4569                </call-macro>
4570              </when>
4571              <when>
4572                <test>
4573                  <or>
4574                    <equal caseless="yes">
4575                      <clip pos="2" side="sl" part="lem"/>
4576                      <lit v="may"/>
4577                    </equal>
4578                    <equal caseless="yes">
4579                      <clip pos="2" side="sl" part="lem"/>
4580                      <lit v="might"/>
4581                    </equal>
4582                  </or>
4583                </test>
4584                <choose>
4585                  <when>
4586                    <test>
4587                      <equal caseless="yes">
4588                        <clip pos="2" side="sl" part="lem"/>
4589                        <lit v="may"/>
4590                      </equal>
4591                    </test>
4592                    <let>
4593                      <clip pos="2" side="tl" part="temps"/>
4594                      <lit-tag v="pri"/>
4595                    </let>
4596                  </when>
4597                  <when>
4598                    <test>
4599                      <equal caseless="yes">
4600                        <clip pos="2" side="sl" part="lem"/>
4601                        <lit v="might"/>
4602                      </equal>
4603                    </test>
4604                    <let>
4605                      <clip pos="2" side="tl" part="temps"/>
4606                      <lit-tag v="cni"/>
4607                    </let>
4608                  </when>
4609                </choose>  
4610                <out>
4611                  <lu>
4612                    <clip pos="2" side="tl" part="lemh"/>
4613                    <clip pos="2" side="tl" part="a_verb"/>
4614                    <clip pos="2" side="tl" part="temps"/>
4615                    <clip pos="1" side="tl" part="pers"/> 
4616                    <clip pos="1" side="tl" part="nbr"/>
4617                    <clip pos="2" side="tl" part="lemq"/> 
4618                  </lu>
4619                  <b pos="2"/>
4620                  <lu>
4621                    <clip pos="3" side="tl" part="lemh"/> 
4622                    <clip pos="3" side="tl" part="a_verb"/>
4623                    <lit-tag v="inf"/>                   
4624                    <clip pos="3" side="tl" part="lemq"/>
4625                  </lu>
4626                </out>
4627              </when>
4629              <when>
4630                <test>
4631                  <equal caseless="yes">
4632                    <clip pos="2" side="sl" part="lem"/>
4633                    <lit v="do"/>
4634                  </equal>
4635                </test>
4636                <choose>
4637                  <when>
4638                    <test>
4639                      <or>
4640                        <equal>
4641                          <clip pos="2" side="sl" part="temps"/>
4642                          <lit-tag v="pres"/>
4643                        </equal>
4644                        <equal>
4645                          <clip pos="2" side="sl" part="temps"/>
4646                          <lit-tag v="pri"/>
4647                        </equal>
4648                      </or>
4649                    </test>
4650                    <out>
4651                      <lu>
4652                        <clip pos="3" side="tl" part="lemh"/> 
4653                        <clip pos="3" side="tl" part="a_verb"/>
4654                        <lit-tag v="pri"/>
4655                        <clip pos="1" side="tl" part="pers"/> 
4656                        <clip pos="1" side="tl" part="nbr"/> 
4657                        <clip pos="3" side="tl" part="lemq"/> 
4658                      </lu>
4659                    </out>
4660                  </when>
4661                  <when>
4662                    <test>
4663                      <equal>
4664                        <clip pos="2" side="sl" part="temps"/>
4665                        <lit-tag v="past"/>
4666                      </equal> 
4667                    </test>
4668                    <out>
4669                      <lu>
4670                        <lit v="anar"/>
4671                        <lit-tag v="vaux"/>
4672                        <clip pos="1" side="tl" part="pers"/>
4673                        <clip pos="1" side="tl" part="nbr"/>
4674                      </lu>
4675                      <b/>
4676                      <lu>
4677                        <clip pos="3" side="tl" part="lemh"/>
4678                        <clip pos="3" side="tl" part="a_verb"/>
4679                        <lit-tag v="inf"/>
4680                        <clip pos="3" side="tl" part="lemq"/>
4681                      </lu>
4682                    </out>
4683                  </when>
4684                </choose>
4685              </when>
4686              
4687            </choose>
4688            <out>
4689              <b pos="3"/>
4690              <lu>
4691                <clip pos="4" side="tl" part="lemh"/> 
4692                <clip pos="4" side="tl" part="a_verb"/>
4693                <lit-tag v="inf"/>
4694                <clip pos="4" side="tl" part="lemq"/> 
4695              </lu>
4696            </out>
4697            <call-macro n="f_bcond">
4698              <with-param pos="2"/>
4699            </call-macro>
4700          </action>
4701 </rule>
4703 <rule><!-- REGLA: AUX + MODAL conjugable + VERB (will have to come - haurà/hauran de venir)
4704            Quan no  hi ha abans pronom, és tercera persona ('My father will have to come'). El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The man who bought apples will have to come')-->
4705          <pattern>
4706            <pattern-item n="auxnocan"/>
4707            <pattern-item n="modinf"/>
4708            <pattern-item n="infpres"/>
4709          </pattern>
4710          <action>          
4711            <call-macro n="f_bcond">
4712              <with-param pos="1"/>
4713            </call-macro>
4714            <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
4715              <when>
4716                <test>
4717                  <equal>
4718                    <var n="nombre"/>
4719                    <lit v=""/>
4720                  </equal>
4721                </test>
4722                <let>
4723                  <var n="nombre"/>
4724                  <lit-tag v="sg"/>
4725                </let>
4726              </when>
4727            </choose>
4728            <choose>
4729              <when>
4730                <test>
4731                  <or>
4732                    <equal caseless="yes">
4733                      <clip pos="1" side="sl" part="lem"/>
4734                      <lit v="will"/>
4735                    </equal>
4736                    <equal caseless="yes">
4737                      <clip pos="1" side="sl" part="lem"/>
4738                      <lit v="would"/>
4739                    </equal>
4740                  </or>
4741                </test>
4742                <choose>         
4743                  <when>
4744                    <test>
4745                      <equal caseless="yes">
4746                        <clip pos="1" side="sl" part="lem"/>
4747                        <lit v="will"/>
4748                      </equal>
4749                    </test>
4750                    <let>
4751                      <clip pos="2" side="tl" part="temps"/>
4752                      <lit-tag v="fti"/>
4753                    </let>
4754                  </when>
4755                  <when>
4756                    <test>
4757                      <equal caseless="yes">
4758                        <clip pos="1" side="sl" part="lem"/>
4759                        <lit v="would"/>
4760                      </equal>
4761                    </test>
4762                    <let>
4763                      <clip pos="2" side="tl" part="temps"/>
4764                      <lit-tag v="cni"/>
4765                    </let>
4766                  </when>                
4767                </choose>
4768                <out>
4769                  <lu>
4770                    <clip pos="2" side="tl" part="lemh"/> 
4771                    <clip pos="2" side="tl" part="a_verb"/>
4772                    <clip pos="2" side="tl" part="temps"/>
4773                    <lit-tag v="p3"/>
4774                    <var n="nombre"/>
4775                    <clip pos="2" side="tl" part="lemq"/> 
4776                  </lu>
4777                </out>
4778                <call-macro n="f_bcond">
4779                  <with-param pos="1"/>
4780                </call-macro>
4781              </when>
4782              <when>
4783                <test>
4784                  <or>
4785                    <equal caseless="yes">
4786                      <clip pos="1" side="sl" part="lem"/>
4787                      <lit v="may"/>
4788                    </equal>
4789                    <equal caseless="yes">
4790                      <clip pos="1" side="sl" part="lem"/>
4791                      <lit v="might"/>
4792                    </equal>
4793                  </or>
4794                </test>
4795                <choose>
4796                  <when>
4797                    <test>
4798                      <equal caseless="yes">
4799                        <clip pos="1" side="sl" part="lem"/>
4800                        <lit v="may"/>
4801                      </equal>
4802                    </test>
4803                    <let>
4804                      <clip pos="1" side="tl" part="temps"/>
4805                      <lit-tag v="pri"/>
4806                    </let>
4807                  </when>
4808                  <when>
4809                    <test>
4810                      <equal caseless="yes">
4811                        <clip pos="1" side="sl" part="lem"/>
4812                        <lit v="might"/>
4813                      </equal>
4814                    </test>
4815                    <let>
4816                      <clip pos="1" side="tl" part="temps"/>
4817                      <lit-tag v="cni"/>
4818                    </let>
4819                  </when>
4820                </choose>  
4821                <out>
4822                  <lu>
4823                    <clip pos="1" side="tl" part="lemh"/>
4824                    <clip pos="1" side="tl" part="a_verb"/>
4825                    <clip pos="1" side="tl" part="temps"/>
4826                    <lit-tag v="p3"/>
4827                    <var n="nombre"/> 
4828                    <clip pos="1" side="tl" part="lemq"/> 
4829                  </lu>
4830                  <b pos="1"/>
4831                  <lu>
4832                    <clip pos="2" side="tl" part="lemh"/> 
4833                    <clip pos="2" side="tl" part="a_verb"/>
4834                    <lit-tag v="inf"/>                   
4835                    <clip pos="2" side="tl" part="lemq"/>
4836                  </lu>
4837                </out>
4838              </when>
4840               <when>
4841                 <test>
4842                   <equal caseless="yes">
4843                     <clip pos="1" side="sl" part="lem"/>
4844                     <lit v="do"/>
4845                   </equal>
4846                 </test>
4847                 <choose>
4848                   <when>
4849                     <test>
4850                       <equal>
4851                         <clip pos="1" side="sl" part="temps"/>
4852                         <lit-tag v="pri"/>
4853                       </equal>
4854                     </test>
4855                     <out>
4856                       <lu>
4857                         <clip pos="2" side="tl" part="lemh"/> 
4858                         <clip pos="2" side="tl" part="a_verb"/>
4859                         <lit-tag v="pri.p3.sg"/>
4860                         <clip pos="2" side="tl" part="lemq"/> 
4861                       </lu>
4862                     </out>
4863                   </when>
4864                   <when>
4865                     <test>
4866                         <equal>
4867                           <clip pos="1" side="sl" part="temps"/>
4868                           <lit-tag v="pres"/>
4869                         </equal>
4870                     </test>
4871                     <out>
4872                       <lu>
4873                         <clip pos="2" side="tl" part="lemh"/> 
4874                         <clip pos="2" side="tl" part="a_verb"/>
4875                         <lit-tag v="pri.p3"/>
4876                         <var n="nombre"/>
4877                         <clip pos="2" side="tl" part="lemq"/> 
4878                       </lu>
4879                     </out>
4880                   </when>
4881                   <when>
4882                     <test>
4883                       <equal>
4884                         <clip pos="1" side="sl" part="temps"/>
4885                         <lit-tag v="past"/>
4886                       </equal> 
4887                     </test>
4888                     <out>
4889                       <lu>
4890                         <lit v="anar"/>
4891                         <lit-tag v="vaux.p3"/>
4892                         <var n="nombre"/>
4893                       </lu>
4894                       <b/>
4895                       <lu>
4896                         <clip pos="2" side="tl" part="lemh"/>
4897                         <clip pos="2" side="tl" part="a_verb"/>
4898                         <lit-tag v="inf"/>
4899                         <clip pos="2" side="tl" part="lemq"/>
4900                       </lu>
4901                     </out>
4902                   </when>
4903                 </choose>
4904               </when>
4905            </choose>
4906            <out>
4907              <b pos="2"/>
4908              <lu>
4909                <clip pos="3" side="tl" part="lemh"/>
4910                <clip pos="3" side="tl" part="a_verb"/>
4911                <lit-tag v="inf"/>
4912                <clip pos="3" side="tl" part="lemq"/> 
4913              </lu> 
4914            </out>
4915          </action>
4916 </rule>
4920  <rule><!-- REGLA: PRONOM HAVE PARTICIPI (They have finished - Ells han acabat)-->
4921          <pattern>
4922            <pattern-item n="prsubj"/>
4923            <pattern-item n="have_aux"/>
4924            <pattern-item n="pp"/>
4925          </pattern>
4926          <action>
4927            <!-- <out>
4928               <lu>   
4929                 <clip pos="1" side="tl" part="whole"/> 
4930               </lu> 
4931               <b pos="1"/>
4932             </out> MG: prova. Posar funció f_bcond si ho deixo així -->
4933             <choose>
4934               <when>
4935                <test>
4936                  <or>
4937                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
4938                      <clip pos="2" side="sl" part="temps"/>
4939                      <lit-tag v="inf"/>
4940                    </equal>
4941                    <equal>
4942                      <clip pos="2" side="sl" part="temps"/>
4943                      <lit-tag v="pres"/>
4944                    </equal>
4945                  </or>
4946                </test>
4947                <out>
4948                  <lu>
4949                    <clip pos="2" side="tl" part="lemh"/> 
4950                    <clip pos="2" side="tl" part="a_have_aux"/>
4951                    <lit-tag v="pri"/>
4952                    <clip pos="1" side="tl" part="pers"/> 
4953                    <clip pos="1" side="tl" part="nbr"/> 
4954                    <clip pos="2" side="tl" part="lemq"/> 
4955                  </lu>
4956                </out>
4957               </when>
4958               <when>
4959                 <test>
4960                   <equal>
4961                     <clip pos="2" side="sl" part="temps"/>
4962                     <lit-tag v="past"/>
4963                   </equal>
4964                 </test>
4965                 <out>
4966                   <lu>
4967                     <clip pos="2" side="tl" part="lemh"/> 
4968                     <clip pos="2" side="tl" part="a_have_aux"/>
4969                     <lit-tag v="pii"/>
4970                     <clip pos="1" side="tl" part="pers"/> 
4971                     <clip pos="1" side="tl" part="nbr"/> 
4972                     <clip pos="2" side="tl" part="lemq"/> 
4973                  </lu>
4974                 </out>
4975               </when>
4976               <otherwise>
4977                 <out>
4978                   <lu>
4979                     <clip pos="2" side="tl" part="whole"/>
4980                   </lu>
4981                 </out>
4982               </otherwise>
4983             </choose>
4984             <out>
4985               <b pos="2"/>
4986               <lu>
4987                 <clip pos="3" side="tl" part="lemh"/> 
4988                 <clip pos="3" side="tl" part="a_pp"/>
4989                 <lit-tag v="m.sg"/>
4990                 <clip pos="3" side="tl" part="lemq"/> 
4991               </lu>
4992             </out>
4993          </action>
4994 </rule>
4995               
4999 <rule><!-- REGLA: HAVE PARTICIPI (have finished - han acabat) - Quan no  hi ha abans pronom, és tercera persona. En present no hi ha dubte en quant al nombre (has come/ have come). En passat, s'agafa per ara el nombre de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The situation in these countries had changed')-->
5000          <pattern>
5001            <pattern-item n="have_aux"/>
5002            <pattern-item n="pp"/>
5003          </pattern>
5004          <action>
5005             <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
5006              <when>
5007                <test>
5008                  <equal>
5009                    <var n="nombre"/>
5010                    <lit v=""/>
5011                  </equal>
5012                </test>
5013                <let>
5014                  <var n="nombre"/>
5015                  <lit-tag v="sg"/>
5016                </let>
5017              </when>
5018            </choose>
5019             <choose>
5020               <when>
5021                 <test>
5022                   <or>
5023                     <equal>
5024                       <clip pos="1" side="sl" part="temps"/>
5025                       <lit-tag v="inf"/>
5026                     </equal>
5027                     <equal>
5028                      <clip pos="1" side="sl" part="temps"/>
5029                      <lit-tag v="pres"/>
5030                    </equal>
5031                   </or>
5032                 </test>
5033                 <out>
5034                  <lu>
5035                    <clip pos="1" side="tl" part="lem"/> 
5036                    <clip pos="1" side="tl" part="a_have_aux"/>
5037                    <lit-tag v="pri.p3.pl"/>
5038                  </lu>
5039                </out>
5040               </when>
5041               <when>
5042                 <test>
5043                   <equal>
5044                     <clip pos="1" side="sl" part="temps"/>
5045                     <lit-tag v="past"/>
5046                   </equal>
5047                 </test>
5048               <out>
5049                  <lu>
5050                    <clip pos="1" side="tl" part="lem"/> 
5051                    <clip pos="1" side="tl" part="a_have_aux"/>
5052                    <lit-tag v="pii.p3"/>
5053                    <var n="nombre"/>
5054                  </lu>
5055               </out>
5056               </when>
5057               <otherwise><!--Quan és 3a persona sg (has) -->
5058                 <out>
5059                   <lu>
5060                     <clip pos="1" side="tl" part="whole"/>
5061                   </lu>
5062                 </out>
5063               </otherwise>
5064             </choose>
5065             <out>
5066               <b pos="1"/>
5067               <lu>
5068                 <clip pos="2" side="tl" part="lemh"/> 
5069                 <clip pos="2" side="tl" part="a_pp"/>
5070                 <lit-tag v="m.sg"/>
5071                 <clip pos="2" side="tl" part="lemq"/> 
5072               </lu>
5073             </out>
5074          </action>
5075 </rule>
5077 <!--***************** present i past continuous ****************************** -->
5079 <rule><!-- REGLA: PRONOM BE GER (I am saying -> estic dient)-->
5080          <pattern>
5081                  <pattern-item n="prsubj"/>
5082                  <pattern-item n="be"/>
5083                  <pattern-item n="ger"/>
5084          </pattern>
5085          <action>
5086            <choose>
5087              <when>
5088                <test>
5089                  <or>
5090                    <equal>
5091                      <clip pos="2" side="sl" part="temps"/>
5092                      <lit-tag v="pri"/>
5093                    </equal> 
5094                    <equal>
5095                      <clip pos="2" side="sl" part="temps"/>
5096                      <lit-tag v="pres"/>
5097                    </equal>
5098                  </or>
5099                </test>
5100                <call-macro n="f_bcond">
5101                    <with-param pos="1"/>
5102                  </call-macro>
5103                <out><!--'Estic dient' -->                
5104                  <lu> 
5105                    <lit v="estar"/>
5106                    <lit-tag v="vblex.pri"/>
5107                    <clip pos="1" side="tl" part="pers"/> 
5108                    <clip pos="1" side="tl" part="nbr"/> 
5109                  </lu>
5110                  <b pos="2"/>
5111                  <lu>
5112                      <clip pos="3" side="tl" part="lemh"/> 
5113                      <clip pos="3" side="tl" part="a_verb"/>
5114                      <clip pos="3" side="tl" part="temps"/>
5115                      <clip pos="3" side="tl" part="lemq"/>
5116                  </lu>
5117                </out>          
5118              </when>
5119              <when>
5120                <test>
5121                  <equal>
5122                    <clip pos="2" side="sl" part="temps"/>
5123                    <lit-tag v="past"/>
5124                  </equal>
5125                </test>
5126                <call-macro n="f_bcond">
5127                  <with-param pos="1"/>
5128                </call-macro>
5129                <call-macro n="f_bcond">
5130                  <with-param pos="2"/>
5131                </call-macro>
5132                <out> <!--'Deia' -->
5133                  <lu> 
5134                    <clip pos="3" side="tl" part="lemh"/> 
5135                    <clip pos="3" side="tl" part="a_verb"/>
5136                    <lit-tag v="pii"/>
5137                    <clip pos="1" side="tl" part="pers"/>
5138                    <clip pos="1" side="tl" part="nbr"/>
5139                    <clip pos="3" side="tl" part="lemq"/>
5140                  </lu>          
5141                </out>
5142              </when>
5143              <otherwise><!--altres coses que es colin -->
5144                <call-macro n="f_bcond">
5145                  <with-param pos="1"/>
5146                </call-macro>
5147                <out>
5148                  <lu>
5149                    <clip pos="2" side="tl" part="whole"/>
5150                  </lu>
5151                  <b pos="2"/>
5152                  <lu>
5153                    <clip pos="3" side="tl" part="lemh"/> 
5154                    <clip pos="3" side="tl" part="a_verb"/>
5155                    <clip pos="3" side="tl" part="temps"/>
5156                    <clip pos="3" side="tl" part="lemq"/>
5157                  </lu>
5158                </out>
5159              </otherwise>
5160            </choose>
5161  </action>
5162  </rule>
5165 <rule><!-- REGLA: BE GER ((John) is working -> està treballant) Quan no  hi ha abans pronom, és tercera persona. El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent.-->
5166          <pattern>
5167                  <pattern-item n="be"/>
5168                  <pattern-item n="ger"/>
5169          </pattern>
5170          <action>
5171            <choose>
5172              <when>
5173                <test>
5174                  <or>
5175                    <equal>
5176                      <clip pos="1" side="sl" part="temps"/>
5177                      <lit-tag v="pri"/>
5178                    </equal> 
5179                    <equal>
5180                      <clip pos="1" side="sl" part="temps"/>
5181                      <lit-tag v="pres"/>
5182                    </equal>
5183                  </or>
5184                </test>
5185                <out><!--'Estic dient' -->                
5186                  <lu> 
5187                    <lit v="estar"/>
5188                    <lit-tag v="vblex.pri"/>
5189                    <lit-tag v="p3"/>
5190                    <var n="nombre"/>
5191                  </lu>
5192                  <b pos="1"/>
5193                  <lu>
5194                      <clip pos="2" side="tl" part="lemh"/> 
5195                      <clip pos="2" side="tl" part="a_verb"/>
5196                      <clip pos="2" side="tl" part="temps"/>
5197                      <clip pos="2" side="tl" part="lemq"/>
5198                  </lu>
5199                </out>          
5200              </when>
5201              <when>
5202                <test>
5203                  <equal>
5204                    <clip pos="1" side="sl" part="temps"/>
5205                    <lit-tag v="past"/>
5206                  </equal>
5207                </test>
5208                <call-macro n="f_bcond">
5209                  <with-param pos="1"/>
5210                </call-macro>
5211                <out> <!--'treballava' -->
5212                  <lu> 
5213                    <clip pos="2" side="tl" part="lemh"/> 
5214                    <clip pos="2" side="tl" part="a_verb"/>
5215                    <lit-tag v="pii"/>
5216                    <lit-tag v="p3"/>
5217                    <var n="nombre"/> 
5218                    <clip pos="2" side="tl" part="lemq"/>
5219                  </lu>          
5220                </out>
5221              </when>
5222              <otherwise><!--altres coses que es colin -->
5223                <out>
5224                  <lu>
5225                    <clip pos="1" side="tl" part="whole"/>
5226                  </lu>
5227                  <b pos="1"/>
5228                  <lu>
5229                    <clip pos="2" side="tl" part="lemh"/> 
5230                    <clip pos="2" side="tl" part="a_verb"/>
5231                    <clip pos="2" side="tl" part="temps"/>
5232                    <clip pos="2" side="tl" part="lemq"/>
5233                  </lu>
5234                </out>
5235              </otherwise>
5236            </choose>
5237  </action>
5238  </rule>
5240 <rule><!-- REGLA: PRONOM BE ADV GER (I am always/not saying -> sempre/no estic dient)-->
5241          <pattern>
5242                  <pattern-item n="prsubj"/>
5243                  <pattern-item n="be"/>
5244                  <pattern-item n="adv"/>
5245                  <pattern-item n="ger"/>
5246          </pattern>
5247          <action>
5248            <choose>
5249              <when>
5250                <test>
5251                  <or>
5252                    <equal>
5253                      <clip pos="2" side="sl" part="temps"/>
5254                      <lit-tag v="pri"/>
5255                    </equal> 
5256                    <equal>
5257                      <clip pos="2" side="sl" part="temps"/>
5258                      <lit-tag v="pres"/>
5259                    </equal>
5260                  </or>
5261                </test>
5262                <call-macro n="f_bcond">
5263                    <with-param pos="1"/>
5264                  </call-macro>
5265                <out><!--'Estic dient' -->
5266                  <lu>
5267                    <clip pos="3" side="tl" part="whole"/> 
5268                  </lu>
5269                   <b pos="2"/>
5270                  <lu> 
5271                    <lit v="estar"/>
5272                    <lit-tag v="vblex.pri"/>
5273                    <clip pos="1" side="tl" part="pers"/> 
5274                    <clip pos="1" side="tl" part="nbr"/> 
5275                  </lu>
5276                  <b pos="3"/>
5277                  <lu>
5278                      <clip pos="4" side="tl" part="lemh"/> 
5279                      <clip pos="4" side="tl" part="a_verb"/>
5280                      <clip pos="4" side="tl" part="temps"/>
5281                      <clip pos="4" side="tl" part="lemq"/>
5282                  </lu>
5283                </out>          
5284              </when>
5285              <when>
5286                <test>
5287                  <equal>
5288                    <clip pos="2" side="sl" part="temps"/>
5289                    <lit-tag v="past"/>
5290                  </equal>
5291                </test>
5292                <call-macro n="f_bcond">
5293                  <with-param pos="1"/>
5294                </call-macro>
5295                <call-macro n="f_bcond">
5296                  <with-param pos="2"/>
5297                </call-macro>
5298                <out> <!--'Deia' -->
5299                  <lu>
5300                    <clip pos="3" side="tl" part="whole"/> 
5301                  </lu>
5302                   <b pos="3"/>
5303                  <lu> 
5304                    <clip pos="4" side="tl" part="lemh"/> 
5305                    <clip pos="4" side="tl" part="a_verb"/>
5306                    <lit-tag v="pii"/>
5307                    <clip pos="1" side="tl" part="pers"/>
5308                    <clip pos="1" side="tl" part="nbr"/>
5309                    <clip pos="4" side="tl" part="lemq"/>
5310                  </lu>          
5311                </out>
5312              </when>
5313              <otherwise><!--altres coses que es colin -->
5314                <call-macro n="f_bcond">
5315                  <with-param pos="1"/>
5316                </call-macro>
5317                <out>
5318                  <lu>
5319                    <clip pos="3" side="tl" part="whole"/> 
5320                  </lu>
5321                   <b pos="2"/>
5322                  <lu>
5323                    <clip pos="2" side="tl" part="whole"/>
5324                  </lu>
5325                  <b pos="3"/>
5326                  <lu>
5327                    <clip pos="4" side="tl" part="lemh"/> 
5328                    <clip pos="4" side="tl" part="a_verb"/>
5329                    <clip pos="4" side="tl" part="temps"/>
5330                    <clip pos="4" side="tl" part="lemq"/>
5331                  </lu>
5332                </out>
5333              </otherwise>
5334            </choose>
5335  </action>
5336  </rule>
5339 <rule><!-- REGLA: BE ADV GER ((John) is always/not working -> sempre/no està treballant) Quan no  hi ha abans pronom, és tercera persona. El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent.-->
5340          <pattern>
5341            <pattern-item n="be"/>
5342            <pattern-item n="adv"/>
5343            <pattern-item n="ger"/>
5344          </pattern>
5345          <action>
5346            <choose>
5347              <when>
5348                <test>
5349                  <or>
5350                    <equal>
5351                      <clip pos="1" side="sl" part="temps"/>
5352                      <lit-tag v="pri"/>
5353                    </equal> 
5354                    <equal>
5355                      <clip pos="1" side="sl" part="temps"/>
5356                      <lit-tag v="pres"/>
5357                    </equal>
5358                  </or>
5359                </test>
5360                <out><!--'Estic dient' -->
5361                  <lu>
5362                    <clip pos="2" side="tl" part="whole"/> 
5363                  </lu>
5364                  <b pos="1"/>
5365                  <lu> 
5366                    <lit v="estar"/>
5367                    <lit-tag v="vblex.pri"/>
5368                    <lit-tag v="p3"/>
5369                    <var n="nombre"/>
5370                  </lu>
5371                  <b pos="2"/>
5372                  <lu>
5373                      <clip pos="3" side="tl" part="lemh"/> 
5374                      <clip pos="3" side="tl" part="a_verb"/>
5375                      <clip pos="3" side="tl" part="temps"/>
5376                      <clip pos="3" side="tl" part="lemq"/>
5377                  </lu>
5378                </out>          
5379              </when>
5380              <when>
5381                <test>
5382                  <equal>
5383                    <clip pos="1" side="sl" part="temps"/>
5384                    <lit-tag v="past"/>
5385                  </equal>
5386                </test>
5387                <call-macro n="f_bcond">
5388                  <with-param pos="1"/>
5389                </call-macro>
5390                <out> <!--'treballava' -->
5391                  <lu>
5392                    <clip pos="2" side="tl" part="whole"/> 
5393                  </lu>
5394                  <b pos="2"/>
5395                  <lu> 
5396                    <clip pos="3" side="tl" part="lemh"/> 
5397                    <clip pos="3" side="tl" part="a_verb"/>
5398                    <lit-tag v="pii"/>
5399                    <lit-tag v="p3"/>
5400                    <var n="nombre"/> 
5401                    <clip pos="3" side="tl" part="lemq"/>
5402                  </lu>          
5403                </out>
5404              </when>
5405              <otherwise><!--altres coses que es colin -->
5406                <out>
5407                  <lu>
5408                    <clip pos="1" side="tl" part="whole"/>
5409                  </lu>
5410                  <b pos="1"/>
5411                  <lu>
5412                    <clip pos="2" side="tl" part="whole"/> 
5413                  </lu>
5414                  <b pos="2"/>
5415                  <lu>
5416                    <clip pos="3" side="tl" part="lemh"/> 
5417                    <clip pos="3" side="tl" part="a_verb"/>
5418                    <clip pos="3" side="tl" part="temps"/>
5419                    <clip pos="3" side="tl" part="lemq"/>
5420                  </lu>
5421                </out>
5422              </otherwise>
5423            </choose>
5424  </action>
5425  </rule>
5427 <!--**************************************** SV AMB ADVERBIS INTERCALATS *******************************
5428                                               (negacions i altres) -->
5430  <rule><!-- REGLA: PRONOM VERB (I always think -> sempre penso)-->
5431          <pattern>
5432                  <pattern-item n="prsubj"/>
5433                  <pattern-item n="adv"/>
5434                  <pattern-item n="verbcj"/>
5435          </pattern>
5436          <action>
5437            <out>
5438              <!--        <lu>   
5439                  <clip pos="1" side="tl" part="whole"/> 
5440                  </lu> 
5441                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
5442              <lu>
5443                <clip pos="2" side="tl" part="whole"/> 
5444              </lu>
5445              <b pos="2"/>
5446            </out>
5447            <choose>
5448              <when>
5449                <test>
5450         <!--     <or> 
5451                    <equal>
5452                      <clip pos="3" side="sl" part="temps"/>
5453                      <lit-tag v="inf"/>
5454                    </equal> --><!--De moment no sé si el tagger escull bé i els detecto els dos. Canviar potser  -->
5455                    <equal>
5456                      <clip pos="3" side="sl" part="temps"/>
5457                      <lit-tag v="pres"/>
5458                    </equal>
5459         <!--     </or> -->
5460                </test>
5461                <out>
5463                  <lu> 
5464                    <clip pos="3" side="tl" part="lemh"/> 
5465                    <clip pos="3" side="tl" part="a_verb"/>
5466                    <lit-tag v="pri"/>
5467                    <clip pos="1" side="tl" part="pers"/> 
5468                    <clip pos="1" side="tl" part="nbr"/> 
5469                    <clip pos="3" side="tl" part="lemq"/> 
5470                  </lu>
5471                </out>
5472              </when>
5473              <when>
5474                <test>
5475                  <equal>
5476                    <clip pos="3" side="sl" part="temps"/>
5477                    <lit-tag v="past"/>
5478                  </equal>
5479                </test>
5480                <out>
5481                  <lu>
5482                    <lit v="anar"/>
5483                    <lit-tag v="vaux"/>
5484                    <clip pos="1" side="tl" part="pers"/>
5485                    <clip pos="1" side="tl" part="nbr"/>
5486                  </lu>
5487                  <b/>
5488                  <lu>
5489                    <clip pos="3" side="tl" part="lemh"/>
5490                    <clip pos="3" side="tl" part="a_verb"/><!--Pq vaig posar sl? -->
5491                    <lit-tag v="inf"/>
5492                    <clip pos="3" side="tl" part="lemq"/>
5493                  </lu>
5494                </out>
5495              </when>
5496              <otherwise><!--La 3p sg (comes) -->
5497                <out>
5498                  <lu>   
5499                    <clip pos="3" side="tl" part="lemh"/>
5500                    <clip pos="3" side="tl" part="a_verb"/><!--pingui 6-->
5501                    <clip pos="3" side="tl" part="temps"/>
5502                    <clip pos="3" side="tl" part="pers"/>
5503                    <clip pos="3" side="tl" part="nbr"/>
5504                    <clip pos="3" side="tl" part="lemq"/>
5505                  </lu> 
5506                </out>
5507              </otherwise>
5508            </choose>
5509  </action>
5510  </rule>
5513  <rule><!-- REGLA: PRONOM AUX ADV VERB (I will always think -> sempre pensaré. I can always think -> sempre puc pensar. I will not think -> no pensaré. I do not think -> no penso. I do always think -> sempre penso) -->
5514          <pattern>
5515            <pattern-item n="prsubj"/>
5516            <pattern-item n="aux"/>
5517            <pattern-item n="adv"/>
5518            <pattern-item n="infpres"/>
5519          </pattern>
5520          <action>
5521            
5522           <!--  <out>
5523               <lu>   
5524                 <clip pos="1" side="tl" part="whole"/> 
5525               </lu> 
5526               <b pos="1"/>
5527             </out> MG: prova. Posar funció f_bcond si ho deixo així -->
5528           <out>
5529             <lu>
5530               <clip pos="3" side="tl" part="whole"/> 
5531             </lu>
5532             <b pos="2"/>
5533           </out>
5534           <choose>
5535             <when>
5536               <test>
5537                 <or>
5538                   <equal caseless="yes">
5539                     <clip pos="2" side="sl" part="lem"/>
5540                     <lit v="will"/>
5541                   </equal>
5542                   <equal caseless="yes">
5543                     <clip pos="2" side="sl" part="lem"/>
5544                     <lit v="would"/>
5545                   </equal>
5546                 </or>
5547               </test>
5548               <choose>          
5549                 <when>
5550                   <test>
5551                     <equal caseless="yes">
5552                       <clip pos="2" side="sl" part="lem"/>
5553                       <lit v="will"/>
5554                     </equal>
5555                   </test>
5556                   <let>
5557                     <clip pos="4" side="tl" part="temps"/>
5558                     <lit-tag v="fti"/>
5559                   </let>
5560                 </when>
5561                 <when>
5562                   <test>
5563                     <equal caseless="yes">
5564                       <clip pos="2" side="sl" part="lem"/>
5565                       <lit v="would"/>
5566                     </equal>
5567                   </test>
5568                   <let>
5569                     <clip pos="4" side="tl" part="temps"/>
5570                     <lit-tag v="cni"/>
5571                   </let>
5572                 </when>         
5573               </choose>
5574               <out>
5575                 <lu>
5576                   <clip pos="4" side="tl" part="lemh"/> 
5577                   <clip pos="4" side="tl" part="a_verb"/>
5578                   <clip pos="4" side="tl" part="temps"/>
5579                   <clip pos="1" side="tl" part="pers"/> 
5580                   <clip pos="1" side="tl" part="nbr"/> 
5581                   <clip pos="4" side="tl" part="lemq"/> 
5582                 </lu>
5583               </out>
5584               <call-macro n="f_bcond">
5585                 <with-param pos="3"/>
5586               </call-macro>
5587             </when>
5590             <when>
5591               <test>
5592                 <or>
5593                   <equal caseless="yes">
5594                     <clip pos="2" side="sl" part="lem"/>
5595                     <lit v="can"/>
5596                   </equal>
5597                   <equal caseless="yes">
5598                     <clip pos="2" side="sl" part="lem"/>
5599                     <lit v="must"/>
5600                   </equal>
5601                   <equal caseless="yes">
5602                     <clip pos="2" side="sl" part="lem"/>
5603                     <lit v="should"/>
5604                   </equal>
5605                   <equal caseless="yes">
5606                     <clip pos="2" side="sl" part="lem"/>
5607                     <lit v="may"/>
5608                   </equal>
5609                   <equal caseless="yes">
5610                     <clip pos="2" side="sl" part="lem"/>
5611                     <lit v="might"/>
5612                   </equal>
5613                 </or>
5614               </test>         
5615               <choose>  
5616                 <when>
5617                   <test>
5618                     <equal caseless="yes">
5619                       <clip pos="2" side="sl" part="lem"/>
5620                       <lit v="can"/>
5621                     </equal>
5622                   </test>
5623                   <choose>
5624                     <when>
5625                       <test>
5626                         <equal>
5627                           <clip pos="2" side="sl" part="temps"/>
5628                           <lit-tag v="pres"/>
5629                         </equal>
5630                       </test>
5631                       <let>
5632                         <clip pos="2" side="tl" part="temps"/>
5633                         <lit-tag v="pri"/>
5634                       </let>
5635                     </when>              
5636                     <when>
5637                       <test>
5638                         <equal>
5639                           <clip pos="2" side="sl" part="temps"/>
5640                           <lit-tag v="past"/>
5641                         </equal>
5642                       </test>
5643                       <let>
5644                         <clip pos="2" side="tl" part="temps"/>
5645                         <lit-tag v="cni"/>
5646                       </let>
5647                     </when>
5648                   </choose>
5649                 </when>
5650                 <when>
5651                   <test>
5652                     <or>
5653                       <equal caseless="yes">
5654                         <clip pos="2" side="sl" part="lem"/>
5655                         <lit v="must"/>
5656                       </equal>
5657                       <equal caseless="yes">
5658                         <clip pos="2" side="sl" part="lem"/>
5659                         <lit v="may"/>
5660                       </equal>
5661                     </or>
5662                   </test>
5663                   <let>
5664                     <clip pos="2" side="tl" part="temps"/>
5665                     <lit-tag v="pri"/>
5666                   </let>
5667                 </when>
5668                 <when>
5669                   <test>
5670                     <or>
5671                       <equal caseless="yes">
5672                         <clip pos="2" side="sl" part="lem"/>
5673                         <lit v="should"/>
5674                       </equal>
5675                       <equal caseless="yes">
5676                         <clip pos="2" side="sl" part="lem"/>
5677                         <lit v="might"/>
5678                       </equal>
5679                     </or>
5680                   </test>
5681                   <let>
5682                     <clip pos="2" side="tl" part="temps"/>
5683                     <lit-tag v="cni"/>
5684                   </let>
5685                 </when>
5686               </choose> 
5687               <out>
5688                 <lu>
5689                   <clip pos="2" side="tl" part="lemh"/>
5690                   <clip pos="2" side="tl" part="a_verb"/>
5691                   <clip pos="2" side="tl" part="temps"/>
5692                   <clip pos="1" side="tl" part="pers"/> 
5693                   <clip pos="1" side="tl" part="nbr"/> 
5694                   <clip pos="2" side="tl" part="lemq"/>
5695                 </lu>
5696                 <b pos="3"/>
5697                 <lu>
5698                   <clip pos="4" side="tl" part="lemh"/> 
5699                   <clip pos="4" side="tl" part="a_verb"/>
5700                   <lit-tag v="inf"/>                    
5701                   <clip pos="4" side="tl" part="lemq"/>
5702                 </lu>
5703               </out>
5704             </when>
5706             <when>
5707               <test>
5708                 <equal caseless="yes">
5709                   <clip pos="2" side="sl" part="lem"/>
5710                   <lit v="do"/>
5711                 </equal>
5712               </test>
5713               <choose>
5714                 <when>
5715                   <test>
5716                     <or>
5717                       <equal>
5718                         <clip pos="2" side="sl" part="temps"/>
5719                         <lit-tag v="pres"/>
5720                       </equal>
5721                       <equal>
5722                         <clip pos="2" side="sl" part="temps"/>
5723                         <lit-tag v="pri"/>
5724                       </equal>
5725                     </or>
5726                   </test>
5727                   <out>
5728                     <lu>
5729                       <clip pos="4" side="tl" part="lemh"/> 
5730                       <clip pos="4" side="tl" part="a_verb"/>
5731                       <lit-tag v="pri"/>
5732                       <clip pos="1" side="tl" part="pers"/> 
5733                       <clip pos="1" side="tl" part="nbr"/> 
5734                       <clip pos="4" side="tl" part="lemq"/> 
5735                     </lu>
5736                   </out>
5737                 </when>
5738                 <when>
5739                   <test>
5740                     <equal>
5741                       <clip pos="2" side="sl" part="temps"/>
5742                       <lit-tag v="past"/>
5743                     </equal> 
5744                   </test>
5745                   <out>
5746                     <lu>
5747                       <lit v="anar"/>
5748                       <lit-tag v="vaux"/>
5749                       <clip pos="1" side="tl" part="pers"/> 
5750                       <clip pos="1" side="tl" part="nbr"/>
5751                     </lu>
5752                     <b/>
5753                     <lu>
5754                       <clip pos="4" side="tl" part="lemh"/>
5755                       <clip pos="4" side="tl" part="a_verb"/>
5756                       <lit-tag v="inf"/>
5757                       <clip pos="4" side="tl" part="lemq"/>
5758                     </lu>
5759                   </out>
5760                 </when>
5761               </choose>
5762             </when>
5763           </choose>
5764         </action>
5765 </rule>
5767 <rule><!-- REGLA: AUX ADV VERB (will not come - no vindra/vindran. can always come - sempre pot/poden venir. Do not come - no ve/venen.)
5768            Quan no  hi ha abans pronom, és tercera persona ('My father will come'). El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The man who bought apples will come')-->
5769          <pattern>
5770            <pattern-item n="aux"/>
5771            <pattern-item n="adv"/>
5772            <pattern-item n="infpres"/>
5773          </pattern>
5774          <action>
5775            <out>
5776              <lu>
5777                <clip pos="2" side="tl" part="whole"/> 
5778              </lu>
5779              <b pos="1"/>
5780            </out>
5781            <choose>  <!--Si la variable nombre no té valor, assignar-li valor 'sg' -->
5782              <when>
5783                <test>
5784                  <equal>
5785                    <var n="nombre"/>
5786                    <lit v=""/>
5787                  </equal>
5788                </test>
5789                <let>
5790                  <var n="nombre"/>
5791                  <lit-tag v="sg"/>
5792                </let>
5793              </when>
5794            </choose>
5795            <choose>
5796              <when>
5797                <test>
5798                  <or>
5799                    <equal caseless="yes">
5800                      <clip pos="1" side="sl" part="lem"/>
5801                      <lit v="will"/>
5802                    </equal>
5803                    <equal caseless="yes">
5804                      <clip pos="1" side="sl" part="lem"/>
5805                      <lit v="would"/>
5806                    </equal>
5807                  </or>
5808                </test>
5809                <choose>         
5810                  <when>
5811                    <test>
5812                      <equal caseless="yes">
5813                        <clip pos="1" side="sl" part="lem"/>
5814                        <lit v="will"/>
5815                      </equal>
5816                    </test>
5817                    <let>
5818                      <clip pos="3" side="tl" part="temps"/>
5819                      <lit-tag v="fti"/>
5820                    </let>
5821                  </when>
5822                  <when>
5823                    <test>
5824                      <equal caseless="yes">
5825                        <clip pos="1" side="sl" part="lem"/>
5826                        <lit v="would"/>
5827                      </equal>
5828                    </test>
5829                    <let>
5830                      <clip pos="3" side="tl" part="temps"/>
5831                      <lit-tag v="cni"/>
5832                    </let>
5833                  </when>                
5834                </choose>
5835                <out>
5836                  <lu>
5837                    <clip pos="3" side="tl" part="lemh"/> 
5838                    <clip pos="3" side="tl" part="a_verb"/>
5839                    <clip pos="3" side="tl" part="temps"/>
5840                    <lit-tag v="p3"/>
5841                    <var n="nombre"/>
5842                    <clip pos="3" side="tl" part="lemq"/> 
5843                  </lu>
5844                </out>
5845                <call-macro n="f_bcond">
5846                  <with-param pos="2"/>
5847                </call-macro>
5848              </when>
5849              
5850              <when>
5851                <test>
5852                  <or>
5853                    <equal caseless="yes">
5854                      <clip pos="1" side="sl" part="lem"/>
5855                      <lit v="can"/>
5856                    </equal>
5857                    <equal caseless="yes">
5858                      <clip pos="1" side="sl" part="lem"/>
5859                      <lit v="must"/>
5860                    </equal>
5861                    <equal caseless="yes">
5862                      <clip pos="1" side="sl" part="lem"/>
5863                      <lit v="should"/>
5864                    </equal>
5865                    <equal caseless="yes">
5866                      <clip pos="1" side="sl" part="lem"/>
5867                      <lit v="may"/>
5868                    </equal>
5869                    <equal caseless="yes">
5870                      <clip pos="1" side="sl" part="lem"/>
5871                      <lit v="might"/>
5872                    </equal>
5873                  </or>
5874                </test>        
5875                <choose> 
5876                  <when>
5877                    <test>
5878                      <equal caseless="yes">
5879                        <clip pos="1" side="sl" part="lem"/>
5880                        <lit v="can"/>
5881                      </equal>
5882                    </test>
5883                    <choose>
5884                      <when>
5885                        <test>
5886                          <equal>
5887                            <clip pos="1" side="sl" part="temps"/>
5888                            <lit-tag v="pres"/>
5889                          </equal>
5890                        </test>
5891                        <let>
5892                          <clip pos="1" side="tl" part="temps"/>
5893                          <lit-tag v="pri"/>
5894                        </let>
5895                      </when>             
5896                      <when>
5897                        <test>
5898                          <equal>
5899                            <clip pos="1" side="sl" part="temps"/>
5900                            <lit-tag v="past"/>
5901                          </equal>
5902                        </test>
5903                        <let>
5904                          <clip pos="1" side="tl" part="temps"/>
5905                          <lit-tag v="cni"/>
5906                        </let>
5907                      </when>
5908                    </choose>
5909                  </when>
5910                  <when>
5911                    <test>
5912                      <or>
5913                        <equal caseless="yes">
5914                          <clip pos="1" side="sl" part="lem"/>
5915                          <lit v="must"/>
5916                        </equal>
5917                        <equal caseless="yes">
5918                          <clip pos="1" side="sl" part="lem"/>
5919                          <lit v="may"/>
5920                        </equal>
5921                      </or>
5922                    </test>
5923                    <let>
5924                      <clip pos="1" side="tl" part="temps"/>
5925                      <lit-tag v="pri"/>
5926                    </let>
5927                  </when>
5928                  <when>
5929                    <test>
5930                      <or>
5931                        <equal caseless="yes">
5932                          <clip pos="1" side="sl" part="lem"/>
5933                          <lit v="should"/>
5934                        </equal>
5935                        <equal caseless="yes">
5936                          <clip pos="1" side="sl" part="lem"/>
5937                          <lit v="might"/>
5938                        </equal>
5939                      </or>
5940                    </test>
5941                    <let>
5942                      <clip pos="1" side="tl" part="temps"/>
5943                      <lit-tag v="cni"/>
5944                    </let>
5945                  </when>
5946                </choose>  
5947                <out>
5948                  <lu>
5949                    <clip pos="1" side="tl" part="lemh"/>
5950                    <clip pos="1" side="tl" part="a_verb"/>
5951                    <clip pos="1" side="tl" part="temps"/>
5952                    <lit-tag v="p3"/>
5953                    <var n="nombre"/>
5954                    <clip pos="1" side="tl" part="lemq"/>
5955                  </lu>
5956                  <b pos="2"/>
5957                  <lu>
5958                    <clip pos="3" side="tl" part="lemh"/> 
5959                    <clip pos="3" side="tl" part="a_verb"/>
5960                    <lit-tag v="inf"/>                   
5961                    <clip pos="3" side="tl" part="lemq"/>
5962                  </lu>
5963                </out>
5964              </when>
5965              
5966              <when>
5967                <test>
5968                  <equal caseless="yes">
5969                    <clip pos="1" side="sl" part="lem"/>
5970                    <lit v="do"/>
5971                  </equal>
5972                </test>
5973                <choose>
5974                  <when>
5975                    <test>
5976                      <equal>
5977                        <clip pos="1" side="sl" part="temps"/>
5978                        <lit-tag v="pri"/>
5979                      </equal>
5980                    </test>
5981                    <out>
5982                      <lu>
5983                        <clip pos="3" side="tl" part="lemh"/> 
5984                        <clip pos="3" side="tl" part="a_verb"/>
5985                        <lit-tag v="pri.p3.sg"/>
5986                        <clip pos="3" side="tl" part="lemq"/> 
5987                      </lu>
5988                    </out>
5989                  </when>
5990                  <when>
5991                    <test>
5992                      <equal>
5993                        <clip pos="1" side="sl" part="temps"/>
5994                        <lit-tag v="pres"/>
5995                      </equal>
5996                    </test>
5997                    <out>
5998                      <lu>
5999                        <clip pos="3" side="tl" part="lemh"/> 
6000                        <clip pos="3" side="tl" part="a_verb"/>
6001                        <lit-tag v="pri.p3"/>
6002                        <var n="nombre"/>
6003                        <clip pos="3" side="tl" part="lemq"/> 
6004                      </lu>
6005                    </out>
6006                  </when>
6007                  <when>
6008                    <test>
6009                      <equal>
6010                        <clip pos="1" side="sl" part="temps"/>
6011                        <lit-tag v="past"/>
6012                      </equal> 
6013                    </test>
6014                    <out>
6015                      <lu>
6016                        <lit v="anar"/>
6017                        <lit-tag v="vaux.p3"/>
6018                        <var n="nombre"/>
6019                      </lu>
6020                      <b/>
6021                      <lu>
6022                        <clip pos="3" side="tl" part="lemh"/>
6023                        <clip pos="3" side="tl" part="a_verb"/>
6024                        <lit-tag v="inf"/>
6025                        <clip pos="3" side="tl" part="lemq"/>
6026                      </lu>
6027                    </out>
6028                  </when>
6029                </choose>
6030              </when>
6031            </choose>
6032          </action>
6033 </rule>
6035 <rule><!-- REGLA: PRONOM + ADV + MODAL conjugable + VERB (I always have to bring - Sempre haig de portar) -->
6036          <pattern>
6037            <pattern-item n="prsubj"/>
6038            <pattern-item n="adv"/>
6039            <pattern-item n="mod"/>
6040            <pattern-item n="infpres"/>
6041          </pattern>
6042          <action>
6043            <out>
6044            <!-- <lu>   
6045                    <clip pos="1" side="tl" part="whole"/> 
6046                  </lu> 
6047                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
6048                 <lu>
6049                   <clip pos="2" side="tl" part="whole"/> 
6050                 </lu>
6051                 <b pos="2"/>
6052            </out>
6053            <choose>
6054              <when>
6055                <test>
6056                  <or>
6057                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
6058                      <clip pos="3" side="sl" part="temps"/>
6059                      <lit-tag v="inf"/>
6060                    </equal>
6061                    <equal>
6062                      <clip pos="3" side="sl" part="temps"/>
6063                      <lit-tag v="pres"/>
6064                    </equal>
6065                  </or>
6066                </test>
6067                <out>
6068                 <!-- <lu>   
6069                    <clip pos="1" side="tl" part="whole"/> 
6070                  </lu> 
6071                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
6072                  <lu>
6073                    <clip pos="3" side="tl" part="lemh"/> 
6074                    <clip pos="3" side="tl" part="a_verb"/>
6075                    <lit-tag v="pri"/>
6076                    <clip pos="1" side="tl" part="pers"/> 
6077                    <clip pos="1" side="tl" part="nbr"/> 
6078                    <clip pos="3" side="tl" part="lemq"/> 
6079                  </lu>
6080                  <b pos="3"/>
6081                  <lu>
6082                    <clip pos="4" side="tl" part="lemh"/> 
6083                    <clip pos="4" side="tl" part="a_verb"/>
6084                    <lit-tag v="inf"/>
6085                    <clip pos="4" side="tl" part="lemq"/>
6086                  </lu>
6087                </out>
6088              </when>
6089              <when>
6090                <test>
6091                  <equal>
6092                    <clip pos="3" side="sl" part="temps"/>
6093                    <lit-tag v="past"/>
6094                  </equal>
6095                </test>
6096                <out>
6097                 <!-- <lu>   
6098                    <clip pos="1" side="tl" part="whole"/> 
6099                  </lu> 
6100                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
6101                 <lu>
6102                   <lit v="anar"/>
6103                   <lit-tag v="vaux"/>
6104                   <clip pos="1" side="tl" part="pers"/>
6105                   <clip pos="1" side="tl" part="nbr"/>
6106                 </lu>
6107                 <b/>
6108                 <lu>
6109                    <clip pos="3" side="tl" part="lemh"/>
6110                    <clip pos="3" side="tl" part="a_verb"/>
6111                    <lit-tag v="inf"/>
6112                    <clip pos="3" side="tl" part="lemq"/>
6113                  </lu>
6114                   <b pos="3"/>
6115                  <lu>
6116                    <clip pos="4" side="tl" part="lemh"/> 
6117                    <clip pos="4" side="tl" part="a_verb"/>
6118                    <lit-tag v="inf"/>
6119                    <clip pos="4" side="tl" part="lemq"/>
6120                  </lu>
6121                </out>
6122              </when>
6123              <otherwise><!--3a persona sg (has) i qualsevol altra forma que es coli -->
6124                <out>
6125                 <!-- <lu>   
6126                    <clip pos="1" side="tl" part="whole"/> 
6127                  </lu> 
6128                  <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així -->
6129                  <lu>   
6130                    <clip pos="3" side="tl" part="lemh"/>
6131                    <clip pos="3" side="tl" part="a_verb"/><!--pingui 7-->
6132                    <clip pos="3" side="tl" part="temps"/><!--Si per aquí entra pprs o subs, problema: ampliar la regla o especificar millor la categoria detectada! -->
6133                    <clip pos="1" side="tl" part="pers"/>
6134                    <clip pos="1" side="tl" part="nbr"/>
6135                    <clip pos="3" side="tl" part="lemq"/>
6136                  </lu> 
6137                  <b pos="3"/>
6138                  <lu>
6139                    <clip pos="4" side="tl" part="lemh"/> 
6140                    <clip pos="4" side="tl" part="a_verb"/>
6141                    <lit-tag v="inf"/>
6142                    <clip pos="4" side="tl" part="lemq"/>
6143                  </lu>
6144                </out>
6145              </otherwise>
6146            </choose>
6147          </action>
6148 </rule>
6153 <rule><!-- REGLA: PRONOM + AUX + ADV + MODAL conjugable + VERB (He will sometimes have to explain - Alguna vegada haurà d'explicar. He will not have to explain -> No haurà d'explicar. He does not have to explain - No ha d'explicar)-->
6154          <pattern>
6155            <pattern-item n="prsubj"/>
6156            <pattern-item n="auxnocan"/>
6157            <pattern-item n="adv"/>
6158            <pattern-item n="modinf"/>
6159            <pattern-item n="infpres"/>
6160          </pattern>
6161          <action>
6162           <!--  <out>
6163               <lu>   
6164                 <clip pos="1" side="tl" part="whole"/> 
6165               </lu> 
6166               <b pos="1"/> MG: prova. Posar funció f_bcond si ho deixo així
6167             </out> -->
6168           <out>
6169             <lu>
6170               <clip pos="3" side="tl" part="whole"/> 
6171             </lu>
6172             <b pos="2"/>
6173           </out>
6174             <choose>         
6175               <when>
6176                <test>
6177                  <or>
6178                    <equal caseless="yes">
6179                      <clip pos="2" side="sl" part="lem"/>
6180                      <lit v="will"/>
6181                    </equal>
6182                    <equal caseless="yes">
6183                      <clip pos="2" side="sl" part="lem"/>
6184                      <lit v="would"/>
6185                    </equal>
6186                  </or>
6187                </test>
6188                <choose>         
6189                  <when>
6190                    <test>
6191                      <equal caseless="yes">
6192                        <clip pos="2" side="sl" part="lem"/>
6193                        <lit v="will"/>
6194                      </equal>
6195                    </test>
6196                    <let>
6197                      <clip pos="4" side="tl" part="temps"/>
6198                      <lit-tag v="fti"/>
6199                    </let>
6200                  </when>
6201                  <when>
6202                    <test>
6203                      <equal caseless="yes">
6204                        <clip pos="2" side="sl" part="lem"/>
6205                        <lit v="would"/>
6206                      </equal>
6207                    </test>
6208                    <let>
6209                      <clip pos="4" side="tl" part="temps"/>
6210                      <lit-tag v="cni"/>
6211                    </let>
6212                  </when>                
6213                </choose>
6214                <out>
6215                   <lu>
6216                    <clip pos="4" side="tl" part="lemh"/> 
6217                    <clip pos="4" side="tl" part="a_verb"/>
6218                    <clip pos="4" side="tl" part="temps"/>
6219                    <clip pos="1" side="tl" part="pers"/> 
6220                    <clip pos="1" side="tl" part="nbr"/> 
6221                    <clip pos="4" side="tl" part="lemq"/> 
6222                  </lu>
6223                </out>
6224               </when>
6225               <when>
6226                <test>
6227                  <or>
6228                    <equal caseless="yes">
6229                      <clip pos="2" side="sl" part="lem"/>
6230                      <lit v="may"/>
6231                    </equal>
6232                    <equal caseless="yes">
6233                      <clip pos="2" side="sl" part="lem"/>
6234                      <lit v="might"/>
6235                    </equal>
6236                  </or>
6237                </test>
6238                <choose>
6239                  <when>
6240                    <test>
6241                      <equal caseless="yes">
6242                        <clip pos="2" side="sl" part="lem"/>
6243                        <lit v="may"/>
6244                      </equal>
6245                    </test>
6246                    <let>
6247                      <clip pos="2" side="tl" part="temps"/>
6248                      <lit-tag v="pri"/>
6249                    </let>
6250                  </when>
6251                  <when>
6252                    <test>
6253                      <equal caseless="yes">
6254                        <clip pos="2" side="sl" part="lem"/>
6255                        <lit v="might"/>
6256                      </equal>
6257                    </test>
6258                    <let>
6259                      <clip pos="2" side="tl" part="temps"/>
6260                      <lit-tag v="cni"/>
6261                    </let>
6262                  </when>
6263                </choose> 
6264                <out>
6265                  <lu>
6266                    <clip pos="2" side="tl" part="lemh"/>
6267                    <clip pos="2" side="tl" part="a_verb"/>
6268                    <clip pos="2" side="tl" part="temps"/>
6269                    <clip pos="1" side="tl" part="pers"/> 
6270                    <clip pos="1" side="tl" part="nbr"/>
6271                    <clip pos="2" side="tl" part="lemq"/> 
6272                  </lu>
6273                  <b pos="2"/>
6274                  <lu>
6275                    <clip pos="4" side="tl" part="lemh"/> 
6276                    <clip pos="4" side="tl" part="a_verb"/>
6277                    <lit-tag v="inf"/>                   
6278                    <clip pos="4" side="tl" part="lemq"/>
6279                  </lu>
6280                </out>
6281              </when>
6283               <when>
6284                 <test>
6285                   <equal caseless="yes">
6286                     <clip pos="2" side="sl" part="lem"/>
6287                     <lit v="do"/>
6288                   </equal>
6289                 </test>
6290                 <choose>
6291                   <when>
6292                     <test>
6293                       <or>
6294                         <equal>
6295                           <clip pos="2" side="sl" part="temps"/>
6296                           <lit-tag v="pres"/>
6297                         </equal>
6298                         <equal>
6299                           <clip pos="2" side="sl" part="temps"/>
6300                           <lit-tag v="pri"/>
6301                         </equal>
6302                       </or>
6303                     </test>
6304                     <out>
6305                       <lu>
6306                         <clip pos="4" side="tl" part="lemh"/> 
6307                         <clip pos="4" side="tl" part="a_verb"/>
6308                         <lit-tag v="pri"/>
6309                         <clip pos="1" side="tl" part="pers"/> 
6310                         <clip pos="1" side="tl" part="nbr"/> 
6311                         <clip pos="4" side="tl" part="lemq"/> 
6312                       </lu>
6313                     </out>
6314                   </when>
6315                   <when>
6316                     <test>
6317                       <equal>
6318                         <clip pos="2" side="sl" part="temps"/>
6319                         <lit-tag v="past"/>
6320                       </equal> 
6321                     </test>
6322                     <out>
6323                       <lu>
6324                         <lit v="anar"/>
6325                         <lit-tag v="vaux"/>
6326                         <clip pos="1" side="tl" part="pers"/> 
6327                         <clip pos="1" side="tl" part="nbr"/>
6328                       </lu>
6329                       <b/>
6330                       <lu>
6331                         <clip pos="4" side="tl" part="lemh"/>
6332                         <clip pos="4" side="tl" part="a_verb"/>
6333                         <lit-tag v="inf"/>
6334                         <clip pos="4" side="tl" part="lemq"/>
6335                       </lu>
6336                     </out>
6337                   </when>
6338                 </choose>
6339               </when>
6341             </choose>
6342             <out>
6343               <b pos="3"/>
6344               <lu>
6345                 <clip pos="5" side="tl" part="lemh"/> 
6346                 <clip pos="5" side="tl" part="a_verb"/>
6347                 <lit-tag v="inf"/>
6348                 <clip pos="5" side="tl" part="lemq"/> 
6349               </lu>
6350             </out>
6351             <call-macro n="f_bcond">
6352               <with-param pos="4"/>
6353             </call-macro>
6354          </action>
6355 </rule>
6357 <rule><!-- REGLA: AUX + ADV + MODAL conjugable + VERB (will always/not have to come - sempre/no haurà/hauran de venir)
6358            Quan no  hi ha abans pronom, és tercera persona ('My father will have to come'). El nombre s'agafa per ara de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The man who bought apples will have to come')-->
6359          <pattern>
6360            <pattern-item n="auxnocan"/>
6361            <pattern-item n="adv"/>
6362            <pattern-item n="modinf"/>
6363            <pattern-item n="infpres"/>
6364          </pattern>
6365          <action>          
6366            <call-macro n="f_bcond">
6367              <with-param pos="1"/>
6368            </call-macro>
6369            <out>
6370              <lu>
6371                <clip pos="2" side="tl" part="whole"/> 
6372              </lu>
6373              <b pos="2"/>
6374            </out>
6375            <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
6376              <when>
6377                <test>
6378                  <equal>
6379                    <var n="nombre"/>
6380                    <lit v=""/>
6381                  </equal>
6382                </test>
6383                <let>
6384                  <var n="nombre"/>
6385                  <lit-tag v="sg"/>
6386                </let>
6387              </when>
6388            </choose>
6389            <choose>
6390              <when>
6391                <test>
6392                  <or>
6393                    <equal caseless="yes">
6394                      <clip pos="1" side="sl" part="lem"/>
6395                      <lit v="will"/>
6396                    </equal>
6397                    <equal caseless="yes">
6398                      <clip pos="1" side="sl" part="lem"/>
6399                      <lit v="would"/>
6400                    </equal>
6401                  </or>
6402                </test>
6403                <choose>         
6404                  <when>
6405                    <test>
6406                      <equal caseless="yes">
6407                        <clip pos="1" side="sl" part="lem"/>
6408                        <lit v="will"/>
6409                      </equal>
6410                    </test>
6411                    <let>
6412                      <clip pos="3" side="tl" part="temps"/>
6413                      <lit-tag v="fti"/>
6414                    </let>
6415                  </when>
6416                  <when>
6417                    <test>
6418                      <equal caseless="yes">
6419                        <clip pos="1" side="sl" part="lem"/>
6420                        <lit v="would"/>
6421                      </equal>
6422                    </test>
6423                    <let>
6424                      <clip pos="3" side="tl" part="temps"/>
6425                      <lit-tag v="cni"/>
6426                    </let>
6427                  </when>                
6428                </choose>
6429                <out>
6431                   <lu>
6432                    <clip pos="3" side="tl" part="lemh"/> 
6433                    <clip pos="3" side="tl" part="a_verb"/>
6434                    <clip pos="3" side="tl" part="temps"/>
6435                    <lit-tag v="p3"/>
6436                    <var n="nombre"/>
6437                    <clip pos="3" side="tl" part="lemq"/> 
6438                  </lu>
6439                </out>
6440               </when>
6441               <when>
6442                <test>
6443                  <or>
6444                    <equal caseless="yes">
6445                      <clip pos="1" side="sl" part="lem"/>
6446                      <lit v="may"/>
6447                    </equal>
6448                    <equal caseless="yes">
6449                      <clip pos="1" side="sl" part="lem"/>
6450                      <lit v="might"/>
6451                    </equal>
6452                  </or>
6453                </test>
6454                <choose>
6455                  <when>
6456                    <test>
6457                      <equal caseless="yes">
6458                        <clip pos="1" side="sl" part="lem"/>
6459                        <lit v="may"/>
6460                      </equal>
6461                    </test>
6462                    <let>
6463                      <clip pos="1" side="tl" part="temps"/>
6464                      <lit-tag v="pri"/>
6465                    </let>
6466                  </when>
6467                  <when>
6468                    <test>
6469                      <equal caseless="yes">
6470                        <clip pos="1" side="sl" part="lem"/>
6471                        <lit v="might"/>
6472                      </equal>
6473                    </test>
6474                    <let>
6475                      <clip pos="1" side="tl" part="temps"/>
6476                      <lit-tag v="cni"/>
6477                    </let>
6478                  </when>
6479                </choose> 
6480                 <out>
6481                  <lu>
6482                    <clip pos="1" side="tl" part="lemh"/>
6483                    <clip pos="1" side="tl" part="a_verb"/>
6484                    <clip pos="1" side="tl" part="temps"/>
6485                    <lit-tag v="p3"/>
6486                    <var n="nombre"/> 
6487                    <clip pos="1" side="tl" part="lemq"/> 
6488                  </lu>
6489                  <b pos="1"/>
6490                  <lu>
6491                    <clip pos="3" side="tl" part="lemh"/> 
6492                    <clip pos="3" side="tl" part="a_verb"/>
6493                    <lit-tag v="inf"/>                   
6494                    <clip pos="3" side="tl" part="lemq"/>
6495                  </lu>
6496                </out>
6497              </when>          
6498              
6499               <when>
6500                 <test>
6501                   <equal caseless="yes">
6502                     <clip pos="1" side="sl" part="lem"/>
6503                     <lit v="do"/>
6504                   </equal>
6505                 </test>
6506                 <choose>
6507                   <when>
6508                     <test>
6509                       <equal>
6510                         <clip pos="1" side="sl" part="temps"/>
6511                         <lit-tag v="pri"/>
6512                       </equal>
6513                     </test>
6514                     <out>
6515                       <lu>
6516                         <clip pos="3" side="tl" part="lemh"/> 
6517                         <clip pos="3" side="tl" part="a_verb"/>
6518                         <lit-tag v="pri.p3.sg"/>
6519                         <clip pos="3" side="tl" part="lemq"/> 
6520                       </lu>
6521                     </out>
6522                   </when>
6524                   <when>
6525                     <test>
6526                         <equal>
6527                           <clip pos="1" side="sl" part="temps"/>
6528                           <lit-tag v="pres"/>
6529                         </equal>
6530                     </test>
6531                     <out>
6532                       <lu>
6533                         <clip pos="3" side="tl" part="lemh"/> 
6534                         <clip pos="3" side="tl" part="a_verb"/>
6535                         <lit-tag v="pri.p3"/>
6536                         <var n="nombre"/>
6537                         <clip pos="3" side="tl" part="lemq"/> 
6538                       </lu>
6539                     </out>
6540                   </when>
6541                   <when>
6542                     <test>
6543                       <equal>
6544                         <clip pos="1" side="sl" part="temps"/>
6545                         <lit-tag v="past"/>
6546                       </equal> 
6547                     </test>
6548                     <out>
6549                       <lu>
6550                         <lit v="anar"/>
6551                         <lit-tag v="vaux.p3"/>
6552                         <var n="nombre"/>
6553                       </lu>
6554                       <b/>
6555                       <lu>
6556                         <clip pos="3" side="tl" part="lemh"/>
6557                         <clip pos="3" side="tl" part="a_verb"/>
6558                         <lit-tag v="inf"/>
6559                         <clip pos="3" side="tl" part="lemq"/>
6560                       </lu>
6561                     </out>
6562                   </when>
6563                 </choose>
6564               </when>
6566             </choose>
6567             <out>
6568               <b pos="3"/>
6569               <lu>
6570                 <clip pos="4" side="tl" part="lemh"/>
6571                 <clip pos="4" side="tl" part="a_verb"/>
6572                 <lit-tag v="inf"/>
6573                 <clip pos="4" side="tl" part="lemq"/> 
6574               </lu> 
6575             </out>
6576          </action>
6577 </rule>
6581  <rule><!-- REGLA: PRONOM HAVE PARTICIPI (They have always/not asked - Sempre/No han preguntat)-->
6582          <pattern>
6583            <pattern-item n="prsubj"/>
6584            <pattern-item n="have_aux"/>
6585            <pattern-item n="adv"/>
6586            <pattern-item n="pp"/>
6587          </pattern>
6588          <action>
6589            <!-- <out>
6590               <lu>   
6591                 <clip pos="1" side="tl" part="whole"/> 
6592               </lu> 
6593               <b pos="1"/>
6594             </out> MG: prova. Posar funció f_bcond si ho deixo així -->
6595            <out>
6596              <lu>
6597                <clip pos="3" side="tl" part="whole"/> 
6598              </lu>
6599              <b pos="2"/>
6600            </out>
6601             <choose>
6602               <when>
6603                <test>
6604                  <or>
6605                    <equal><!--De moment no sé si el tagger escull bé i els detecto els dos -->
6606                      <clip pos="2" side="sl" part="temps"/>
6607                      <lit-tag v="inf"/>
6608                    </equal>
6609                    <equal>
6610                      <clip pos="2" side="sl" part="temps"/>
6611                      <lit-tag v="pres"/>
6612                    </equal>
6613                  </or>
6614                </test>
6615                <out>
6616                  <lu>
6617                    <clip pos="2" side="tl" part="lemh"/> 
6618                    <clip pos="2" side="tl" part="a_have_aux"/>
6619                    <lit-tag v="pri"/>
6620                    <clip pos="1" side="tl" part="pers"/> 
6621                    <clip pos="1" side="tl" part="nbr"/> 
6622                    <clip pos="2" side="tl" part="lemq"/> 
6623                  </lu>
6624                </out>
6625               </when>
6626               <when>
6627                 <test>
6628                   <equal>
6629                     <clip pos="2" side="sl" part="temps"/>
6630                     <lit-tag v="past"/>
6631                   </equal>
6632                 </test>
6633                 <out>
6634                   <lu>
6635                     <clip pos="2" side="tl" part="lemh"/> 
6636                     <clip pos="2" side="tl" part="a_have_aux"/>
6637                     <lit-tag v="pii"/>
6638                     <clip pos="1" side="tl" part="pers"/> 
6639                     <clip pos="1" side="tl" part="nbr"/> 
6640                     <clip pos="2" side="tl" part="lemq"/> 
6641                  </lu>
6642                 </out>
6643               </when>
6644               <otherwise>
6645                 <out>
6646                   <lu>
6647                     <clip pos="2" side="tl" part="whole"/>
6648                   </lu>
6649                 </out>
6650               </otherwise>
6651             </choose>
6652             <out>
6653               <b pos="3"/>
6654               <lu>
6655                 <clip pos="4" side="tl" part="lemh"/> 
6656                 <clip pos="4" side="tl" part="a_pp"/>
6657                 <lit-tag v="m.sg"/>
6658                 <clip pos="4" side="tl" part="lemq"/> 
6659               </lu>
6660             </out>
6661          </action>
6662 </rule>
6663               
6667 <rule><!-- REGLA: HAVE PARTICIPI (have not/always finished - No/Sempre han acabat) - Quan no  hi ha abans pronom, és tercera persona. En present no hi ha dubte en quant al nombre (has come/ have come). En passat, s'agafa per ara el nombre de l'últim SN detectat, amb el nou trànsfer caldrà fer-ho diferent ('The situation in these countries had changed')-->
6668          <pattern>
6669            <pattern-item n="have_aux"/>
6670            <pattern-item n="adv"/>
6671            <pattern-item n="pp"/>
6672          </pattern>
6673          <action>
6674            <out>
6675              <lu>
6676                <clip pos="2" side="tl" part="whole"/> 
6677              </lu>
6678              <b pos="1"/>
6679            </out>
6680             <choose><!--S'hauria de posar en  una macro si es poguessin fer macros sense paràmetres (Sergio?) -->
6681              <when>
6682                <test>
6683                  <equal>
6684                    <var n="nombre"/>
6685                    <lit v=""/>
6686                  </equal>
6687                </test>
6688                <let>
6689                  <var n="nombre"/>
6690                  <lit-tag v="sg"/>
6691                </let>
6692              </when>
6693            </choose>
6694             <choose>
6695               <when>
6696                 <test>
6697                   <or>
6698                     <equal>
6699                       <clip pos="1" side="sl" part="temps"/>
6700                       <lit-tag v="inf"/>
6701                     </equal>
6702                     <equal>
6703                      <clip pos="1" side="sl" part="temps"/>
6704                      <lit-tag v="pres"/>
6705                    </equal>
6706                   </or>
6707                 </test>
6708                 <out>
6709                  <lu>
6710                    <clip pos="1" side="tl" part="lem"/> 
6711                    <clip pos="1" side="tl" part="a_have_aux"/>
6712                    <lit-tag v="pri.p3.pl"/>
6713                  </lu>
6714                </out>
6715               </when>
6716               <when>
6717                 <test>
6718                   <equal>
6719                     <clip pos="1" side="sl" part="temps"/>
6720                     <lit-tag v="past"/>
6721                   </equal>
6722                 </test>
6723               <out>
6724                  <lu>
6725                    <clip pos="1" side="tl" part="lem"/> 
6726                    <clip pos="1" side="tl" part="a_have_aux"/>
6727                    <lit-tag v="pii.p3"/>
6728                    <var n="nombre"/>
6729                  </lu>
6730               </out>
6731               </when>
6732               <otherwise><!--Quan és 3a persona sg (has) -->
6733                 <out>
6734                   <lu>
6735                     <clip pos="1" side="tl" part="whole"/>
6736                   </lu>
6737                 </out>
6738               </otherwise>
6739             </choose>
6740             <out>
6741               <b pos="2"/>
6742               <lu>
6743                 <clip pos="3" side="tl" part="lemh"/> 
6744                 <clip pos="3" side="tl" part="a_pp"/>
6745                 <lit-tag v="m.sg"/>
6746                 <clip pos="3" side="tl" part="lemq"/> 
6747               </lu>
6748             </out>
6749          </action>
6750 </rule>
6753 <!-- *********************************************** ALTRES REGLES *************************************** -->
6755 <!-- REGLA: PRONOM tònic-->
6756  <rule> 
6757       <pattern>
6758         <pattern-item n="tn_itg"/>
6759       </pattern>
6760       <action>
6761         <call-macro n="genere_nombre"> <!-- Marta-->
6762           <with-param pos="1"/>
6763         </call-macro>
6764         <choose>
6765              <when>
6766                <test>
6767                  <equal>
6768                    <clip pos="1" side="tl" part="gen"/>
6769                    <lit-tag v="GD"/>
6770                  </equal>
6771                </test>
6772                <let><!--Solució provisional, després caldrà fer coses amb variables i concordances-->
6773                  <clip pos="1" side="tl" part="gen"/>
6774                  <lit-tag v="m"/>
6775                </let>
6776              </when>
6777         </choose>
6778         <choose>
6779              <when>
6780                <test>
6781                  <equal>
6782                    <clip pos="1" side="tl" part="nbr"/>
6783                    <lit-tag v="ND"/>
6784                  </equal>
6785                </test>
6786                <let><!--Solució provisional, després caldrà fer coses amb variables i concordances-->
6787                  <clip pos="1" side="tl" part="nbr"/>
6788                  <lit-tag v="sg"/>
6789                </let>
6790              </when>
6791         </choose>
6792         <out> 
6793           <lu>
6794             <clip pos="1" side="tl" part="lem"/> 
6795             <clip pos="1" side="tl" part="a_tn_itg"/>
6796             <clip pos="1" side="tl" part="gen"/>
6797             <clip pos="1" side="tl" part="nbr"/>
6798           </lu> 
6799         </out>
6800        </action>
6801      </rule> 
6803 <!-- REGLA: PRONOM possessiu. Es podria ajuntar amb l'anterior, potser-->
6804  <rule> 
6805       <pattern>
6806         <pattern-item n="prnpos"/>
6807       </pattern>
6808       <action>
6809         <choose>
6810              <when>
6811                <test><!--Solució provisional, després caldrà fer coses amb variables i amb sintaxi de la frase (yours is/are...)-->
6812                  <equal>
6813                    <clip pos="1" side="tl" part="gen"/>
6814                    <lit-tag v="GD"/>
6815                  </equal>
6816                </test>
6817                <let>
6818                  <clip pos="1" side="tl" part="gen"/>
6819                  <lit-tag v="m"/>
6820                </let>
6821              </when>
6822         </choose>
6823         <choose>
6824           <when>
6825             <test>
6826               <equal>
6827                 <clip pos="1" side="tl" part="nbr"/>
6828                 <lit-tag v="ND"/>
6829               </equal>
6830             </test>
6831             <let>
6832               <clip pos="1" side="tl" part="nbr"/>
6833               <lit-tag v="sg"/>
6834             </let>
6835           </when>
6836         </choose>
6837         <out> 
6838           <lu>
6839             <clip pos="1" side="tl" part="lem"/> 
6840             <clip pos="1" side="tl" part="a_prnpos"/>
6841             <clip pos="1" side="tl" part="gen"/>
6842             <clip pos="1" side="tl" part="nbr"/>
6843           </lu> 
6844         </out>  
6845       </action>
6846  </rule>  
6848   <rule> <!-- REGLA: reset variables-->
6849       <pattern>
6850         <pattern-item n="sent"/>
6851       </pattern>
6852       <action>
6853         <let>
6854           <var n="nombre"/>
6855           <lit-tag v="sg"/>
6856         </let>
6857         <let>
6858           <var n="genere"/>
6859           <lit-tag v="m"/>
6860         </let>
6861         <out>
6862           <lu>
6863             <clip pos="1" side="tl" part="whole"/>
6864           </lu>
6865         </out>
6866       </action>
6867     </rule>
6870 </section-rules>
6871 </transfer>