One more
[apertium.git] / apertium-oc-ca / apertium-oc-ca.trules-oc-ca.xml
blob2dfd76b805735db82405a5eda819e775d6429ba0
1 <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- nxml -*- -->
2 <transfer>
3         <section-def-cats>
4                 <def-cat n="nom">
5                         <cat-item tags="n.*"/>
6                 </def-cat>
7                 
8                 <def-cat n="nomp">
9                         <cat-item tags="np.ant"/>
10                 </def-cat>
11                 
12                 <def-cat n="nploc">
13                         <cat-item tags="np.loc"/>
14                 </def-cat>
15                 
16                 <def-cat n="det">          
17                         <cat-item tags="det.*"/>
18                         <cat-item tags="predet.*"/>
19                 </def-cat>
20                 
21                 <def-cat n="eth">          
22                         <cat-item tags="det.def.m.sg"/>
23                 </def-cat>
24                 
25                 <def-cat n="predet">
26                         <cat-item tags="predet.*"/>
27                 </def-cat>
28                 
29                 <def-cat n="adjec">          
30                         <cat-item tags="adj.*"/>
31                         <cat-item tags="vblex.pp.*"/>
32                 </def-cat>
33                 
34                 <def-cat n="adj">          
35                         <cat-item tags="adj.*"/>
36                 </def-cat>
37                 
38                 
39                 <def-cat n="adv">
40                         <cat-item tags="adv"/>
41                         <cat-item tags="preadv"/>
42                 </def-cat>
43                 
44                 <def-cat n="prep">
45                         <cat-item tags="pr"/>
46                 </def-cat>
47                 
48                 <def-cat n="prn">
49                         <cat-item tags="prn.tn.*"/>
50                         <cat-item tags="prn.itg.*"/>
51                 </def-cat>
52                 
53                 <def-cat n="prnenc">
54                         <cat-item tags="prn.enc.*"/>
55                 </def-cat> 
56                 
57                 <def-cat n="prnpro">              
58                         <cat-item tags="prn.pro.*"/>
59                 </def-cat>  
60                 
61                 <def-cat n="prnproref3">         
62                         <cat-item lemma="se" tags="prn.pro.ref.p3.mf.sp"/>
63                 </def-cat> 
64                 
65                 <def-cat n="prnproref">                   
66                         <cat-item lemma="me" tags="prn.pro.p1.mf.sg"/>
67                         <cat-item lemma="te" tags="prn.pro.p2.mf.sg"/>
68                         <cat-item lemma="se" tags="prn.pro.ref.p3.mf.sp"/>
69                         <cat-item lemma="mos" tags="prn.pro.p1.mf.pl"/>
70                         <cat-item lemma="vos" tags="prn.pro.p2.mf.pl"/>
71                 </def-cat>
72                 
73                 <def-cat n="prnproobj">                   
74                         <cat-item lemma="me" tags="prn.pro.p1.mf.sg"/>
75                         <cat-item lemma="te" tags="prn.pro.p2.mf.sg"/>
76                         <cat-item lemma="lo" tags="prn.pro.p3.*"/>
77                         <cat-item lemma="ac" tags="prn.pro.p3.*"/>
78                         <cat-item lemma="en" tags="prn.pro.adv"/>
79                         <cat-item lemma="nos" tags="prn.pro.p1.mf.pl"/>
80                         <cat-item lemma="vos" tags="prn.pro.p2.mf.pl"/>
81                 </def-cat>
82                 
83                 
84                 <def-cat n="verb">
85                         <cat-item tags="vblex.*"/>
86                         <cat-item tags="vbser.*"/>
87                         <cat-item tags="vbhaver.*"/>
88                         <cat-item tags="vbmod.*"/>
89                 </def-cat>
90                 <def-cat n="vbmod">
91                         <cat-item tags="vbmod.*"/>
92                 </def-cat>
93                 
94                 <def-cat n="inf">
95                         <cat-item tags="vblex.inf"/>
96                         <cat-item tags="vbser.inf"/>
97                         <cat-item tags="vbhaver.inf"/>
98                         <cat-item tags="vbmod.inf"/>
99                 </def-cat>
100                 
101                 <def-cat n="pretind">
102                         <cat-item tags="vblex.ifi.*"/>
103                         <cat-item tags="vbser.ifi.*"/>
104                         <cat-item tags="vbmod.ifi.*"/>
105                 </def-cat>    
106                 
107                 <def-cat n="lquest">
108                         <cat-item tags="lquest"/>
109                 </def-cat>    
110                 
111                 <def-cat n="num">
112                         <cat-item tags="num.*"/>
113                         <cat-item tags="num"/>
114                 </def-cat>
115                 
116                 <def-cat n="en">
117                         <cat-item lemma="en" tags="pr"/>
118                 </def-cat>
119                 <def-cat n="per">
120                         <cat-item lemma="per" tags="pr"/>
121                 </def-cat>
122                 
123                 <def-cat n="tot">
124                         <cat-item lemma="tot" tags="predet.*"/>
125                 </def-cat>
126                 
127                 <def-cat n="a">
128                         <cat-item lemma="a" tags="pr"/>
129                 </def-cat>
130                 
131                 <def-cat n="que">
132                         <cat-item lemma="que" tags="cnjsub"/>
133                         <cat-item lemma="que" tags="rel.an.mf.sp"/>
134                 </def-cat>
135                 
136                 <def-cat n="haber">
137                         <cat-item lemma="haber" tags="vbhaver.*"/>
138                 </def-cat>
139                 
140                 <def-cat n="nloc">
141                         <cat-item lemma="món" tags="n.*"/>
142                         <cat-item lemma="ascensor" tags="n.*"/>
143                         <cat-item lemma="carrer" tags="n.*"/>
144                         <cat-item lemma="plaça" tags="n.*"/>
145                         <cat-item lemma="mercat" tags="n.*"/>
146                         <cat-item lemma="zòna" tags="n.*"/>
147                         <cat-item lemma="àrea" tags="n.*"/>
148                         <cat-item lemma="comarca" tags="n.*"/>
149                         <cat-item lemma="barri" tags="n.*"/>
150                         <cat-item lemma="ciutat" tags="n.*"/>
151                         <cat-item lemma="comarca" tags="n.*"/>
152                         <cat-item lemma="província" tags="n.*"/>
153                         <cat-item lemma="ièrla" tags="n.*"/>
154                         <cat-item lemma="país" tags="n.*"/>
155                         <cat-item lemma="estudi" tags="n.*"/>
156                         <cat-item lemma="planeta" tags="n.*"/>
157                         <cat-item lemma="parlament" tags="n.*"/>
158                         <cat-item lemma="casa" tags="n.*"/>
159                         <cat-item lemma="ròba" tags="n.*"/>
160                         <cat-item lemma="escòla" tags="n.*"/>
161                         <cat-item lemma="congrès" tags="n.*"/>
162                         <cat-item lemma="domicili" tags="n.*"/>
163                         <cat-item lemma="urbanizacion" tags="n.*"/>
164                         <cat-item lemma="preson" tags="n.*"/>
165                         <cat-item lemma="fabrica" tags="n.*"/>
166                         <cat-item lemma="montanha" tags="n.*"/>
167                         <cat-item lemma="cramba" tags="n.*"/>
168                         <cat-item lemma="abitacion" tags="n.*"/>
169                         <cat-item lemma="val" tags="n.*"/>
170                         <cat-item lemma="termièra" tags="n.*"/>
171                         <cat-item lemma="castèth" tags="n.*"/>
172                         <cat-item lemma="sala" tags="n.*"/>             
173                         <cat-item lemma="glèsia" tags="n.*"/>
174                         <cat-item lemma="hèsta" tags="n.*"/>
175                         <cat-item lemma="esplanada" tags="n.*"/>
176                         <cat-item lemma="mercat" tags="n.*"/>
177                         <cat-item lemma="internet" tags="n.*"/>
178                         <cat-item lemma="ajuntament" tags="n.*"/>
179                         <cat-item lemma="pologòn" tags="n.*"/>
180                         <cat-item lemma="auditòri" tags="n.*"/>
181                         <cat-item lemma="estrangèr" tags="n.*"/>
182                         <cat-item lemma="pòble" tags="n.*"/>
183                         <cat-item lemma="portau" tags="n.*"/>
184                         <cat-item lemma="canau" tags="n.*"/>
185                         <cat-item lemma="tèrra" tags="n.*"/>
186                         <cat-item lemma="tor" tags="n.*"/>
187                         <cat-item lemma="pati" tags="n.*"/>
188                         <cat-item lemma="programacion" tags="n.*"/>
189                         <cat-item lemma="programa" tags="n.*"/>
190                         <cat-item lemma="aula" tags="n.*"/>
191                         <cat-item lemma="edifici" tags="n.*"/>
192                         <cat-item lemma="espitau" tags="n.*"/>
193                         <cat-item lemma="bastissa" tags="n.*"/>
194                         <cat-item lemma="cramba" tags="n.*"/>
195                         <cat-item lemma="internet" tags="n.*"/>
196                         <cat-item lemma="programari" tags="n.*"/>
197                         <cat-item lemma="principat" tags="n.*"/>
199      </def-cat>
200           
201           <def-cat n="partdia">
202                   <cat-item lemma="maitin" tags="n.*"/>
203                   <cat-item lemma="meddia" tags="n.*"/>
204                   <cat-item lemma="tarde" tags="n.*"/>
205                   <cat-item lemma="ser" tags="n.*"/>
206                   <cat-item lemma="net" tags="n.*"/>
207           </def-cat>
208           
209           <def-cat n="mes">
210                   <cat-item lemma="gèr" tags="n.*"/>
211                   <cat-item lemma="hereuèr" tags="n.*"/>
212                   <cat-item lemma="març" tags="n.*"/>
213                   <cat-item lemma="abriu" tags="n.*"/>
214                   <cat-item lemma="mai" tags="n.*"/>
215                   <cat-item lemma="junhsèga" tags="n.*"/>
216                   <cat-item lemma="junh" tags="n.*"/>
217                   <cat-item lemma="juriol" tags="n.*"/>
218                   <cat-item lemma="agost" tags="n.*"/>
219                   <cat-item lemma="seteme" tags="n.*"/>
220                   <cat-item lemma="octubre" tags="n.*"/>
221                   <cat-item lemma="octobre" tags="n.*"/>
222                   <cat-item lemma="noveme" tags="n.*"/>
223                   <cat-item lemma="deseme" tags="n.*"/>
224           </def-cat>
225           
226                 <def-cat n="sent">
227                         <cat-item tags="sent"/>
228                 </def-cat>
230         </section-def-cats>
232         <section-def-attrs>
233                 <def-attr n="a_nom">
234                         <attr-item tags="n"/>
235                         <attr-item tags="n.acr"/>
236                 </def-attr>
237                 
238                 <def-attr n="a_nomp">
239                         <attr-item tags="np.ant"/>
240                 </def-attr>
241                 
242                 <def-attr n="a_nploc">
243                         <attr-item tags="np.loc"/>
244                 </def-attr>
245                 
246                 <def-attr n="a_det">          
247                         <attr-item tags="det.def"/>
248                         <attr-item tags="det.ind"/>
249                         <attr-item tags="det.dem"/>
250                         <attr-item tags="det.pos"/>
251                         <attr-item tags="predet"/>
252                 </def-attr>
253                 
254                 <def-attr n="a_predet">
255                         <attr-item tags="predet"/>
256                 </def-attr>
257                 
258                 <def-attr n="a_adjec">          
259                         <attr-item tags="adj.ind"/>
260                         <attr-item tags="adj.sup"/>
261                         <attr-item tags="adj.itg"/>
262                         <attr-item tags="adj.pos"/>
263                         <attr-item tags="adj"/>
264                         <attr-item tags="vblex.pp"/>
265                 </def-attr>
266                 
267                 <def-attr n="a_adj">          
268                         <attr-item tags="adj.ind"/>
269                         <attr-item tags="adj.sup"/>
270                         <attr-item tags="adj.itg"/>
271                         <attr-item tags="adj.pos"/>
272                         <attr-item tags="adj"/>
273                 </def-attr>  
274                 
275                 <def-attr n="a_adv">
276                         <attr-item tags="adv"/>
277                         <attr-item tags="preadv"/>
278                 </def-attr>
279                 
280                 <def-attr n="a_prep">
281                         <attr-item tags="pr"/>
282                 </def-attr>
283                 
284                 <def-attr n="a_cuyo">          
285                         <attr-item tags="rel.aa"/>        
286                 </def-attr>
287                 
288                 <def-attr n="a_que">          
289                         <attr-item tags="cnjsub"/>
290                         <attr-item tags="rel.an.mf.sp"/>
291                 </def-attr>
292                 
293                 <def-attr n="a_prn">              
294                         <attr-item tags="prn.tn.p1"/>
295                         <attr-item tags="prn.tn.p2"/>
296                         <attr-item tags="prn.tn.p3"/>
297                         <attr-item tags="prn.tn"/>       
298                         <attr-item tags="prn.tn.ref.p3"/>        
299                         <attr-item tags="prn.tn.pos"/>       
300                         <attr-item tags="prn.itg"/>             
301                 </def-attr>
302                 
303                 <def-attr n="a_verb">
304                         <attr-item tags="vblex"/>
305                         <attr-item tags="vbser"/>
306                         <attr-item tags="vbhaver"/>
307                         <attr-item tags="vbmod"/>
308                 </def-attr>
309                 
310                 <def-attr n="a_inf">
311                         <attr-item tags="vblex.inf"/>
312                         <attr-item tags="vbser.inf"/>
313                         <attr-item tags="vbhaver.inf"/>
314                         <attr-item tags="vbmod.inf"/>
315                 </def-attr>
316                 
317                 <def-attr n="a_pretind">
318                         <attr-item tags="vblex.ifi"/>
319                         <attr-item tags="vbser.ifi"/>
320                         <!--      <attr-item tags="vbhaver.ifi"/> -->
321                         <attr-item tags="vbmod.ifi"/>
322                 </def-attr>    
323                 
324                 <def-attr n="a_lquest">
325                         <attr-item tags="lquest"/>
326                 </def-attr>    
327                 
328                 <def-attr n="a_num">
329                         <attr-item tags="num"/>
330                 </def-attr>
331                 
332                 <def-attr n="a_prnenc">
333                         <attr-item tags="prn.enc"/>
334                         <attr-item tags="prn.enc.ref"/>
335                         <attr-item tags="prn.enc.adv"/>
336                 </def-attr>
337                 
338                 <def-attr n="a_prnpro">
339                         <attr-item tags="prn.pro"/>
340                         <attr-item tags="prn.pro.ref"/>
341                         <attr-item tags="prn.pro.adv"/>
342                 </def-attr>
343                 
344                 <def-attr n="tipoenc_pro">
345                         <attr-item tags="ref.p3.mf.sp"/>
346                         <attr-item tags="p1.mf.pl"/>
347                         <attr-item tags="p1.mf.sg"/>
348                         <attr-item tags="p2.mf.pl"/>
349                         <attr-item tags="p2.mf.sg"/>
350                         <attr-item tags="p3.f.pl"/>
351                         <attr-item tags="p3.f.sg"/>
352                         <attr-item tags="p3.mf.pl"/>
353                         <attr-item tags="p3.mf.sg"/>
354                         <attr-item tags="p3.m.pl"/>
355                         <attr-item tags="p3.m.sg"/>
356                         <attr-item tags="p3.nt"/>
357                  <attr-item tags="adv"/>
358                 </def-attr>
359                 
360                 <def-attr n="gen">
361                         <attr-item tags="m"/>
362                         <attr-item tags="f"/>
363                         <attr-item tags="mf"/>
364                         <attr-item tags="GD"/>
365                         <attr-item tags="nt"/>
366                 </def-attr>
367                 
368                 <def-attr n="nbr">
369                         <attr-item tags="sg"/>
370                         <attr-item tags="pl"/>
371                         <attr-item tags="sp"/>
372                         <attr-item tags="ND"/>
373                 </def-attr>
374                 
375                 <def-attr n="persona">
376                         <attr-item tags="p1"/>
377                         <attr-item tags="p2"/>
378                         <attr-item tags="p3"/>
379                 </def-attr>
380                 
381                 
382                 <def-attr n="temps">
383                         <attr-item tags="inf"/>
384                         <attr-item tags="ger"/>
385                         <attr-item tags="pp"/>
386                         <attr-item tags="pri"/>
387                         <attr-item tags="ifi"/>
388                         <attr-item tags="pii"/>
389                         <attr-item tags="fti"/>
390                         <attr-item tags="cni"/>
391                         <attr-item tags="prs"/>
392                         <attr-item tags="pis"/>
393                         <attr-item tags="fts"/>
394                         <attr-item tags="imp"/>
395                 </def-attr>   
396                 
397                 <def-attr n="verbototal">
398                         <attr-item tags="vblex.pri.p1.sg"/>
399                         <attr-item tags="vblex.pri.p3.sg"/>
400                         <attr-item tags="vblex.pri.p2.sg"/>
401                         <attr-item tags="vblex.pri.p3.pl"/>
402                         
403                         
404                         
405                         <attr-item tags="vblex.prs.p1.sg"/>
406                         <attr-item tags="vblex.prs.p2.sg"/>
407                         <attr-item tags="vblex.prs.p3.sg"/>
408                         <attr-item tags="vblex.prs.p3.pl"/> 
409                 </def-attr>
411         </section-def-attrs>
413 <section-def-vars>
414       <def-var n="uno"/>
415       <def-var n="genero"/>
416                 <def-var n="genenc"/>
417       <def-var n="numero"/>
418       <def-var n="concDet"/>
419       <def-var n="concAdj"/>
420       <def-var n="concPrimero"/>
421       <def-var n="concSegundo"/>
422       <def-var n="concTercero"/>
423       <def-var n="interrogativa"/>
424       <def-var n="exclamativa"/>
425       <def-var n="auxg"/>
426       <def-var n="auxn"/>
427                 <def-var n="tipusverb"/>
428 </section-def-vars>
431 <section-def-macros>
433   <def-macro n="f_bcond" npar="1"><!--Para mirar si el blanco contiene o no formato, y enviarlo sólo si tiene formato (para reglas en las que se elimine una o más palabras) -->
434     <choose>
435       <when>
436         <test>
437           <not>
438             <equal>
439               <b pos="1"/>
440               <lit v=" "/>
441             </equal>
442           </not>
443         </test>
444         <out>
445           <b pos="1"/>
446         </out>
447       </when>               
448     </choose>
449   </def-macro>
453   <def-macro n="f_pretind" npar="1"><!--Para traducir el pretérito indefinido por la forma perifrástica (dije - vaig dir) y enviar el verbo. Debe ponerse en todas las reglas en las que aparezca un verbo vblex, vbmod o vbser -->
454     <choose>
455       <when>
456         <test>
457           <equal>
458             <clip pos="1" side="sl" part="temps"/>
459             <lit-tag v="ifi"/>
460           </equal>
461         </test>
462         <out>
463           <lu>
464             <get-case-from pos="1">
465               <lit v="anar"/>
466             </get-case-from>
467             <lit-tag v="vaux"/>
468             <clip pos="1" side="sl" part="persona"/>
469             <clip pos="1" side="sl" part="nbr"/>
470           </lu>
471           <b/>
472         </out> 
473         <choose>
474           <when>
475             <test>
476               <equal>
477                 <case-of pos="1" side="sl" part="lemh"/>
478                 <lit v="Aa"/>
479               </equal>
480             </test>
481             <modify-case>
482               <clip pos="1" side="tl" part="lemh"/>
483               <lit v="aa"/>
484             </modify-case>
485           </when>
486         </choose>
487         <out>
488           <lu>
489             <clip pos="1" side="tl" part="lemh"/>
490             <clip pos="1" side="tl" part="a_verb"/>
491             <lit-tag v="inf"/>
492             <clip pos="1" side="tl" part="lemq"/>
493           </lu>
494         </out>
495       </when>
496       <otherwise>
497         <out>
498           <lu>
499             <clip pos="1" side="tl" part="lemh"/>
500             <clip pos="1" side="tl" part="a_verb"/>
501             <clip pos="1" side="tl" part="temps"/>
502             <clip pos="1" side="tl" part="persona"/>
503             <clip pos="1" side="tl" part="gen"/>
504             <clip pos="1" side="tl" part="nbr"/>
505             <clip pos="1" side="tl" part="lemq"/>
506           </lu>
507         </out>
508       </otherwise>
509     </choose>
510 </def-macro>
512 <def-macro n="f_pretindhaber" npar="1"><!--Para traducir el pretérito indefinido por la forma perifrástica únicamente del verbo "haber" cuando es auxiliar. Debe ponerse en todas las reglas en que aparezca el verbo "haber" como auxiliar -->
514   <choose><!-- realiza el cambio de "hubo" por "va haver" (sólo si el tiempo es "ifi") -->
515     <when>
516       <test>
517         <equal>
518           <clip pos="1" side="tl" part="temps"/>
519           <lit-tag v="ifi"/>
520         </equal>
521       </test>
522       <out>
523         <lu>
524           <get-case-from pos="1">
525             <lit v="anar"/>
526           </get-case-from>
527           <lit-tag v="vaux"/>
528           <clip pos="1" side="sl" part="persona"/>
529           <clip pos="1" side="sl" part="nbr"/>
530         </lu>
531         <b/>
532       </out> 
533       <choose>
534         <when>
535           <test>
536             <equal>
537               <case-of pos="1" side="sl" part="lemh"/>
538               <lit v="Aa"/>
539             </equal>
540           </test>
541           <modify-case>
542             <clip pos="1" side="tl" part="lemh"/>
543             <lit v="aa"/>
544           </modify-case>
545         </when>
546       </choose>
547       <out>
548         <lu>
549           <clip pos="1" side="tl" part="lem"/>
550           <lit-tag v="vaux.inf"/>
551         </lu>
552       </out>
553     </when>
554    
555     <otherwise><!--Cambia el verbo "haber" por la forma auxiliar , ya que la forma "vbhaver" en las terceras formas singulares se traduce en el diccionario por el verbo "haver-hi"-->  
556       <out>
557         <lu>    
558           <clip pos="1" side="tl" part="lem"/>
559           <lit-tag v="vaux"/>
560           <clip pos="1" side="tl" part="temps"/>
561           <clip pos="1" side="tl" part="persona"/>
562           <clip pos="1" side="tl" part="nbr"/>
563         </lu> 
564       </out>
565     </otherwise>
566   </choose>
567 </def-macro>
568   
569   <def-macro n="f_concord1" npar="1">
570         
571         <choose><!--To determine value of variables of gender and
572                  number and propagate to other rules.  Variables are
573                  not used again in this rule -->
574           <when> 
575             <test>
576               <equal>
577                 <clip pos="1" side="tl" part="gen"/>
578                 <lit-tag v="m"/>
579               </equal>
580             </test>
581             <let><var n="genero"/><lit-tag v="m"/></let>
582           </when>
583           <when>
584             <test>
585               <equal>
586                 <clip pos="1" side="tl" part="gen"/>
587                 <lit-tag v="f"/>
588               </equal>
589             </test>
590             <let><var n="genero"/><lit-tag v="f"/></let>
591           </when>
592         </choose> 
593         <choose>
594           <when> 
595             <test>
596               <equal>
597                 <clip pos="1" side="tl" part="nbr"/>
598                 <lit-tag v="sg"/>
599               </equal>
600             </test>
601             <let><var n="numero"/><lit-tag v="sg"/></let>
602           </when>
603           <when> 
604             <test>
605               <equal>
606                 <clip pos="1" side="tl" part="nbr"/>
607                 <lit-tag v="pl"/>
608               </equal>
609             </test>
610             <let><var n="numero"/><lit-tag v="pl"/></let>
611           </when>
612         </choose>
613         <choose>
614           <when>
615               <test> <!-- If word has GD or ND, we try to assign the
616               gender or number of the previous rule. If there is no
617               value for the gender or number variable from previous
618               rules, gender will be masculine and number singular.-->
619                  <equal>
620                     <clip pos="1" side="tl" part="gen"/>
621                     <lit-tag v="GD"/>
622                  </equal>
623               </test>
624               <choose> 
625                   <when>
626                     <test>
627                       <equal>
628                         <var n="genero"/>
629                         <lit-tag v="f"/>
630                       </equal>
631                     </test>
632                     <let><clip pos="1" side="tl" part="gen"/><lit-tag v="f"/></let>
633                   </when>
634                   <otherwise>
635                       <let><clip pos="1" side="tl" part="gen"/><lit-tag v="m"/></let>
636                   </otherwise>
637                  </choose>
638                 </when>
639              </choose>
640              <choose>
641                <when>
642                 <test> 
643                  <equal>
644                     <clip pos="1" side="tl" part="nbr"/>
645                     <lit-tag v="ND"/>
646                  </equal>
647                </test>
648                <choose> 
649                   <when>
650                     <test>
651                       <equal>
652                         <var n="numero"/>
653                         <lit-tag v="pl"/>
654                       </equal>
655                     </test>
656                     <let><clip pos="1" side="tl" part="nbr"/><lit-tag v="pl"/></let>                   
657                   </when>
658                   <otherwise>
659                       <let><clip pos="1" side="tl" part="nbr"/><lit-tag v="sg"/></let>
660                   </otherwise>
661                 </choose>
662              </when>
663          </choose>    
664         </def-macro>
667       <def-macro n="f_concord2" npar="2">
668                         <choose>
669               <when>
670             <test> <!-- do the main and second parameter gender agree?-->
671               <and>
672                 <or>
673                   <equal>
674                     <clip pos="2" side="sl" part="gen"/>
675                     <clip pos="1" side="sl" part="gen"/>
676                   </equal>
677                   <equal>
678                     <clip pos="2" side="sl" part="gen"/>
679                     <lit-tag v="mf"/>
680                   </equal>
681                   <equal>
682                     <clip pos="1" side="sl" part="gen"/>
683                     <lit-tag v="mf"/>
684                   </equal>
685                 </or>
686                 <or>
687                   <equal> <!-- do the main and second parameter number agree?-->
688                     <clip pos="2" side="sl" part="nbr"/>
689                     <clip pos="1" side="sl" part="nbr"/>
690                   </equal>
691                   <equal>
692                     <clip pos="2" side="sl" part="nbr"/>
693                     <lit-tag v="sp"/>
694                   </equal>
695                   <equal>
696                     <clip pos="1" side="sl" part="nbr"/>
697                     <lit-tag v="sp"/>
698                   </equal>
699                 </or>
700               </and>
701             </test>
702             <let><var n="concPrimero"/><lit v="true"/></let><!-- there is gender and number agreement-->
703           </when>
704           <otherwise> 
705             <let><var n="concPrimero"/><lit v="false"/></let><!-- there isn't gender and number agreement-->
706           </otherwise>
707         </choose>
708         
709         <choose>
710           <when>
711             <test> <!-- Propagate the main parameter gender if it has been modified during the translation  -->
712               <and>
713                 <not>
714                   <equal>
715                     <clip pos="1" side="tl" part="gen"/>
716                     <clip pos="1" side="sl" part="gen"/>
717                   </equal>
718                 </not>
719                 <not>
720                   <equal>
721                     <clip pos="1" side="tl" part="gen"/>
722                     <lit-tag v="mf"/>
723                   </equal>
724                 </not>
725                 <not>
726                   <equal>
727                     <clip pos="1" side="tl" part="gen"/>
728                     <lit-tag v="GD"/>
729                   </equal>
730                 </not>
731               </and>
732             </test>
733             <choose>
734               <when>
735                 <test>
736                   <and>
737                     <not>
738                       <equal>
739                           <clip pos="2" side="tl" part="gen"/>
740                           <lit-tag v="mf"/>
741                       </equal>
742                     </not>
743                     <not>
744                       <and>
745                         <equal>
746                           <clip pos="2" side="sl" part="gen"/>
747                           <lit-tag v="mf"/>
748                         </equal>
749                         <not>
750                           <equal>
751                             <clip pos="2" side="tl" part="gen"/>
752                             <lit-tag v="GD"/>
753                           </equal>
754                         </not>
755                       </and>
756                     </not>
757                       <equal>
758                         <var n="concPrimero"/>
759                         <lit v="true"/>
760                       </equal>
761                     </and>
762                   </test>                              
763                 <let>
764                   <clip pos="2" side="tl" part="gen"/>
765                   <clip pos="1" side="tl" part="gen"/> 
766                 </let>
767               </when>
768             </choose>
769             </when>
770           </choose>  
771           <choose>
772             <when>
773               <test> <!-- Propagate the main parameter number if it has been modified during the translation  -->
774                 <and>
775                   <not>
776                     <equal>
777                       <clip pos="1" side="tl" part="nbr"/>
778                       <clip pos="1" side="sl" part="nbr"/>
779                     </equal>
780                   </not>
781                   <not>
782                     <equal>
783                       <clip pos="1" side="tl" part="nbr"/>
784                       <lit-tag v="sp"/>
785                     </equal>
786                   </not>
787                   <not>
788                     <equal>
789                       <clip pos="1" side="tl" part="nbr"/>
790                       <lit-tag v="ND"/>
791                     </equal>
792                   </not>
793                 </and>
794               </test>
795               <choose>
796                 <when>
797                   <test>
798                     <and>
799                       <not>
800                         <equal>
801                           <clip pos="2" side="tl" part="nbr"/>
802                           <lit-tag v="sp"/>
803                         </equal>
804                       </not>
805                       <not>
806                         <and>
807                           <equal>
808                             <clip pos="2" side="sl" part="nbr"/>
809                             <lit-tag v="sp"/>
810                           </equal>
811                           <not>
812                             <equal>
813                               <clip pos="2" side="tl" part="nbr"/>
814                               <lit-tag v="ND"/>
815                             </equal>
816                           </not>
817                         </and>
818                       </not>
819                       <equal>
820                         <var n="concPrimero"/>
821                         <lit v="true"/>
822                       </equal>
823                     </and>
824                   </test>
825                   <let>
826                     <clip pos="2" side="tl" part="nbr"/>
827                     <clip pos="1" side="tl" part="nbr"/> 
828                   </let>
829                 </when>
830               </choose>
831             </when>
832           </choose>
833    
834           <choose>
835             <when>
836               <test> <!-- Which is the rule general gender? -->
837                 <equal>
838                   <clip pos="1" side="tl" part="gen"/>
839                   <lit-tag v="m"/>
840                 </equal>
841               </test>
842               <let>
843                 <var n="genero"/>
844                 <lit-tag v="m"/>
845               </let>
846             </when>
847             <when>
848               <test>
849                 <equal>
850                   <clip pos="1" side="tl" part="gen"/>
851                   <lit-tag v="f"/>
852                 </equal>
853               </test>
854               <let>
855                 <var n="genero"/>
856                 <lit-tag v="f"/>
857               </let>
858             </when>
859             <when>
860               <test>
861                 <equal>
862                   <clip pos="2" side="tl" part="gen"/>
863                   <lit-tag v="m"/>
864                 </equal>
865               </test>
866               <let>
867                 <var n="genero"/>
868                 <lit-tag v="m"/>
869               </let>
870             </when>
871             <when>
872               <test>
873                 <equal>
874                   <clip pos="2" side="tl" part="gen"/>
875                   <lit-tag v="f"/>
876                 </equal>
877               </test>
878               <let>
879                 <var n="genero"/>
880                 <lit-tag v="f"/>
881               </let>
882             </when>
883             <when>
884               <test>
885                 <and>
886                   <equal>
887                     <clip pos="1" side="tl" part="gen"/>
888                     <lit-tag v="mf"/>
889                   </equal>
890                   <not>
891                     <equal>
892                       <clip pos="1" side="sl" part="gen"/>
893                       <lit-tag v="mf"/>
894                     </equal>
895                   </not>
896                 </and>
897               </test>
898               <let>
899                 <var n="genero"/>
900                 <clip pos="1" side="sl" part="gen"/> 
901               </let>
902             </when>
903             <when>
904               <test>
905                 <and>
906                   <equal>
907                     <clip pos="2" side="tl" part="gen"/>
908                     <lit-tag v="mf"/>
909                   </equal>
910                   <not>
911                     <equal>
912                       <clip pos="2" side="sl" part="gen"/>
913                       <lit-tag v="mf"/>
914                     </equal>
915                   </not>
916                 </and>
917               </test>
918               <let>
919                 <var n="genero"/>
920                 <clip pos="2" side="sl" part="gen"/> 
921               </let>
922             </when>
923             <otherwise>
924             <let>
925               <var n="genero"/>
926               <lit-tag v="m"/>
927             </let>
928           </otherwise>
929         </choose>
933         <choose>
934           <when><!-- Which is the rule general number? -->
935             <test> 
936               <equal>
937                 <clip pos="1" side="tl" part="nbr"/>
938                 <lit-tag v="sg"/>
939               </equal>
940             </test>
941             <let>
942               <var n="numero"/>
943               <lit-tag v="sg"/>
944             </let>
945           </when>
946           <when>
947             <test>
948               <equal>
949                 <clip pos="1" side="tl" part="nbr"/>
950                 <lit-tag v="pl"/>
951               </equal>
952             </test>
953             <let>
954               <var n="numero"/>
955               <lit-tag v="pl"/>
956             </let>
957           </when>
958           <when>
959             <test>
960               <equal>
961                 <clip pos="2" side="tl" part="nbr"/>
962                 <lit-tag v="sg"/>
963               </equal>
964             </test>
965             <let>
966               <var n="numero"/>
967               <lit-tag v="sg"/>
968             </let>
969           </when>
970           <when>
971             <test>
972               <equal>
973                 <clip pos="2" side="tl" part="nbr"/>
974                 <lit-tag v="pl"/>
975               </equal>
976             </test>
977             <let>
978               <var n="numero"/>
979               <lit-tag v="pl"/>
980             </let>
981           </when>
982           <when>
983             <test>
984               <and>
985                 <equal>
986                   <clip pos="1" side="tl" part="nbr"/>
987                   <lit-tag v="sp"/>
988                 </equal>
989                 <not>
990                   <equal>
991                     <clip pos="1" side="sl" part="nbr"/>
992                     <lit-tag v="sp"/>
993                   </equal>
994                 </not>
995               </and>
996             </test>
997             <let>
998               <var n="numero"/>
999               <clip pos="1" side="sl" part="nbr"/> 
1000             </let>
1001           </when>
1002           <when>
1003             <test>
1004               <and>
1005                 <equal>
1006                   <clip pos="2" side="tl" part="nbr"/>
1007                   <lit-tag v="sp"/>
1008                 </equal>
1009                 <not>
1010                   <equal>
1011                     <clip pos="2" side="sl" part="nbr"/>
1012                     <lit-tag v="sp"/>
1013                   </equal>
1014                 </not>
1015               </and>
1016             </test>
1017             <let>
1018               <var n="numero"/>
1019               <clip pos="2" side="sl" part="nbr"/> 
1020             </let>
1021           </when>
1022           <otherwise>
1023             <let>
1024               <var n="numero"/>
1025               <lit-tag v="sg"/>
1026             </let>
1027           </otherwise>
1028         </choose>
1030         <choose> <!-- Determine gender and number value if they are undetermined -->
1031           <when>
1032             <test>
1033               <equal>
1034                 <clip pos="1" side="tl" part="gen"/>
1035                 <lit-tag v="GD"/>
1036               </equal>
1037             </test>
1038             <let>
1039               <clip pos="1" side="tl" part="gen"/>
1040               <var n="genero"/>
1041             </let>
1042           </when>
1043         </choose>
1044         <choose>
1045           <when>
1046             <test>
1047               <equal>
1048                 <clip pos="2" side="tl" part="gen"/>
1049                 <lit-tag v="GD"/>
1050               </equal>
1051             </test>
1052             <let>
1053               <clip pos="2" side="tl" part="gen"/>
1054               <var n="genero"/>
1055             </let>
1056           </when>
1057         </choose>
1058         <choose>
1059           <when>
1060             <test>
1061               <equal>
1062                 <clip pos="1" side="tl" part="nbr"/>
1063                 <lit-tag v="ND"/>
1064               </equal>
1065             </test>
1066             <let>
1067               <clip pos="1" side="tl" part="nbr"/>
1068               <var n="numero"/>
1069             </let>
1070           </when>
1071         </choose>
1072         <choose>
1073           <when>
1074             <test>
1075               <equal>
1076                 <clip pos="2" side="tl" part="nbr"/>
1077                 <lit-tag v="ND"/>
1078               </equal>
1079             </test>
1080             <let>
1081               <clip pos="2" side="tl" part="nbr"/>
1082               <var n="numero"/>
1083             </let>
1084           </when>
1085         </choose>
1086         <let>
1087                 <var n="genenc"/>
1088                 <clip pos="1" side="sl" part="gen"/>
1089         </let>
1090         
1092       </def-macro>
1093                 
1095       <def-macro n="f_concord3" npar="3"> 
1096           <choose><!-- Look whether in source language there is concordance between first and second element -->
1097             <when>
1098               <test> 
1099                 <and>
1100                   <or>
1101                     <equal>
1102                       <clip pos="2" side="sl" part="gen"/>
1103                       <clip pos="1" side="sl" part="gen"/>
1104                     </equal>
1105                     <equal>
1106                       <clip pos="2" side="sl" part="gen"/>
1107                       <lit-tag v="mf"/>
1108                     </equal>
1109                     <equal>
1110                       <clip pos="1" side="sl" part="gen"/>
1111                       <lit-tag v="mf"/>
1112                     </equal>
1113                   </or>
1114                   <or>
1115                     <equal>
1116                       <clip pos="2" side="sl" part="nbr"/>
1117                       <clip pos="1" side="sl" part="nbr"/>
1118                     </equal>
1119                     <equal>
1120                       <clip pos="2" side="sl" part="nbr"/>
1121                       <lit-tag v="sp"/>
1122                     </equal>
1123                     <equal>
1124                       <clip pos="1" side="sl" part="nbr"/>
1125                       <lit-tag v="sp"/>
1126                     </equal>
1127                   </or>
1128                 </and>
1129               </test>
1130               <let><var n="concPrimero"/><lit v="true"/></let>
1131             </when>
1132             <otherwise> 
1133             <let><var n="concPrimero"/><lit v="false"/></let>
1134             </otherwise>
1135         </choose>
1136         <choose><!-- Look whether in source language there is concordance between second and third element -->
1137             <when>
1138               <test> 
1139                 <and>
1140                   <or>
1141                     <equal>
1142                       <clip pos="3" side="sl" part="gen"/>
1143                       <clip pos="1" side="sl" part="gen"/>
1144                     </equal>
1145                     <equal>
1146                       <clip pos="3" side="sl" part="gen"/>
1147                       <lit-tag v="mf"/>
1148                     </equal>
1149                     <equal>
1150                       <clip pos="1" side="sl" part="gen"/>
1151                       <lit-tag v="mf"/>
1152                     </equal>
1153                   </or>
1154                   <or>
1155                     <equal>
1156                       <clip pos="3" side="sl" part="nbr"/>
1157                       <clip pos="1" side="sl" part="nbr"/>
1158                     </equal>
1159                     <equal>
1160                       <clip pos="3" side="sl" part="nbr"/>
1161                       <lit-tag v="sp"/>
1162                     </equal>
1163                     <equal>
1164                       <clip pos="1" side="sl" part="nbr"/>
1165                       <lit-tag v="sp"/>
1166                     </equal>
1167                   </or>
1168                 </and>
1169               </test>
1170               <let><var n="concSegundo"/><lit v="true"/></let>
1171             </when>      
1172             <otherwise> 
1173               <let><var n="concSegundo"/><lit v="false"/></let>
1174             </otherwise>
1175           </choose>
1178           <choose><!-- Propagate the main parameter gender if it has been modified during the translation -->
1179             <when>
1180               <test> 
1181                 <and>
1182                   <not>
1183                     <equal>
1184                       <clip pos="1" side="tl" part="gen"/>
1185                       <clip pos="1" side="sl" part="gen"/>
1186                     </equal>
1187                   </not>
1188                   <not>
1189                     <equal>
1190                       <clip pos="1" side="tl" part="gen"/>
1191                       <lit-tag v="mf"/>
1192                     </equal>
1193                   </not>
1194                   <not>
1195                     <equal>
1196                       <clip pos="1" side="tl" part="gen"/>
1197                       <lit-tag v="GD"/>
1198                     </equal>
1199                   </not>
1200                 </and>
1201               </test>
1202                 <choose>
1203                   <when>
1204                     <test>
1205                       <and>
1206                         <not>
1207                           <equal>
1208                             <clip pos="2" side="tl" part="gen"/>
1209                             <lit-tag v="mf"/>
1210                           </equal>
1211                         </not>
1212                         <not>
1213                           <and>
1214                             <equal>
1215                               <clip pos="2" side="sl" part="gen"/>
1216                               <lit-tag v="mf"/>
1217                             </equal>
1218                             <not>
1219                               <equal>
1220                                 <clip pos="2" side="tl" part="gen"/>
1221                                 <lit-tag v="GD"/>
1222                               </equal>
1223                             </not>
1224                           </and>
1225                         </not>
1226                         <equal>
1227                           <var n="concPrimero"/>
1228                           <lit v="true"/>
1229                         </equal>
1230                       </and>
1231                     </test>
1232                       <let>
1233                         <clip pos="2" side="tl" part="gen"/>
1234                         <clip pos="1" side="tl" part="gen"/> 
1235                       </let>
1236                     </when> 
1237                   </choose>   
1238                   <choose>
1239                     <when>
1240                       <test> 
1241                         <and>
1242                           <not>
1243                             <equal>
1244                               <clip pos="3" side="tl" part="gen"/>
1245                               <lit-tag v="mf"/>
1246                             </equal>
1247                           </not>
1248                           <not>
1249                             <and>
1250                               <equal>
1251                                 <clip pos="3" side="sl" part="gen"/>
1252                                 <lit-tag v="mf"/>
1253                               </equal>
1254                               <not>
1255                                 <equal>
1256                                   <clip pos="3" side="tl" part="gen"/>
1257                                   <lit-tag v="GD"/>
1258                                 </equal>
1259                               </not>
1260                             </and>
1261                           </not>
1262                           <equal>
1263                             <var n="concSegundo"/>
1264                             <lit v="true"/>
1265                           </equal>
1266                         </and>
1267                       </test>
1268                        <let>
1269                          <clip pos="3" side="tl" part="gen"/>
1270                          <clip pos="1" side="tl" part="gen"/> 
1271                        </let> 
1272                     </when> 
1273                   </choose>
1274                 </when>
1275               </choose>
1277             <choose><!-- Propagate the main parameter number if it has been modified during the translation -->
1278               <when>
1279                 <test> 
1280                   <and>
1281                     <not>
1282                       <equal>
1283                         <clip pos="1" side="tl" part="nbr"/>
1284                         <clip pos="1" side="sl" part="nbr"/>
1285                       </equal>
1286                     </not>
1287                     <not>
1288                       <equal>
1289                         <clip pos="1" side="tl" part="nbr"/>
1290                         <lit-tag v="sp"/>
1291                       </equal>
1292                     </not>
1293                     <not>
1294                       <equal>
1295                         <clip pos="1" side="tl" part="nbr"/>
1296                         <lit-tag v="ND"/>
1297                       </equal>
1298                     </not>
1299                   </and>
1300                 </test>
1301                   <choose>
1302                     <when>
1303                       <test>
1304                         <and>
1305                           <not>
1306                             <equal>
1307                               <clip pos="2" side="tl" part="nbr"/>
1308                               <lit-tag v="sp"/>
1309                             </equal>
1310                           </not>
1311                           <not>
1312                             <and>
1313                               <equal>
1314                                 <clip pos="2" side="sl" part="nbr"/>
1315                                 <lit-tag v="sp"/>
1316                               </equal>
1317                               <not>
1318                                 <equal>
1319                                   <clip pos="2" side="tl" part="nbr"/>
1320                                   <lit-tag v="ND"/>
1321                                 </equal>
1322                               </not>
1323                             </and>
1324                           </not>
1325                           <equal>
1326                             <var n="concPrimero"/>
1327                             <lit v="true"/>
1328                           </equal>
1329                         </and>
1330                       </test>
1331                       <let>
1332                         <clip pos="2" side="tl" part="nbr"/>
1333                         <clip pos="1" side="tl" part="nbr"/> 
1334                       </let>
1335                     </when>
1336                   </choose>
1337                   <choose>
1338                     <when>
1339                       <test>
1340                         <and>
1341                           <not>
1342                             <equal>
1343                               <clip pos="3" side="tl" part="nbr"/>
1344                               <lit-tag v="sp"/>
1345                             </equal>
1346                           </not>
1347                           <not>
1348                             <and>
1349                               <equal>
1350                                 <clip pos="3" side="sl" part="nbr"/>
1351                                 <lit-tag v="sp"/>
1352                               </equal>
1353                               <not>
1354                                 <equal>
1355                                   <clip pos="3" side="tl" part="nbr"/>
1356                                   <lit-tag v="ND"/>
1357                                 </equal>
1358                               </not>
1359                             </and>
1360                           </not>
1361                           <equal>
1362                             <var n="concSegundo"/>
1363                             <lit v="true"/>
1364                           </equal>
1365                         </and>
1366                       </test>
1367                       <let>
1368                         <clip pos="3" side="tl" part="nbr"/>
1369                         <clip pos="1" side="tl" part="nbr"/> 
1370                      </let>
1371                    </when>
1372                  </choose>
1373               </when>
1374             </choose>
1378         <choose> <!-- Determine the rule general gender. Priority order: main, second and third element -->
1379           <when>
1380             <test> 
1381               <equal>
1382                 <clip pos="1" side="tl" part="gen"/>
1383                 <lit-tag v="m"/>
1384               </equal>
1385             </test>
1386             <let>
1387               <var n="genero"/>
1388               <lit-tag v="m"/>
1389             </let>
1390           </when>
1391           <when>
1392             <test>
1393               <equal>
1394                 <clip pos="1" side="tl" part="gen"/>
1395                 <lit-tag v="f"/>
1396               </equal>
1397             </test>
1398             <let>
1399               <var n="genero"/>
1400               <lit-tag v="f"/>
1401             </let>
1402           </when>
1403           <when>
1404             <test>
1405               <equal>
1406                 <clip pos="2" side="tl" part="gen"/>
1407                 <lit-tag v="m"/>
1408               </equal>
1409             </test>
1410             <let>
1411               <var n="genero"/>
1412               <lit-tag v="m"/>
1413             </let>
1414           </when>
1415           <when>
1416             <test>
1417               <equal>
1418                 <clip pos="2" side="tl" part="gen"/>
1419                 <lit-tag v="f"/>
1420               </equal>
1421             </test>
1422             <let>
1423               <var n="genero"/>
1424               <lit-tag v="f"/>
1425             </let>
1426           </when>
1427           <when>
1428             <test>
1429               <equal>
1430                 <clip pos="3" side="tl" part="gen"/>
1431                 <lit-tag v="m"/>
1432               </equal>
1433             </test>
1434             <let>
1435               <var n="genero"/>
1436               <lit-tag v="m"/>
1437             </let>
1438           </when>
1439           <when>
1440             <test>
1441               <equal>
1442                 <clip pos="3" side="tl" part="gen"/>
1443                 <lit-tag v="f"/>
1444               </equal>
1445             </test>
1446             <let>
1447               <var n="genero"/>
1448               <lit-tag v="f"/>
1449             </let>
1450           </when> 
1451           <when>
1452             <test>
1453               <and>
1454                 <equal>
1455                   <clip pos="1" side="tl" part="gen"/>
1456                   <lit-tag v="mf"/>
1457                 </equal>
1458                 <not>
1459                   <equal>
1460                     <clip pos="1" side="sl" part="gen"/>
1461                     <lit-tag v="mf"/>
1462                   </equal>
1463                 </not>
1464               </and>
1465             </test>
1466             <let>
1467               <var n="genero"/>
1468               <clip pos="1" side="sl" part="gen"/> 
1469             </let>
1470           </when>
1471           <when>
1472             <test>
1473               <and>
1474                 <equal>
1475                   <clip pos="2" side="tl" part="gen"/>
1476                   <lit-tag v="mf"/>
1477                 </equal>
1478                 <not>
1479                   <equal>
1480                     <clip pos="2" side="sl" part="gen"/>
1481                     <lit-tag v="mf"/>
1482                   </equal>
1483                 </not>
1484               </and>
1485             </test>
1486             <let>
1487               <var n="genero"/>
1488               <clip pos="2" side="sl" part="gen"/> 
1489             </let>
1490           </when>
1491            <when>
1492             <test>
1493               <and>
1494                 <equal>
1495                   <clip pos="3" side="tl" part="gen"/>
1496                   <lit-tag v="mf"/>
1497                 </equal>
1498                 <not>
1499                   <equal>
1500                     <clip pos="3" side="sl" part="gen"/>
1501                     <lit-tag v="mf"/>
1502                   </equal>
1503                 </not>
1504               </and>
1505             </test>
1506             <let>
1507               <var n="genero"/>
1508               <clip pos="3" side="sl" part="gen"/> 
1509             </let>
1510           </when>               
1511           <otherwise>
1512             <let>
1513               <var n="genero"/>
1514               <lit-tag v="m"/>
1515             </let>
1516           </otherwise>
1517         </choose>
1518         
1519         <choose><!-- Determine the rule general number. Priority order: main, second and third element -->
1520           <when>
1521             <test> 
1522               <equal>
1523                 <clip pos="1" side="tl" part="nbr"/>
1524                 <lit-tag v="sg"/>
1525               </equal>
1526             </test>
1527             <let>
1528               <var n="numero"/>
1529               <lit-tag v="sg"/>
1530             </let>
1531           </when>
1532           <when>
1533             <test>
1534               <equal>
1535                 <clip pos="1" side="tl" part="nbr"/>
1536                 <lit-tag v="pl"/>
1537               </equal>
1538             </test>
1539             <let>
1540               <var n="numero"/>
1541               <lit-tag v="pl"/>
1542             </let>
1543           </when>
1544           <when>
1545             <test>
1546               <equal>
1547                 <clip pos="2" side="tl" part="nbr"/>
1548                 <lit-tag v="sg"/>
1549               </equal>
1550             </test>
1551             <let>
1552               <var n="numero"/>
1553               <lit-tag v="sg"/>
1554             </let>
1555           </when>
1556           <when>
1557             <test>
1558               <equal>
1559                 <clip pos="2" side="tl" part="nbr"/>
1560                 <lit-tag v="pl"/>
1561               </equal>
1562             </test>
1563             <let>
1564               <var n="numero"/>
1565               <lit-tag v="pl"/>
1566             </let>
1567           </when>
1568           <when>
1569             <test>
1570               <equal>
1571                 <clip pos="3" side="tl" part="nbr"/>
1572                 <lit-tag v="sg"/>
1573               </equal>
1574             </test>
1575             <let>
1576               <var n="numero"/>
1577               <lit-tag v="sg"/>
1578             </let>
1579           </when>
1580           <when>
1581             <test>
1582               <equal>
1583                 <clip pos="3" side="tl" part="nbr"/>
1584                 <lit-tag v="pl"/>
1585               </equal>
1586             </test>
1587             <let>
1588               <var n="numero"/>
1589               <lit-tag v="pl"/>
1590             </let>
1591           </when>     
1592           <when>
1593             <test>
1594               <and>
1595                 <equal>
1596                   <clip pos="1" side="tl" part="nbr"/>
1597                   <lit-tag v="sp"/>
1598                 </equal>
1599                 <not>
1600                   <equal>
1601                     <clip pos="1" side="sl" part="nbr"/>
1602                     <lit-tag v="sp"/>
1603                   </equal>
1604                 </not>
1605               </and>
1606             </test>
1607             <let>
1608               <var n="numero"/>
1609               <clip pos="1" side="sl" part="nbr"/> 
1610             </let>
1611           </when>
1612           <when>
1613             <test>
1614               <and>
1615                 <equal>
1616                   <clip pos="2" side="tl" part="nbr"/>
1617                   <lit-tag v="sp"/>
1618                 </equal>
1619                 <not>
1620                   <equal>
1621                     <clip pos="2" side="sl" part="nbr"/>
1622                     <lit-tag v="sp"/>
1623                   </equal>
1624                 </not>
1625               </and>
1626             </test>
1627             <let>
1628               <var n="numero"/>
1629               <clip pos="2" side="sl" part="nbr"/> 
1630             </let>
1631           </when>
1632           <when>
1633             <test>
1634               <and>
1635                 <equal>
1636                   <clip pos="3" side="tl" part="nbr"/>
1637                   <lit-tag v="sp"/>
1638                 </equal>
1639                 <not>
1640                   <equal>
1641                     <clip pos="3" side="sl" part="nbr"/>
1642                     <lit-tag v="sp"/>
1643                   </equal>
1644                 </not>
1645               </and>
1646             </test>
1647             <let>
1648               <var n="numero"/>
1649               <clip pos="3" side="sl" part="nbr"/> 
1650             </let>
1651           </when>
1652           <otherwise>
1653             <let>
1654               <var n="numero"/>
1655               <lit-tag v="sg"/>
1656             </let>
1657           </otherwise>
1658         </choose>
1660         <choose> <!-- Assign values to GD and ND -->
1661           <when>
1662             <test>
1663               <equal>
1664                 <clip pos="1" side="tl" part="gen"/>
1665                 <lit-tag v="GD"/>
1666               </equal>
1667             </test>
1668             <let>
1669               <clip pos="1" side="tl" part="gen"/>
1670               <var n="genero"/>
1671             </let>
1672           </when>
1673         </choose>
1674         <choose>
1675           <when>
1676             <test>
1677               <equal>
1678                 <clip pos="2" side="tl" part="gen"/>
1679                 <lit-tag v="GD"/>
1680               </equal>
1681             </test>
1682             <let>
1683               <clip pos="2" side="tl" part="gen"/>
1684               <var n="genero"/>
1685             </let>
1686           </when>
1687         </choose>
1688         <choose>
1689           <when>
1690             <test>
1691               <equal>
1692                 <clip pos="3" side="tl" part="gen"/>
1693                 <lit-tag v="GD"/>
1694               </equal>
1695             </test>
1696             <let>
1697               <clip pos="3" side="tl" part="gen"/>
1698               <var n="genero"/>
1699             </let>
1700           </when>
1701         </choose>
1702         <choose>
1703           <when>
1704             <test>
1705               <equal>
1706                 <clip pos="1" side="tl" part="nbr"/>
1707                 <lit-tag v="ND"/>
1708               </equal>
1709             </test>
1710             <let>
1711               <clip pos="1" side="tl" part="nbr"/>
1712               <var n="numero"/>
1713             </let>
1714           </when>
1715         </choose>
1716         <choose>
1717           <when>
1718             <test>
1719               <equal>
1720                 <clip pos="2" side="tl" part="nbr"/>
1721                 <lit-tag v="ND"/>
1722               </equal>
1723             </test>
1724             <let>
1725               <clip pos="2" side="tl" part="nbr"/>
1726               <var n="numero"/>
1727             </let>
1728           </when>
1729         </choose>
1730         <choose>
1731           <when>
1732             <test>
1733               <equal>
1734                 <clip pos="3" side="tl" part="nbr"/>
1735                 <lit-tag v="ND"/>
1736               </equal>
1737             </test>
1738             <let>
1739               <clip pos="3" side="tl" part="nbr"/>
1740               <var n="numero"/>
1741             </let>
1742           </when>
1743         </choose>   
1744         <let>
1745                 <var n="genenc"/>
1746                 <clip pos="1" side="sl" part="gen"/>
1747         </let>
1748       </def-macro>   
1749     
1751       <def-macro n="f_concord4" npar="4">
1752           <choose>
1753             <when>
1754               <test> 
1755                 <and>
1756                   <or>
1757                     <equal>
1758                       <clip pos="2" side="sl" part="gen"/>
1759                       <clip pos="1" side="sl" part="gen"/>
1760                     </equal>
1761                     <equal>
1762                       <clip pos="2" side="sl" part="gen"/>
1763                       <lit-tag v="mf"/>
1764                     </equal>
1765                     <equal>
1766                       <clip pos="1" side="sl" part="gen"/>
1767                       <lit-tag v="mf"/>
1768                     </equal>
1769                   </or>
1770                   <or>
1771                     <equal>
1772                       <clip pos="2" side="sl" part="nbr"/>
1773                       <clip pos="1" side="sl" part="nbr"/>
1774                     </equal>
1775                     <equal>
1776                       <clip pos="2" side="sl" part="nbr"/>
1777                       <lit-tag v="sp"/>
1778                     </equal>
1779                     <equal>
1780                       <clip pos="1" side="sl" part="nbr"/>
1781                       <lit-tag v="sp"/>
1782                     </equal>
1783                   </or>
1784                 </and>
1785               </test>
1786               <let><var n="concPrimero"/><lit v="true"/></let>
1787             </when>
1788             <otherwise> 
1789             <let><var n="concPrimero"/><lit v="false"/></let>
1790             </otherwise>
1791         </choose>
1792         
1793         <choose>
1794             <when>
1795               <test> 
1796                 <and>
1797                   <or>
1798                     <equal>
1799                       <clip pos="3" side="sl" part="gen"/>
1800                       <clip pos="1" side="sl" part="gen"/>
1801                     </equal>
1802                     <equal>
1803                       <clip pos="3" side="sl" part="gen"/>
1804                       <lit-tag v="mf"/>
1805                     </equal>
1806                     <equal>
1807                       <clip pos="1" side="sl" part="gen"/>
1808                       <lit-tag v="mf"/>
1809                     </equal>
1810                   </or>
1811                   <or>
1812                     <equal>
1813                       <clip pos="3" side="sl" part="nbr"/>
1814                       <clip pos="1" side="sl" part="nbr"/>
1815                     </equal>
1816                     <equal>
1817                       <clip pos="3" side="sl" part="nbr"/>
1818                       <lit-tag v="sp"/>
1819                     </equal>
1820                     <equal>
1821                       <clip pos="1" side="sl" part="nbr"/>
1822                       <lit-tag v="sp"/>
1823                     </equal>
1824                   </or>
1825                 </and>
1826               </test>
1827               <let><var n="concSegundo"/><lit v="true"/></let>
1828             </when>      
1829             <otherwise>
1830               <let><var n="concSegundo"/><lit v="false"/></let>
1831             </otherwise>
1832           </choose>
1834          <choose>
1835             <when>
1836               <test> 
1837                 <and>
1838                   <or>
1839                     <equal>
1840                       <clip pos="4" side="sl" part="gen"/>
1841                       <clip pos="1" side="sl" part="gen"/>
1842                     </equal>
1843                     <equal>
1844                       <clip pos="4" side="sl" part="gen"/>
1845                       <lit-tag v="mf"/>
1846                     </equal>
1847                     <equal>
1848                       <clip pos="1" side="sl" part="gen"/>
1849                       <lit-tag v="mf"/>
1850                     </equal>
1851                   </or>
1852                   <or>
1853                     <equal>
1854                       <clip pos="4" side="sl" part="nbr"/>
1855                       <clip pos="1" side="sl" part="nbr"/>
1856                     </equal>
1857                     <equal>
1858                       <clip pos="4" side="sl" part="nbr"/>
1859                       <lit-tag v="sp"/>
1860                     </equal>
1861                     <equal>
1862                       <clip pos="1" side="sl" part="nbr"/>
1863                       <lit-tag v="sp"/>
1864                     </equal>
1865                   </or>
1866                 </and>
1867               </test>
1868               <let><var n="concTercero"/><lit v="true"/></let>
1869             </when>      
1870             <otherwise> 
1871               <let><var n="concTercero"/><lit v="false"/></let>
1872             </otherwise>
1873           </choose>
1874            
1876           <choose>
1877             <when>
1878               <test> 
1879                 <and>
1880                   <not>
1881                     <equal>
1882                       <clip pos="1" side="tl" part="gen"/>
1883                       <clip pos="1" side="sl" part="gen"/>
1884                     </equal>
1885                   </not>
1886                   <not>
1887                     <equal>
1888                       <clip pos="1" side="tl" part="gen"/>
1889                       <lit-tag v="mf"/>
1890                     </equal>
1891                   </not>
1892                   <not>
1893                     <equal>
1894                       <clip pos="1" side="tl" part="gen"/>
1895                       <lit-tag v="GD"/>
1896                     </equal>
1897                   </not>
1898                 </and>
1899               </test>
1900                 <choose>
1901                   <when>
1902                     <test>
1903                       <and>
1904                         <not>
1905                           <equal>
1906                             <clip pos="2" side="tl" part="gen"/>
1907                             <lit-tag v="mf"/>
1908                           </equal>
1909                         </not>
1910                         <not>
1911                           <and>
1912                             <equal>
1913                               <clip pos="2" side="sl" part="gen"/>
1914                               <lit-tag v="mf"/>
1915                             </equal>
1916                             <not>
1917                               <equal>
1918                                 <clip pos="2" side="tl" part="gen"/>
1919                                 <lit-tag v="GD"/>
1920                               </equal>
1921                             </not>
1922                           </and>
1923                         </not>
1924                         <equal>
1925                           <var n="concPrimero"/>
1926                           <lit v="true"/>
1927                         </equal>
1928                       </and>
1929                     </test>
1930                       <let>
1931                         <clip pos="2" side="tl" part="gen"/>
1932                         <clip pos="1" side="tl" part="gen"/> 
1933                       </let>
1934                     </when> 
1935                   </choose>
1936                   <choose>
1937                   <when>
1938                     <test>
1939                       <and>
1940                         <not>
1941                           <equal>
1942                             <clip pos="3" side="tl" part="gen"/>
1943                             <lit-tag v="mf"/>
1944                           </equal>
1945                         </not>
1946                         <not>
1947                           <and>
1948                             <equal>
1949                               <clip pos="3" side="sl" part="gen"/>
1950                               <lit-tag v="mf"/>
1951                             </equal>
1952                             <not>
1953                               <equal>
1954                                 <clip pos="3" side="tl" part="gen"/>
1955                                 <lit-tag v="GD"/>
1956                               </equal>
1957                             </not>
1958                           </and>
1959                         </not>
1960                         <equal>
1961                           <var n="concSegundo"/>
1962                           <lit v="true"/>
1963                         </equal>
1964                       </and>
1965                     </test>
1966                       <let>
1967                         <clip pos="3" side="tl" part="gen"/>
1968                         <clip pos="1" side="tl" part="gen"/> 
1969                       </let>
1970                     </when> 
1971                   </choose>  
1972                   <choose>
1973                     <when>
1974                       <test>  
1975                         <and>
1976                           <not>
1977                             <equal>
1978                               <clip pos="4" side="tl" part="gen"/>
1979                               <lit-tag v="mf"/>
1980                             </equal>
1981                           </not>
1982                           <not>
1983                             <and>
1984                               <equal>
1985                                 <clip pos="4" side="sl" part="gen"/>
1986                                 <lit-tag v="mf"/>
1987                               </equal>
1988                               <not>
1989                                 <equal>
1990                                   <clip pos="4" side="tl" part="gen"/>
1991                                   <lit-tag v="GD"/>
1992                                 </equal>
1993                               </not>
1994                             </and>
1995                           </not>
1996                           <equal>
1997                             <var n="concTercero"/>
1998                             <lit v="true"/>
1999                           </equal>
2000                         </and>
2001                       </test>
2002                        <let>
2003                          <clip pos="4" side="tl" part="gen"/>
2004                          <clip pos="1" side="tl" part="gen"/> 
2005                        </let> 
2006                     </when> 
2007                   </choose>
2008                 </when>
2009               </choose>
2011             <choose>
2012               <when>
2013                 <test> 
2014                   <and>
2015                     <not>
2016                       <equal>
2017                         <clip pos="1" side="tl" part="nbr"/>
2018                         <clip pos="1" side="sl" part="nbr"/>
2019                       </equal>
2020                     </not>
2021                     <not>
2022                       <equal>
2023                         <clip pos="1" side="tl" part="nbr"/>
2024                         <lit-tag v="sp"/>
2025                       </equal>
2026                     </not>
2027                     <not>
2028                       <equal>
2029                         <clip pos="1" side="tl" part="nbr"/>
2030                         <lit-tag v="ND"/>
2031                       </equal>
2032                     </not>
2033                   </and>
2034                 </test>
2035                   <choose>
2036                     <when>
2037                       <test>
2038                         <and>
2039                           <not>
2040                             <equal>
2041                               <clip pos="2" side="tl" part="nbr"/>
2042                               <lit-tag v="sp"/>
2043                             </equal>
2044                           </not>
2045                           <not>
2046                             <and>
2047                               <equal>
2048                                 <clip pos="2" side="sl" part="nbr"/>
2049                                 <lit-tag v="sp"/>
2050                               </equal>
2051                               <not>
2052                                 <equal>
2053                                   <clip pos="2" side="tl" part="nbr"/>
2054                                   <lit-tag v="ND"/>
2055                                 </equal>
2056                               </not>
2057                             </and>
2058                           </not>
2059                           <equal>
2060                             <var n="concPrimero"/>
2061                             <lit v="true"/>
2062                           </equal>
2063                         </and>
2064                       </test>
2065                       <let>
2066                         <clip pos="2" side="tl" part="nbr"/>
2067                         <clip pos="1" side="tl" part="nbr"/> 
2068                       </let>
2069                     </when>
2070                   </choose>
2071                   <choose>
2072                     <when>
2073                       <test>
2074                         <and>
2075                           <not>
2076                             <equal>
2077                               <clip pos="3" side="tl" part="nbr"/>
2078                               <lit-tag v="sp"/>
2079                             </equal>
2080                           </not>
2081                           <not>
2082                             <and>
2083                               <equal>
2084                                 <clip pos="3" side="sl" part="nbr"/>
2085                                 <lit-tag v="sp"/>
2086                               </equal>
2087                               <not>
2088                                 <equal>
2089                                   <clip pos="3" side="tl" part="nbr"/>
2090                                   <lit-tag v="ND"/>
2091                                 </equal>
2092                               </not>
2093                             </and>
2094                           </not>
2095                           <equal>
2096                             <var n="concSegundo"/>
2097                             <lit v="true"/>
2098                           </equal>
2099                         </and>
2100                       </test>
2101                       <let>
2102                         <clip pos="3" side="tl" part="nbr"/>
2103                         <clip pos="1" side="tl" part="nbr"/> 
2104                      </let>
2105                    </when>
2106                  </choose>
2107                  <choose>
2108                    <when>
2109                      <test>
2110                        <and>
2111                          <not>
2112                            <equal>
2113                              <clip pos="4" side="tl" part="nbr"/>
2114                              <lit-tag v="sp"/>
2115                            </equal>
2116                          </not>
2117                          <not>
2118                            <and>
2119                              <equal>
2120                                <clip pos="4" side="sl" part="nbr"/>
2121                                <lit-tag v="sp"/>
2122                              </equal>
2123                              <not>
2124                                <equal>
2125                                  <clip pos="4" side="tl" part="nbr"/>
2126                                  <lit-tag v="ND"/>
2127                                </equal>
2128                              </not>
2129                            </and>
2130                          </not>
2131                          <equal>
2132                            <var n="concTercero"/>
2133                            <lit v="true"/>
2134                          </equal>
2135                        </and>
2136                      </test>
2137                      <let>
2138                        <clip pos="4" side="tl" part="nbr"/>
2139                        <clip pos="1" side="tl" part="nbr"/> 
2140                      </let>
2141                    </when>
2142                  </choose>
2143               </when>
2144             </choose>
2145            
2146         <choose>
2147           <when>
2148             <test> 
2149               <equal>
2150                 <clip pos="1" side="tl" part="gen"/>
2151                 <lit-tag v="m"/>
2152               </equal>
2153             </test>
2154             <let>
2155               <var n="genero"/>
2156               <lit-tag v="m"/>
2157             </let>
2158           </when>
2159           <when>
2160             <test>
2161               <equal>
2162                 <clip pos="1" side="tl" part="gen"/>
2163                 <lit-tag v="f"/>
2164               </equal>
2165             </test>
2166             <let>
2167               <var n="genero"/>
2168               <lit-tag v="f"/>
2169             </let>
2170           </when>
2171           <when>
2172             <test>
2173               <equal>
2174                 <clip pos="2" side="tl" part="gen"/>
2175                 <lit-tag v="m"/>
2176               </equal>
2177             </test>
2178             <let>
2179               <var n="genero"/>
2180               <lit-tag v="m"/>
2181             </let>
2182           </when>
2183           <when>
2184             <test>
2185               <equal>
2186                 <clip pos="2" side="tl" part="gen"/>
2187                 <lit-tag v="f"/>
2188               </equal>
2189             </test>
2190             <let>
2191               <var n="genero"/>
2192               <lit-tag v="f"/>
2193             </let>
2194           </when>
2195           <when>
2196             <test>
2197               <equal>
2198                 <clip pos="3" side="tl" part="gen"/>
2199                 <lit-tag v="m"/>
2200               </equal>
2201             </test>
2202             <let>
2203               <var n="genero"/>
2204               <lit-tag v="m"/>
2205             </let>
2206           </when>
2207           <when>
2208             <test>
2209               <equal>
2210                 <clip pos="3" side="tl" part="gen"/>
2211                 <lit-tag v="f"/>
2212               </equal>
2213             </test>
2214             <let>
2215               <var n="genero"/>
2216               <lit-tag v="f"/>
2217             </let>
2218           </when> 
2219           <when>
2220             <test>
2221               <equal>
2222                 <clip pos="4" side="tl" part="gen"/>
2223                 <lit-tag v="m"/>
2224               </equal>
2225             </test>
2226             <let>
2227               <var n="genero"/>
2228               <lit-tag v="m"/>
2229             </let>
2230           </when>
2231           <when>
2232             <test>
2233               <equal>
2234                 <clip pos="4" side="tl" part="gen"/>
2235                 <lit-tag v="f"/>
2236               </equal>
2237             </test>
2238             <let>
2239               <var n="genero"/>
2240               <lit-tag v="f"/>
2241             </let>
2242           </when>
2243           <otherwise>
2244             <let>
2245               <var n="genero"/>
2246               <lit-tag v="m"/>
2247             </let>
2248           </otherwise>
2250         </choose>
2251         
2252         <choose>
2253           <when>
2254             <test> 
2255               <equal>
2256                 <clip pos="1" side="tl" part="nbr"/>
2257                 <lit-tag v="sg"/>
2258               </equal>
2259             </test>
2260             <let>
2261               <var n="numero"/>
2262               <lit-tag v="sg"/>
2263             </let>
2264           </when>
2265           <when>
2266             <test>
2267               <equal>
2268                 <clip pos="1" side="tl" part="nbr"/>
2269                 <lit-tag v="pl"/>
2270               </equal>
2271             </test>
2272             <let>
2273               <var n="numero"/>
2274               <lit-tag v="pl"/>
2275             </let>
2276           </when>
2277           <when>
2278             <test>
2279               <equal>
2280                 <clip pos="2" side="tl" part="nbr"/>
2281                 <lit-tag v="sg"/>
2282               </equal>
2283             </test>
2284             <let>
2285               <var n="numero"/>
2286               <lit-tag v="sg"/>
2287             </let>
2288           </when>
2289           <when>
2290             <test>
2291               <equal>
2292                 <clip pos="2" side="tl" part="nbr"/>
2293                 <lit-tag v="pl"/>
2294               </equal>
2295             </test>
2296             <let>
2297               <var n="numero"/>
2298               <lit-tag v="pl"/>
2299             </let>
2300           </when>
2301           <when>
2302             <test>
2303               <equal>
2304                 <clip pos="3" side="tl" part="nbr"/>
2305                 <lit-tag v="sg"/>
2306               </equal>
2307             </test>
2308             <let>
2309               <var n="numero"/>
2310               <lit-tag v="sg"/>
2311             </let>
2312           </when>
2313           <when>
2314             <test>
2315               <equal>
2316                 <clip pos="3" side="tl" part="nbr"/>
2317                 <lit-tag v="pl"/>
2318               </equal>
2319             </test>
2320             <let>
2321               <var n="numero"/>
2322               <lit-tag v="pl"/>
2323             </let>
2324           </when>
2325           <when>
2326             <test>
2327               <equal>
2328                 <clip pos="4" side="tl" part="nbr"/>
2329                 <lit-tag v="sg"/>
2330               </equal>
2331             </test>
2332             <let>
2333               <var n="numero"/>
2334               <lit-tag v="sg"/>
2335             </let>
2336           </when>
2337           <when>
2338             <test>
2339               <equal>
2340                 <clip pos="4" side="tl" part="nbr"/>
2341                 <lit-tag v="pl"/>
2342               </equal>
2343             </test>
2344             <let>
2345               <var n="numero"/>
2346               <lit-tag v="pl"/>
2347             </let>
2348           </when> 
2349           <otherwise>
2350             <let>
2351               <var n="numero"/>
2352               <lit-tag v="sg"/>
2353             </let>
2354           </otherwise>
2355         </choose>
2357         <choose> 
2358           <when>
2359             <test>
2360               <equal>
2361                 <clip pos="1" side="tl" part="gen"/>
2362                 <lit-tag v="GD"/>
2363               </equal>
2364             </test>
2365             <let>
2366               <clip pos="1" side="tl" part="gen"/>
2367               <var n="genero"/>
2368             </let>
2369           </when>
2370         </choose>
2371         <choose>
2372           <when>
2373             <test>
2374               <equal>
2375                 <clip pos="2" side="tl" part="gen"/>
2376                 <lit-tag v="GD"/>
2377               </equal>
2378             </test>
2379             <let>
2380               <clip pos="2" side="tl" part="gen"/>
2381               <var n="genero"/>
2382             </let>
2383           </when>
2384         </choose>
2385         <choose>
2386           <when>
2387             <test>
2388               <equal>
2389                 <clip pos="3" side="tl" part="gen"/>
2390                 <lit-tag v="GD"/>
2391               </equal>
2392             </test>
2393             <let>
2394               <clip pos="3" side="tl" part="gen"/>
2395               <var n="genero"/>
2396             </let>
2397           </when>
2398         </choose>
2399         <choose>
2400           <when>
2401             <test>
2402               <equal>
2403                 <clip pos="4" side="tl" part="gen"/>
2404                 <lit-tag v="GD"/>
2405               </equal>
2406             </test>
2407             <let>
2408               <clip pos="4" side="tl" part="gen"/>
2409               <var n="genero"/>
2410             </let>
2411           </when> 
2412         </choose>
2413         <choose>
2414           <when>
2415             <test>
2416               <equal>
2417                 <clip pos="1" side="tl" part="nbr"/>
2418                 <lit-tag v="ND"/>
2419               </equal>
2420             </test>
2421             <let>
2422               <clip pos="1" side="tl" part="nbr"/>
2423               <var n="numero"/>
2424             </let>
2425           </when>
2426         </choose>
2427         <choose>
2428           <when>
2429             <test>
2430               <equal>
2431                 <clip pos="2" side="tl" part="nbr"/>
2432                 <lit-tag v="ND"/>
2433               </equal>
2434             </test>
2435             <let>
2436               <clip pos="2" side="tl" part="nbr"/>
2437               <var n="numero"/>
2438             </let>
2439           </when>
2440         </choose>
2441         <choose>
2442           <when>
2443             <test>
2444               <equal>
2445                 <clip pos="3" side="tl" part="nbr"/>
2446                 <lit-tag v="ND"/>
2447               </equal>
2448             </test>
2449             <let>
2450               <clip pos="3" side="tl" part="nbr"/>
2451               <var n="numero"/>
2452             </let>
2453           </when>
2454         </choose>
2455         <choose>
2456           <when>
2457             <test>
2458               <equal>
2459                 <clip pos="4" side="tl" part="nbr"/>
2460                 <lit-tag v="ND"/>
2461               </equal>
2462             </test>
2463             <let>
2464               <clip pos="4" side="tl" part="nbr"/>
2465               <var n="numero"/>
2466             </let>
2467           </when>
2468         </choose> 
2469         <let>
2470                 <var n="genenc"/>
2471                 <clip pos="1" side="sl" part="gen"/>
2472         </let>
2473       </def-macro>   
2474                 
2475                 <def-macro n="f_enc" npar="1"><!--fa que el pronom enclític plural "lo" agafi el gènere de la última paraula. si funciona, ho miraré pel singular, també-->
2476                 <choose>
2477                                 <when>
2478                                         <test>
2479                                                 <and>
2480                                                         <equal>
2481                                                                 <clip pos="1" side="tl" part="lem"/>
2482                                                                 <lit v="el"/>
2483                                                         </equal>
2484                                                         <not>
2485                                                                 <equal>
2486                                                                         <var n="genenc"/>
2487                                                                         <lit v="ind"/>
2488                                                                 </equal>
2489                                                         </not>
2490                                                         <equal>
2491                                                                 <clip pos="1" side="sl" part="gen"/>
2492                                                                 <var n="genenc"/>
2493                                                         </equal>
2494                                                 </and>  
2495                                         </test>
2496                                         <let>
2497                                                 <clip pos="1" side="tl" part="gen"/>
2498                                                 <var n="genero"/>
2499                                 </let>
2500                                 </when>
2501                         </choose>
2502                 </def-macro>
2503                 
2504                 <def-macro n="f_lexadj" npar="1">
2505                         <choose>
2506                                 <when>
2507                                         <test>
2508                                                 <equal>
2509                                                         <clip pos="1" side="tl" part="lem"/>
2510                                                         <lit v="bo"/>
2511                                                 </equal>
2512                                         </test>
2513                                         <let>
2514                                                 <clip pos="1" side="tl" part="lem"/>
2515                                                 <lit v="bon"/>
2516                                         </let>
2517                                 </when>
2518                         </choose>
2519                 </def-macro>
2520                 
2521                 <def-macro n="f_lexverb" npar="1"> <!-- això és per donar etiqueta lèxica  a alguns verbs -->
2522                         <choose>
2523                                 <when>
2524                                         <test>
2525                                                 <or>
2526                                                         <equal>
2527                                                                 <clip pos="1" side="sl" part="lem"/>
2528                                                                 <lit v="anar"/>
2529                                                         </equal>
2530                                                         <equal>
2531                                                                 <clip pos="1" side="sl" part="lem"/>
2532                                                                 <lit v="dirigir"/>
2533                                                         </equal>
2534                                                         <equal>
2535                                                                 <clip pos="1" side="sl" part="lem"/>
2536                                                                 <lit v="córrer"/>
2537                                                         </equal>
2538                                                         <equal>
2539                                                                 <clip pos="1" side="sl" part="lem"/>
2540                                                                 <lit v="condusir"/>
2541                                                         </equal>
2542                                                         <equal>
2543                                                                 <clip pos="1" side="sl" part="lem"/>
2544                                                                 <lit v="Anar"/>
2545                                                         </equal>
2546                                                         <equal>
2547                                                                 <clip pos="1" side="sl" part="lem"/>
2548                                                                 <lit v="Dirigir"/>
2549                                                         </equal>
2550                                                         <equal>
2551                                                                 <clip pos="1" side="sl" part="lem"/>
2552                                                                 <lit v="Córrer"/>
2553                                                         </equal>
2554                                                         <equal>
2555                                                                 <clip pos="1" side="sl" part="lem"/>
2556                                                                 <lit v="Condusir"/>
2557                                                         </equal>
2558                                                         
2559                                                 </or>
2560                                         </test>
2561                                         <let>
2562                                                 <var n="tipusverb"/>
2563                                                 <lit-tag v="mov"/>
2564                                         </let>
2565                                 </when>
2566                                 <otherwise>
2567                                         <choose>
2568                                                 <when>
2569                                                         <test>
2570                                                                 <or>
2571                                                                         <equal>
2572                                                                                 <clip pos="1" side="sl" part="lem"/>
2573                                                                                 <lit v="èster"/>
2574                                                                         </equal>
2575                                                                         <equal>
2576                                                                                 <clip pos="1" side="sl" part="lem"/>
2577                                                                                 <lit v="estar"/>
2578                                                                         </equal>
2579                                                                         <equal>
2580                                                                                 <clip pos="1" side="sl" part="lem"/>
2581                                                                                 <lit v="Èster"/>
2582                                                                         </equal>
2583                                                                         <equal>
2584                                                                                 <clip pos="1" side="sl" part="lem"/>
2585                                                                                 <lit v="Estar"/>
2586                                                                         </equal>
2587                                                                 </or>
2588                                                         </test>
2589                                                         <let>
2590                                                                 <var n="tipusverb"/>
2591                                                                 <lit-tag v="estat"/>
2592                                                         </let>
2593                                                 </when>
2594                                                 <otherwise>
2595                                                         <let>
2596                                                                 <var n="tipusverb"/>
2597                                                                 <lit-tag v="no"/>
2598                                                         </let>
2599                                                 </otherwise>
2600                                         </choose>
2601                                 </otherwise>
2602                         </choose>
2603                 </def-macro>
2604          
2605          <def-macro n="f_lexprep" npar="1">
2606                  <choose>
2607                          <when>
2608                                  <test>
2609                                          <or>
2610                                          <and>
2611                                                 <or>
2612                                                          <equal>
2613                                                                  <clip pos="1" side="sl" part="lem"/>
2614                                                                 <lit v="tà"/>
2615                                                         </equal>
2616                                                         <equal>
2617                                                                  <clip pos="1" side="sl" part="lem"/>
2618                                                                 <lit v="entà"/>
2619                                                         </equal>
2620                                                 </or>
2621                                                 <equal>
2622                                                          <var n="tipusverb"/>
2623                                                         <lit-tag v="mov"/>
2624                                                  </equal>
2625                                         </and>
2626                                         <equal>
2627                                                 <clip pos="1" side="sl" part="lem"/>
2628                                                 <lit v="en"/>
2629                                         </equal>
2630                                         
2631                                         </or>
2632                                  </test>
2633                 <!--             <choose>
2634                                          <when>
2635                                                  <test>
2636                                                          <or>
2637                                                                  <equal>
2638                                                                          <var n="tipusverb"/>
2639                                                                          <lit-tag v="mov"/>
2640                                                                  </equal>
2641                                                                  <equal>
2642                                                                          <var n="tipusverb"/>
2643                                                                          <lit-tag v="estat"/>
2644                                                                  </equal>
2645                                                          </or>
2646                                                  </test>-->
2647                                                  <let>
2648                                                          <clip pos="1" side="tl" part="lem"/>
2649                                                          <lit v="a"/>
2650                                                  </let>
2651                                          </when>
2652                                  </choose>
2653 <!--                    </when>
2654                 </choose>-->
2655          </def-macro>
2656 </section-def-macros>
2658 <section-rules>
2659         <rule> <!-- REGLA: DETERMINANT -->
2660                 <pattern>
2661                         <pattern-item n="det"/>
2662                 </pattern>
2663                 <action>
2664                         <call-macro n="f_concord1">
2665                                 <with-param pos="1"/>
2666                         </call-macro>     
2667                         <out> 
2668                                 <lu>   
2669                                         <clip pos="1" side="tl" part="whole"/> 
2670                                 </lu> 
2671                         </out>
2672                 </action>
2673         </rule>
2674         
2675         <rule> <!-- REGLA: NOM -->
2676                 <pattern>
2677                         <pattern-item n="nom"/>
2678                 </pattern>
2679                 <action>
2680                         <call-macro n="f_concord1">
2681                                 <with-param pos="1"/>
2682                         </call-macro>     
2683                         <out>  
2684                                 <lu> 
2685                                         <clip pos="1" side="tl" part="whole"/> 
2686                                 </lu>
2687                         </out>
2688                 </action>
2689         </rule>
2690         
2691         <rule> <!-- REGLA: ADJECTIU -->
2692                 <pattern>
2693                         <pattern-item n="adj"/>
2694                 </pattern>
2695                 <action>
2696                         <call-macro n="f_concord1">
2697                                 <with-param pos="1"/>
2698                         </call-macro>     
2699                         <out>   
2700                                 <lu>
2701                                         <clip pos="1" side="tl" part="whole"/> 
2702                                 </lu>
2703                         </out>
2704                 </action>
2705         </rule>
2706         
2707         <rule> <!-- REGLA: PRONOM --><!--Special case, macro f_concord1 
2708                                                                                                                   is not applicable because gender and number cannot be taken from previous rules -->
2709                 <pattern>
2710                         <pattern-item n="prn"/>
2711                 </pattern>
2712                 <action>
2713                         <choose>
2714                                 <when>
2715                                         <test> 
2716                                                 <equal>
2717                                                         <clip pos="1" side="tl" part="gen"/>
2718                                                         <lit-tag v="GD"/>
2719                                                 </equal>
2720                                         </test>
2721                                         <let>
2722                                                 <clip pos="1" side="tl" part="gen"/>
2723                                                 <lit-tag v="m"/>
2724                                         </let>
2725                                 </when>
2726                         </choose>
2727                         <choose>
2728                                 <when>
2729                                         <test> 
2730                                                 <equal>
2731                                                         <clip pos="1" side="tl" part="nbr"/>
2732                                                         <lit-tag v="ND"/>
2733                                                 </equal>
2734                                         </test>
2735                                         <let>
2736                                                 <clip pos="1" side="tl" part="nbr"/>
2737                                                 <lit-tag v="sg"/>
2738                                         </let>
2739                                 </when>
2740                         </choose>       
2741                         <out>   
2742                                 <lu>
2743                                         <clip pos="1" side="tl" part="whole"/>
2744                                 </lu>
2745                         </out>
2746                 </action>
2747         </rule>
2748         
2749         <rule> <!-- REGLA: NUMERAL-->
2750                 <pattern>
2751                         <pattern-item n="num"/>
2752                 </pattern>
2753                 <action>
2754                         <call-macro n="f_concord1">
2755                                 <with-param pos="1"/>
2756                         </call-macro>     
2757                         <out>  
2758                                 <lu> 
2759                                         <clip pos="1" side="tl" part="whole"/>
2760                                 </lu>
2761                         </out>
2762                 </action>
2763         </rule>
2764         
2765         <rule> <!-- REGLA: DETERMINANT NOM -->
2766                 <pattern>
2767                         <pattern-item n="det"/>
2768                         <pattern-item n="nom"/>
2769                 </pattern>
2770                 <action>
2771                         <call-macro n="f_concord2">
2772                                 <with-param pos="2"/>
2773                                 <with-param pos="1"/>
2774                         </call-macro>     
2775                         <out>     
2776                                 <lu>
2777                                         <clip pos="1" side="tl" part="whole"/>
2778                                 </lu>
2779                                 <b pos="1"/>        
2780                                 <lu>
2781                                         <clip pos="2" side="tl" part="whole"/>
2782                                 </lu>  
2783                         </out>
2784                         
2785                 </action>
2786         </rule>
2787         
2788         <rule> <!-- REGLA: NOM ADJECTIU-->
2789                 <pattern>
2790                         <pattern-item n="nom"/>
2791                         <pattern-item n="adjec"/>
2792                 </pattern>
2793                 <action>
2794                         <call-macro n="f_concord2">
2795                                 <with-param pos="1"/>
2796                                 <with-param pos="2"/>
2797                         </call-macro>     
2798                         <out>   
2799                                 <lu>
2800                                         <clip pos="1" side="tl" part="whole"/>
2801                                 </lu>
2802                                 <b pos="1"/>
2803                                 <lu>
2804                                         <clip pos="2" side="tl" part="lemh"/>
2805                                         <clip pos="2" side="tl" part="a_adjec"/>
2806                                         <clip pos="2" side="tl" part="gen"/>
2807                                         <clip pos="2" side="tl" part="nbr"/>
2808                               <clip pos="2" side="tl" part="lemq"/>
2809                                 </lu>  
2810                         </out>
2811                         
2812                 </action>
2813         </rule>
2814         
2815         <rule> <!-- REGLA: ADJECTIU NOM -->
2816                 <pattern>
2817                         <pattern-item n="adj"/>
2818                         <pattern-item n="nom"/>
2819                 </pattern>
2820                 <action>
2821                         <call-macro n="f_concord2">
2822                                 <with-param pos="2"/>
2823                                 <with-param pos="1"/>
2824                         </call-macro>    
2825                         <call-macro n="f_lexadj">
2826                                 <with-param pos="1"/>
2827                         </call-macro>    
2828                         <out>  
2829                                 <lu>  
2830                                         <clip pos="1" side="tl" part="whole"/>
2831                                 </lu>
2832                                 <b pos="1"/>
2833                                 <lu> 
2834                                         <clip pos="2" side="tl" part="whole"/>
2835                                 </lu>
2836                         </out>
2837                         
2838                 </action>
2839         </rule>
2840         
2841         <rule> <!-- REGLA: DET NOM ADJECTIU-->
2842                 <pattern>
2843                         <pattern-item n="det"/>
2844                         <pattern-item n="nom"/>
2845                         <pattern-item n="adjec"/>
2846                 </pattern>
2847                 <action>
2848                         <call-macro n="f_concord3">
2849                                 <with-param pos="2"/>
2850                                 <with-param pos="3"/>
2851                                 <with-param pos="1"/>
2852                         </call-macro>     
2853                         <out>    
2854                                 <lu>  
2855                                         <clip pos="1" side="tl" part="whole"/>
2856                                 </lu> 
2857                                 <b pos="1"/>       
2858                                 <lu>
2859                                         <clip pos="2" side="tl" part="whole"/>
2860                                 </lu>
2861                                 <b pos="2"/>
2862                                 <lu>
2863                                         <clip pos="3" side="tl" part="lemh"/>
2864                                         <clip pos="3" side="tl" part="a_adjec"/>
2865                                         <clip pos="3" side="tl" part="gen"/>
2866                                         <clip pos="3" side="tl" part="nbr"/>
2867                               <clip pos="3" side="tl" part="lemq"/>
2868                                 </lu>
2869                         </out>
2870                         
2871                 </action>
2872         </rule>
2873         
2874         <rule> <!-- REGLA: DET NOM ADJECTIU ADJECTIU-->
2875                 <pattern>
2876                         <pattern-item n="det"/>
2877                         <pattern-item n="nom"/>
2878                         <pattern-item n="adjec"/>
2879                         <pattern-item n="adjec"/>
2880                 </pattern>
2881                 <action>
2882                         <call-macro n="f_concord4">
2883                                 <with-param pos="2"/>
2884                                 <with-param pos="3"/>
2885                                 <with-param pos="4"/>
2886                                 <with-param pos="1"/>
2887                         </call-macro>     
2888                         <out>    
2889                                 <lu>  
2890                                         <clip pos="1" side="tl" part="whole"/>
2891                                 </lu> 
2892                                 <b pos="1"/>
2893                                 <lu>
2894                                         <clip pos="2" side="tl" part="whole"/>
2895                                 </lu>
2896                                 <b pos="2"/>
2897                                 <lu>
2898                                         <clip pos="3" side="tl" part="lemh"/>
2899                                         <clip pos="3" side="tl" part="a_adjec"/>
2900                                         <clip pos="3" side="tl" part="gen"/>
2901                                         <clip pos="3" side="tl" part="nbr"/>
2902                               <clip pos="3" side="tl" part="lemq"/>
2903                                 </lu>
2904                                 <b pos="3"/>
2905                                 <lu>
2906                                         <clip pos="4" side="tl" part="lemh"/>
2907                                         <clip pos="4" side="tl" part="a_adjec"/>
2908                                         <clip pos="4" side="tl" part="gen"/>
2909                                         <clip pos="4" side="tl" part="nbr"/>
2910                               <clip pos="4" side="tl" part="lemq"/>
2911                                 </lu>
2912                         </out>
2913                 </action>
2914         </rule>
2915         
2916         <rule> <!-- REGLA: NOM ADJECTIU ADJECTIU-->
2917                 <pattern>
2918                         <pattern-item n="nom"/>
2919                         <pattern-item n="adjec"/>
2920                         <pattern-item n="adjec"/>
2921                 </pattern>
2922                 <action>
2923                         <call-macro n="f_concord3">
2924                                 <with-param pos="1"/>
2925                                 <with-param pos="2"/>
2926                                 <with-param pos="3"/>
2927                         </call-macro>     
2928                         <out>    
2929                                 <lu>  
2930                                         <clip pos="1" side="tl" part="whole"/>
2931                                 </lu> 
2932                                 <b pos="1"/>
2933                                 <lu>
2934                                         <clip pos="2" side="tl" part="lemh"/>
2935                                         <clip pos="2" side="tl" part="a_adjec"/>
2936                                         <clip pos="2" side="tl" part="gen"/>
2937                                         <clip pos="2" side="tl" part="nbr"/>
2938                               <clip pos="2" side="tl" part="lemq"/>
2939                                 </lu>
2940                                 <b pos="2"/>
2941                                 <lu>
2942                                         <clip pos="3" side="tl" part="lemh"/>
2943                                         <clip pos="3" side="tl" part="a_adjec"/>
2944                                         <clip pos="3" side="tl" part="gen"/>
2945                                         <clip pos="3" side="tl" part="nbr"/>
2946                               <clip pos="3" side="tl" part="lemq"/>
2947                                 </lu>
2948                         </out>
2949                 </action>
2950         </rule>
2951         
2952         <rule> <!-- REGLA: DET ADJECTIU NOM-->
2953                 <pattern>
2954                         <pattern-item n="det"/>
2955                         <pattern-item n="adjec"/>
2956                         <pattern-item n="nom"/>
2957                 </pattern>
2958                 <action>
2959                         <call-macro n="f_concord3">
2960                                 <with-param pos="3"/>
2961                                 <with-param pos="2"/>
2962                                 <with-param pos="1"/>
2963                         </call-macro>   
2964                         <call-macro n="f_lexadj">
2965                                 <with-param pos="2"/>
2966                         </call-macro>    
2967                         
2968                         <out>  
2969                                 <lu>    
2970                                         <clip pos="1" side="tl" part="whole"/>
2971                                 </lu>
2972                                 <b pos="1"/>
2973                                 <lu>
2974                                         <clip pos="2" side="tl" part="lemh"/>
2975                                         <clip pos="2" side="tl" part="a_adjec"/>
2976                                         <clip pos="2" side="tl" part="gen"/>
2977                                         <clip pos="2" side="tl" part="nbr"/>
2978                               <clip pos="2" side="tl" part="lemq"/>
2979                                 </lu>
2980                                 <b pos="2"/>
2981                                 <lu>
2982                                         <clip pos="3" side="tl" part="whole"/>
2983                                 </lu>
2984                         </out>      
2985                 </action>
2986         </rule>
2987         
2988         <rule> <!-- REGLA: PREDET DET NOM-->
2989                 <pattern>
2990                         <pattern-item n="predet"/>
2991                         <pattern-item n="det"/>
2992                         <pattern-item n="nom"/>
2993                 </pattern>
2994                 <action>
2995                         <call-macro n="f_concord3">
2996                                 <with-param pos="3"/>           
2997                                 <with-param pos="2"/>
2998                                 <with-param pos="1"/>
2999                         </call-macro>     
3000                         <out> 
3001                                 <lu>    
3002                                         <clip pos="1" side="tl" part="whole"/>
3003                                 </lu>
3004                                 <b pos="1"/>
3005                                 <lu>
3006                                         <clip pos="2" side="tl" part="whole"/>
3007                                 </lu>
3008                                 <b pos="2"/>
3009                                 <lu>
3010                                         <clip pos="3" side="tl" part="whole"/>
3011                                 </lu>       
3012                         </out>
3013                 </action>
3014         </rule>
3015         
3016         <rule> <!-- REGLA: PREDET DET NOM ADJECTIU-->
3017                 <pattern>
3018                         <pattern-item n="predet"/>
3019                         <pattern-item n="det"/>
3020                         <pattern-item n="nom"/>
3021                         <pattern-item n="adjec"/>
3022                 </pattern>
3023                 <action>
3024                         <call-macro n="f_concord4">
3025                                 <with-param pos="3"/>
3026                                 <with-param pos="4"/>
3027                                 <with-param pos="2"/>
3028                                 <with-param pos="1"/>
3029                         </call-macro>     
3030                         <out> 
3031                                 <lu>    
3032                                         <clip pos="1" side="tl" part="whole"/>
3033                                 </lu>
3034                                 <b pos="1"/>
3035                                 <lu>
3036                                         <clip pos="2" side="tl" part="whole"/>
3037                                 </lu>
3038                                 <b pos="2"/>
3039                                 <lu>
3040                                         <clip pos="3" side="tl" part="whole"/>
3041                                 </lu>
3042                                 <b pos="3"/>
3043                                 <lu>
3044                                         <clip pos="4" side="tl" part="lemh"/>
3045                                         <clip pos="4" side="tl" part="a_adjec"/>
3046                                         <clip pos="4" side="tl" part="gen"/>
3047                                         <clip pos="4" side="tl" part="nbr"/>
3048                               <clip pos="4" side="tl" part="lemq"/>
3049                                 </lu>
3050                         </out>
3051                         
3052                 </action>
3053         </rule>
3054         
3055         <rule> <!-- REGLA: DETERMINANT ADJECTIU-->
3056                 <pattern>
3057                         <pattern-item n="det"/>
3058                         <pattern-item n="adjec"/>
3059                 </pattern>
3060                 <action>
3061                         <call-macro n="f_concord2">
3062                                 <with-param pos="2"/>
3063                                 <with-param pos="1"/>
3064                         </call-macro>     
3065                         <out>     
3066                                 <lu>
3067                                         <clip pos="1" side="tl" part="whole"/>
3068                                 </lu>
3069                                 <b pos="1"/>        
3070                                 <lu>
3071                                         <clip pos="2" side="tl" part="lemh"/>
3072                                         <clip pos="2" side="tl" part="a_adjec"/>
3073                                         <clip pos="2" side="tl" part="gen"/>
3074                                         <clip pos="2" side="tl" part="nbr"/>
3075                               <clip pos="2" side="tl" part="lemq"/>
3076                                 </lu>  
3077                         </out>
3078                         
3079                 </action>
3080         </rule>
3081         
3082         <rule> <!-- REGLA: ADJECTIU NOM ADJECTIU-->
3083                 <pattern>
3084                         <pattern-item n="adj"/>
3085                         <pattern-item n="nom"/>
3086                         <pattern-item n="adjec"/>
3087                 </pattern>
3088                 <action>
3089                         <call-macro n="f_lexadj">
3090                                 <with-param pos="1"/>
3091                         </call-macro> 
3092                         <call-macro n="f_concord3">
3093                                 <with-param pos="2"/>
3094                                 <with-param pos="3"/>
3095                                 <with-param pos="1"/>
3096                         </call-macro>     
3097                         <out>  
3098                                 <lu>    
3099                                         <clip pos="1" side="tl" part="whole"/>
3100                                 </lu>
3101                                 <b pos="1"/>
3102                                 <lu>
3103                                         <clip pos="2" side="tl" part="whole"/>
3104                                 </lu>
3105                                 <b pos="2"/>
3106                                 <lu>
3107                                         <clip pos="3" side="tl" part="lemh"/>
3108                                         <clip pos="3" side="tl" part="a_adjec"/>
3109                                         <clip pos="3" side="tl" part="gen"/>
3110                                         <clip pos="3" side="tl" part="nbr"/>
3111                               <clip pos="3" side="tl" part="lemq"/>
3112                                 </lu>
3113                         </out>
3114                         
3115                 </action>
3116         </rule>
3117         
3118         <rule> <!-- REGLA: DET ADJECTIU NOM ADJECTIU -->
3119                 <pattern>
3120                         <pattern-item n="det"/>
3121                         <pattern-item n="adjec"/>
3122                         <pattern-item n="nom"/>
3123                         <pattern-item n="adjec"/>
3124                 </pattern>
3125                 <action>
3126                         <call-macro n="f_lexadj">
3127                                 <with-param pos="2"/>
3128                         </call-macro> 
3129                         <call-macro n="f_concord4">
3130                                 <with-param pos="3"/>
3131                                 <with-param pos="4"/>
3132                                 <with-param pos="2"/>
3133                                 <with-param pos="1"/>
3134                         </call-macro>     
3135                         <out> 
3136                                 <lu>    
3137                                         <clip pos="1" side="tl" part="whole"/>
3138                                 </lu>
3139                                 <b pos="1"/>
3140                                 <lu>
3141                                         <clip pos="2" side="tl" part="lemh"/>
3142                                         <clip pos="2" side="tl" part="a_adjec"/>
3143                                         <clip pos="2" side="tl" part="gen"/>
3144                                         <clip pos="2" side="tl" part="nbr"/>
3145                               <clip pos="2" side="tl" part="lemq"/>
3146                                 </lu>
3147                                 <b pos="2"/>
3148                                 <lu>
3149                                         <clip pos="3" side="tl" part="whole"/>
3150                                 </lu>
3151                                 <b pos="3"/>
3152                                 <lu>
3153                                         <clip pos="4" side="tl" part="lemh"/>
3154                                         <clip pos="4" side="tl" part="a_adjec"/>
3155                                         <clip pos="4" side="tl" part="gen"/>
3156                                         <clip pos="4" side="tl" part="nbr"/>
3157                               <clip pos="4" side="tl" part="lemq"/>
3158                                 </lu>
3159                         </out>
3160                         
3161                 </action>
3162         </rule>
3163         
3164         <rule> <!-- REGLA: NOM ADVERBI ADJECTIU-->
3165                 <pattern>
3166                         <pattern-item n="nom"/>
3167                         <pattern-item n="adv"/>
3168                         <pattern-item n="adjec"/>
3169                 </pattern>
3170                 <action>
3171                         <call-macro n="f_concord2">
3172                                 <with-param pos="1"/>
3173                                 <with-param pos="3"/>
3174                         </call-macro>     
3175                         <out>   
3176                                 <lu>
3177                                         <clip pos="1" side="tl" part="whole"/>
3178                                 </lu>
3179                                 <b pos="1"/>
3180                                 <lu>
3181                                         <clip pos="2" side="tl" part="whole"/>
3182                                 </lu>
3183                                 <b pos="2"/>
3184                                 <lu>
3185                                         <clip pos="3" side="tl" part="lemh"/>
3186                                         <clip pos="3" side="tl" part="a_adjec"/>
3187                                         <clip pos="3" side="tl" part="gen"/>
3188                                         <clip pos="3" side="tl" part="nbr"/>
3189                               <clip pos="3" side="tl" part="lemq"/>
3190                                 </lu>  
3191                         </out>
3192                 </action>
3193         </rule>
3194         
3195         <rule> <!-- REGLA: DET NOM ADVERBI ADJECTIU -->
3196                 <pattern>
3197                         <pattern-item n="det"/>
3198                         <pattern-item n="nom"/>
3199                         <pattern-item n="adv"/>
3200                         <pattern-item n="adjec"/>
3201                 </pattern>
3202                 <action>
3203                         <call-macro n="f_concord3">
3204                                 <with-param pos="2"/>
3205                                 <with-param pos="1"/>
3206                                 <with-param pos="4"/>
3207                         </call-macro>     
3208                         <out>  
3209                                 <lu>    
3210                                         <clip pos="1" side="tl" part="whole"/>
3211                                 </lu>
3212                                 <b pos="1"/>
3213                                 <lu>    
3214                                         <clip pos="2" side="tl" part="whole"/>
3215                                 </lu>
3216                                 <b pos="2"/>
3217                                 <lu>
3218                                         <clip pos="3" side="tl" part="whole"/>
3219                                 </lu>
3220                                 <b pos="3"/>
3221                                 <lu>
3222                                         <clip pos="4" side="tl" part="lemh"/>
3223                                         <clip pos="4" side="tl" part="a_adjec"/>
3224                                         <clip pos="4" side="tl" part="gen"/>
3225                                         <clip pos="4" side="tl" part="nbr"/>
3226                               <clip pos="4" side="tl" part="lemq"/>
3227                                 </lu>
3228                         </out>
3229                 </action>
3230         </rule>
3231         
3232         <rule> <!-- REGLA: DET ADVERBI NOM-->
3233                 <pattern>
3234                         <pattern-item n="det"/>
3235                         <pattern-item n="adv"/>
3236                         <pattern-item n="nom"/>
3237                 </pattern>
3238                 <action>
3239                         <call-macro n="f_concord2">
3240                                 <with-param pos="3"/>
3241                                 <with-param pos="1"/>
3242                         </call-macro>     
3243                         <out>   
3244                                 <lu>
3245                                         <clip pos="1" side="tl" part="whole"/>
3246                                 </lu>
3247                                 <b pos="1"/>
3248                                 <lu>
3249                                         <clip pos="2" side="tl" part="whole"/>
3250                                 </lu>
3251                                 <b pos="2"/>
3252                                 <lu>
3253                                         <clip pos="3" side="tl" part="whole"/>
3254                                 </lu>  
3255                         </out>
3256                         
3257                 </action>
3258         </rule>
3259         
3260         <rule> <!-- REGLA: NUMERAL NOM -->
3261                 <pattern>
3262                         <pattern-item n="num"/>
3263                         <pattern-item n="nom"/>
3264                 </pattern>
3265                 <action>
3266                         <call-macro n="f_concord2">
3267                                 <with-param pos="2"/>
3268                                 <with-param pos="1"/>
3269                         </call-macro>     
3270                         <out>     
3271                                 <lu>
3272                                         <clip pos="1" side="tl" part="whole"/>
3273                                 </lu>
3274                                 <b pos="1"/>        
3275                                 <lu>
3276                                         <clip pos="2" side="tl" part="whole"/>
3277                                 </lu>  
3278                         </out>
3279                         
3280                 </action>
3281         </rule>
3282         
3283         <rule> <!-- REGLA: NUMERAL ADJECTIU -->
3284                 <pattern>
3285                         <pattern-item n="num"/>
3286                         <pattern-item n="adjec"/>
3287                 </pattern>
3288                 <action>
3289                         <call-macro n="f_concord2">
3290                                 <with-param pos="2"/>
3291                                 <with-param pos="1"/>
3292                         </call-macro>     
3293                         <out>     
3294                                 <lu>
3295                                         <clip pos="1" side="tl" part="whole"/>
3296                                 </lu>
3297                                 <b pos="1"/>        
3298                                 <lu>
3299                                         <clip pos="2" side="tl" part="lemh"/>
3300                                         <clip pos="2" side="tl" part="a_adjec"/>
3301                                         <clip pos="2" side="tl" part="gen"/>
3302                                         <clip pos="2" side="tl" part="nbr"/>
3303                               <clip pos="2" side="tl" part="lemq"/>
3304                                 </lu>  
3305                         </out>       
3306                 </action>
3307         </rule>
3308         
3309         <rule> <!-- REGLA: NUMERAL NOM ADJECTIU -->
3310                 <pattern>
3311                         <pattern-item n="num"/>
3312                         <pattern-item n="nom"/>
3313                         <pattern-item n="adjec"/>
3314                 </pattern>
3315                 <action>
3316                         <call-macro n="f_concord3">
3317                                 <with-param pos="2"/>
3318                                 <with-param pos="1"/>
3319                                 <with-param pos="3"/>
3320                         </call-macro>     
3321                         <out>     
3322                                 <lu>
3323                                         <clip pos="1" side="tl" part="whole"/>
3324                                 </lu>
3325                                 <b pos="1"/>        
3326                                 <lu>
3327                                         <clip pos="2" side="tl" part="whole"/>
3328                                 </lu>  
3329                                 <b pos="2"/>
3330                                 <lu>
3331                                         <clip pos="3" side="tl" part="lemh"/>
3332                                         <clip pos="3" side="tl" part="a_adjec"/>
3333                                         <clip pos="3" side="tl" part="gen"/>
3334                                         <clip pos="3" side="tl" part="nbr"/>
3335                               <clip pos="3" side="tl" part="lemq"/>
3336                                 </lu>
3337                         </out>
3338                         
3339                 </action>
3340         </rule>
3341         
3342         <rule> <!-- REGLA: NUMERAL ADJECTIU NOM -->
3343                 <pattern>
3344                         <pattern-item n="num"/>
3345                         <pattern-item n="adjec"/>
3346                         <pattern-item n="nom"/>
3347                 </pattern>
3348                 <action>
3349                         <call-macro n="f_lexadj">
3350                                 <with-param pos="2"/>
3351                         </call-macro> 
3352                         <call-macro n="f_concord3">
3353                                 <with-param pos="3"/>
3354                                 <with-param pos="2"/>
3355                                 <with-param pos="1"/>
3356                         </call-macro>     
3357                         <out>     
3358                                 <lu>
3359                                         <clip pos="1" side="tl" part="whole"/>
3360                                 </lu>
3361                                 <b pos="1"/>        
3362                                 <lu>
3363                                         <clip pos="2" side="tl" part="lemh"/>
3364                                         <clip pos="2" side="tl" part="a_adjec"/>
3365                                         <clip pos="2" side="tl" part="gen"/>
3366                                         <clip pos="2" side="tl" part="nbr"/>
3367                               <clip pos="2" side="tl" part="lemq"/>
3368                                 </lu>  
3369                                 <b pos="2"/>
3370                                 <lu>
3371                                         <clip pos="3" side="tl" part="whole"/>
3372                                 </lu>
3373                         </out>
3374                 </action>
3375         </rule>
3377         <rule> <!-- REGLA: DET NUMERAL NOM -->
3378                 <pattern>
3379                         <pattern-item n="det"/>
3380                         <pattern-item n="num"/>
3381                         <pattern-item n="nom"/>
3382                 </pattern>
3383                 <action>
3384                         <call-macro n="f_concord3">
3385                                 <with-param pos="3"/>
3386                                 <with-param pos="1"/>
3387                                 <with-param pos="2"/>
3388                         </call-macro>  
3389                         <out>     
3390                                 <lu>
3391                                         <clip pos="1" side="tl" part="lem"/>
3392                                         <clip pos="1" side="tl" part="a_det"/>
3393                                         <clip pos="1" side="tl" part="gen"/>
3394                                         <clip pos="1" side="tl" part="nbr"/>
3395                                 </lu>
3396                                 <b pos="1"/>        
3397                                 <lu>
3398                                         <clip pos="2" side="tl" part="whole"/>
3399                                 </lu>  
3400                                 <b pos="2"/>
3401                                 <lu>
3402                                         <clip pos="3" side="tl" part="whole"/>
3403                                 </lu>
3404                         </out>
3405                         
3406                 </action>
3407    </rule>
3408         
3409         <rule> <!-- REGLA: en tot INF -> GER (en tot dormir -> dormint)-->
3410                 <pattern>
3411                         <pattern-item n="en"/>
3412                         <pattern-item n="tot"/>
3413                         <pattern-item n="inf"/>
3414                 </pattern>
3415                 <action>
3416                         <out>     
3417                                 <lu>
3418                                         <get-case-from pos="1">
3419                                                 <clip pos="3" side="tl" part="lemh"/>
3420                                         </get-case-from>
3421                                         <clip pos="3" side="tl" part="a_verb"/>
3422                                         <lit-tag v="ger"/>
3423                                         <clip pos="3" side="tl" part="lemq"/>
3424                                 </lu>
3425                         </out>
3426                         <call-macro n="f_bcond">
3427                                 <with-param pos="1"/>
3428                         </call-macro>
3429                         <call-macro n="f_bcond">
3430                                 <with-param pos="2"/>
3431                         </call-macro>
3432                 </action>
3433    </rule>
3434         
3435         <rule> <!-- REGLA: en tot INF-enc -> GER (en tot dormir -> dormint)-->
3436                 <pattern>
3437                         <pattern-item n="en"/>
3438                         <pattern-item n="tot"/>
3439                         <pattern-item n="inf"/>
3440                         <pattern-item n="prnenc"/>
3441                 </pattern>
3442                 <action>
3443                         <call-macro n="f_enc">
3444                                 <with-param pos="4"/>
3445                         </call-macro> 
3446                         <out>
3447                                 <mlu>
3448                                         <lu>
3449                                                 <get-case-from pos="1">
3450                                                         <clip pos="3" side="tl" part="lemh"/>
3451                                                 </get-case-from>
3452                                                 <clip pos="3" side="tl" part="a_verb"/>
3453                                                 <lit-tag v="ger"/>
3454                                                 
3455                                         </lu>
3456                                         <lu>
3457                                                 <clip pos="4" side="tl" part="whole"/>
3458                                                 <clip pos="3" side="tl" part="lemq"/>
3459                                         </lu>
3460                                 </mlu>
3461                         </out>
3462                         <call-macro n="f_bcond">
3463                                 <with-param pos="1"/>
3464                         </call-macro>
3465                         <call-macro n="f_bcond">
3466                                 <with-param pos="2"/>
3467                         </call-macro>
3468                 </action>
3469    </rule>
3470         
3471         <rule> <!-- REGLA: en tot INF-enc-enc -> GER (en tot apropar-se-me -> apropant-se'm)-->
3472                 <pattern>
3473                         <pattern-item n="en"/>
3474                         <pattern-item n="tot"/>
3475                         <pattern-item n="inf"/>
3476                         <pattern-item n="prnenc"/>
3477                         <pattern-item n="prnenc"/>
3478                 </pattern>
3479                 <action>
3480                         <call-macro n="f_enc">
3481                                 <with-param pos="4"/>
3482                         </call-macro> 
3483                         <out>
3484                                 <mlu>
3485                                         <lu>
3486                                                 <get-case-from pos="1">
3487                                                         <clip pos="3" side="tl" part="lemh"/>
3488                                                 </get-case-from>
3489                                                 <clip pos="3" side="tl" part="a_verb"/>
3490                                                 <lit-tag v="ger"/>
3491                                         </lu>
3492                                         <lu>
3493                                                 <clip pos="4" side="tl" part="whole"/>
3494                                         </lu>
3495                                         <lu>
3496                                                 <clip pos="5" side="tl" part="whole"/>
3497                                                 <clip pos="3" side="tl" part="lemq"/>
3498                                         </lu>
3499                                 </mlu>
3500                         </out>
3501                         <call-macro n="f_bcond">
3502                                 <with-param pos="1"/>
3503                         </call-macro>
3504                         <call-macro n="f_bcond">
3505                                 <with-param pos="2"/>
3506                         </call-macro>
3507                         <call-macro n="f_bcond">
3508                                 <with-param pos="3"/>
3509                         </call-macro>
3510                 </action>
3511    </rule>
3512         
3513         <rule> <!-- REGLA: en tot INF -> GER (en tot dormir -> dormint)--><!-- trampeta per mentres no millora el tagger -->
3514                 <pattern>
3515                         <pattern-item n="en"/>
3516                         <pattern-item n="eth"/>
3517                         <pattern-item n="tot"/>
3518                         <pattern-item n="inf"/>
3519                 </pattern>
3520                 <action>
3521                         
3522                         <out>
3523                                 
3524                                 <lu>
3525                                         <get-case-from pos="1">
3526                                                 <clip pos="4" side="tl" part="lemh"/>
3527                                         </get-case-from>
3528                                         <clip pos="4" side="tl" part="a_verb"/>
3529                                         <lit-tag v="ger"/>
3530                                         <clip pos="4" side="tl" part="lemq"/>
3531                                 </lu>
3532                         </out>
3533                         <call-macro n="f_bcond">
3534                                 <with-param pos="1"/>
3535                         </call-macro>
3536                         <call-macro n="f_bcond">
3537                                 <with-param pos="2"/>
3538                         </call-macro>
3539                         <call-macro n="f_bcond">
3540                                 <with-param pos="3"/>
3541                         </call-macro>
3542                 </action>
3543         </rule>
3544         
3545         <rule> <!-- REGLA: en tot INF-enc -> GER (en tot dormir -> dormint)--><!-- trampeta per mentres no millora el tagger -->
3546                 <pattern>
3547                         <pattern-item n="en"/>
3548                         <pattern-item n="eth"/>
3549                         <pattern-item n="tot"/>
3550                         <pattern-item n="inf"/>
3551                         <pattern-item n="prnenc"/>
3552                 </pattern>
3553                 <action>
3554                         <call-macro n="f_enc">
3555                                 <with-param pos="5"/>
3556                         </call-macro> 
3557                         
3558                         <out>
3559                                 <mlu>
3560                                         <lu>
3561                                                 <get-case-from pos="1">
3562                                                         <clip pos="4" side="tl" part="lemh"/>
3563                                                 </get-case-from>
3564                                                 <clip pos="4" side="tl" part="a_verb"/>
3565                                                 <lit-tag v="ger"/>
3566                                                 
3567                                         </lu>
3568                                         <lu>
3569                                                 <clip pos="5" side="tl" part="whole"/>
3570                                                 <clip pos="4" side="tl" part="lemq"/>
3571                                         </lu>
3572                                 </mlu>
3573                         </out>
3574                         <call-macro n="f_bcond">
3575                                 <with-param pos="1"/>
3576                         </call-macro>
3577                         <call-macro n="f_bcond">
3578                                 <with-param pos="2"/>
3579                         </call-macro>
3580                         <call-macro n="f_bcond">
3581                                 <with-param pos="3"/>
3582                         </call-macro>
3583                 </action>
3584    </rule>
3585         <rule> <!-- REGLA: en tot INF-enc-enc -> GER (en tot apropar-se-me -> apropant-se'm)--><!-- trampeta per mentres no millora el tagger -->
3586                 <pattern>
3587                         <pattern-item n="en"/>
3588                         <pattern-item n="eth"/>
3589                         <pattern-item n="tot"/>
3590                         <pattern-item n="inf"/>
3591                         <pattern-item n="prnenc"/>
3592                         <pattern-item n="prnenc"/>
3593                 </pattern>
3594                 <action>
3595                         <call-macro n="f_enc">
3596                                 <with-param pos="4"/>
3597                         </call-macro> 
3598                         <out>
3599                                 <mlu>
3600                                         <lu>
3601                                                 <get-case-from pos="1">
3602                                                         <clip pos="4" side="tl" part="lemh"/>
3603                                                 </get-case-from>
3604                                                 <clip pos="4" side="tl" part="a_verb"/>
3605                                                 <lit-tag v="ger"/>
3606                                         </lu>
3607                                         <lu>
3608                                                 <clip pos="5" side="tl" part="whole"/>
3609                                         </lu>
3610                                         <lu>
3611                                                 <clip pos="6" side="tl" part="whole"/>
3612                                                 <clip pos="4" side="tl" part="lemq"/>
3613                                         </lu>
3614                                 </mlu>
3615                         </out>
3616                         <call-macro n="f_bcond">
3617                                 <with-param pos="1"/>
3618                         </call-macro>
3619                         <call-macro n="f_bcond">
3620                                 <with-param pos="2"/>
3621                         </call-macro>
3622                         <call-macro n="f_bcond">
3623                                 <with-param pos="3"/>
3624                         </call-macro>
3625                         <call-macro n="f_bcond">
3626                                 <with-param pos="4"/>
3627                         </call-macro>
3628                 </action>
3629    </rule>
3630         <rule> <!--REGLA: VERB (per a multiparaules sense enclítics)-->
3631                 <pattern>
3632                         <pattern-item n="verb"/>
3633                 </pattern>
3634                 <action>        
3635                         <call-macro n="f_pretind">
3636                                 <with-param pos="1"/>
3637                         </call-macro>
3638                         <call-macro n="f_lexverb">
3639                                 <with-param pos="1"/>
3640                         </call-macro>
3641                 </action>    
3642         </rule>
3644         <rule> <!--REGLA: VERB + ENCLÍTIC -->
3645                 <pattern>
3646                         <pattern-item n="verb"/>
3647                         <pattern-item n="prnenc"/>
3648                 </pattern>
3649                 <action>
3650                         <call-macro n="f_enc">
3651                                 <with-param pos="2"/>
3652                         </call-macro> 
3653                         <call-macro n="f_lexverb">
3654                                 <with-param pos="1"/>
3655                         </call-macro>
3656                         <choose>
3657                                 <when>
3658                                         <test>
3659                                                 <or>
3660                                                         <equal>
3661                                                                 <clip pos="1" side="sl" part="temps"/>
3662                                                                 <lit-tag v="inf"/>
3663                                                         </equal>
3664                                                         <equal>
3665                                                                 <clip pos="1" side="sl" part="temps"/>
3666                                                                 <lit-tag v="ger"/>
3667                                                         </equal>
3668                                                         <equal>
3669                                                                 <clip pos="1" side="sl" part="temps"/>
3670                                                                 <lit-tag v="imp"/>
3671                                                         </equal>
3672                                                 </or>
3673                                         </test>
3674                                 <out>
3675                                         <mlu>
3676                                                 <lu>
3677                                                         <clip pos="1" side="tl" part="lemh"/>
3678                                                         <clip pos="1" side="tl" part="a_verb"/>
3679                                                         <clip pos="1" side="tl" part="temps"/>
3680                                                         <clip pos="1" side="tl" part="persona"/>
3681                                                         <clip pos="1" side="tl" part="nbr"/>
3682                                                 </lu>
3683                                                 <lu>
3684                                                         <clip pos="2" side="tl" part="lem"/>
3685                                                         <clip pos="2" side="tl" part="a_prnenc"/>
3686                                                         <clip pos="2" side="tl" part="persona"/>
3687                                                         <clip pos="2" side="tl" part="gen"/>
3688                                                         <clip pos="2" side="tl" part="nbr"/>
3689                                                         <clip pos="1" side="tl" part="lemq"/>
3690                                                 </lu>  
3691                                         </mlu>
3692                            </out>
3693                         </when>
3694                                 <otherwise>
3695                                         <out>
3696                                                 <lu>   
3697                                                         <get-case-from pos="1" >
3698                                                                 <clip pos="2" side="tl" part="lem"/>
3699                                                         </get-case-from>
3700                                                         <lit-tag v="prn.pro" />
3701                                                         <clip pos="2" side="tl" part="tipoenc_pro"/>
3702                                                 </lu>
3703                                                 <b pos="1"/> 
3704                                         </out>
3705                                         <choose>
3706                                                 <when>
3707                                                         <test>
3708                                                                 <equal>
3709                                                                         <clip pos="1" side="sl" part="temps"/>
3710                                                                         <lit-tag v="ifi"/>
3711                                                                 </equal>
3712                                                         </test>
3713                                                         <out>
3714                                                                 <lu>
3715                                                                         <get-case-from pos="1">
3716                                                                                 <lit v="anar"/>
3717                                                                         </get-case-from>
3718                                                                         <lit-tag v="vaux"/>
3719                                                                         <clip pos="1" side="sl" part="persona"/>
3720                                                                         <clip pos="1" side="sl" part="nbr"/>
3721                                                                 </lu>
3722                                                                 <b/>
3723                                                                 <lu>
3724                                                                         <clip pos="1" side="tl" part="lemh"/>
3725                                                                         <clip pos="1" side="tl" part="a_verb"/>
3726                                                                         <lit-tag v="inf"/>
3727                                                                         <clip pos="1" side="tl" part="lemq"/>
3728                                                                 </lu>
3729                                                         </out>
3730                                                 </when> 
3731                                                 <otherwise>
3732                                                         <out>
3733                                                                 <lu>
3734                                                                         <clip pos="1" side="tl" part="lemh"/>
3735                                                                         <clip pos="1" side="tl" part="a_verb"/>
3736                                                                         <clip pos="1" side="tl" part="temps"/>
3737                                                                         <clip pos="1" side="tl" part="persona"/>
3738                                                                         <clip pos="1" side="tl" part="gen"/>
3739                                                                         <clip pos="1" side="tl" part="nbr"/>
3740                                                                         <clip pos="1" side="tl" part="lemq"/>    
3741                                                                 </lu>
3742                                                         </out>  
3743                                                 </otherwise>
3744                                         </choose>
3745                                 </otherwise>            
3746                         </choose>
3747                 </action>
3748         </rule>
3749         
3750         
3751         <rule> <!--REGLA: VERB + ENCLÍTIC + ENCLÍTIC-->
3752                 <pattern>
3753                         <pattern-item n="verb"/>
3754                         <pattern-item n="prnenc"/>
3755                         <pattern-item n="prnenc"/>
3756                 </pattern>
3757                 <action>
3758                         <call-macro n="f_enc">
3759                                 <with-param pos="2"/>
3760                         </call-macro> 
3761                         <call-macro n="f_enc">
3762                                 <with-param pos="3"/>
3763                         </call-macro> 
3764                         <call-macro n="f_lexverb">
3765                                 <with-param pos="1"/>
3766                         </call-macro>
3767                         <choose>
3768                                 <when>
3769                                         <test>
3770                                                 <or>
3771                                                         <equal>
3772                                                                 <clip pos="1" side="sl" part="temps"/>
3773                                                                 <lit-tag v="inf"/>
3774                                                         </equal>
3775                                                         <equal>
3776                                                                 <clip pos="1" side="sl" part="temps"/>
3777                                                                 <lit-tag v="ger"/>
3778                                                         </equal>
3779                                                         <equal>
3780                                                                 <clip pos="1" side="sl" part="temps"/>
3781                                                                 <lit-tag v="imp"/>
3782                                                         </equal>
3783                                                 </or>
3784                                         </test>
3785                                         <out>
3786                                                 <mlu>
3787                                                         <lu>
3788                                                                 <clip pos="1" side="tl" part="lemh"/>
3789                                                                 <clip pos="1" side="tl" part="a_verb"/>
3790                                                                 <clip pos="1" side="tl" part="temps"/>
3791                                                                 <clip pos="1" side="tl" part="persona"/>
3792                                                                 <clip pos="1" side="tl" part="nbr"/>
3793                                                         </lu>
3794                                                         <lu>
3795                                                                 <clip pos="2" side="tl" part="lem"/>
3796                                                                 <clip pos="2" side="tl" part="a_prnenc"/>
3797                                                                 <clip pos="2" side="tl" part="persona"/>
3798                                                                 <clip pos="2" side="tl" part="gen"/>
3799                                                                 <clip pos="2" side="tl" part="nbr"/>
3800                                                         </lu>  
3801                                                         <lu>
3802                                                                 <clip pos="3" side="tl" part="lem"/>
3803                                                                 <clip pos="3" side="tl" part="a_prnenc"/>
3804                                                                 <clip pos="3" side="tl" part="persona"/>
3805                                                                 <clip pos="3" side="tl" part="gen"/>
3806                                                                 <clip pos="3" side="tl" part="nbr"/>
3807                                                                 <clip pos="1" side="tl" part="lemq"/>
3808                                                         </lu>  
3809                                                 </mlu>
3810                                         </out>
3811                                 </when>
3812                                 <otherwise>
3813                                         <out>
3814                                                 <lu>   
3815                                                         <get-case-from pos="1">
3816                                                                 <clip pos="2" side="tl" part="lem"/>
3817                                                         </get-case-from>
3818                                                         <lit-tag v="prn.pro" />
3819                                                         <clip pos="2" side="tl" part="tipoenc_pro"/>
3820                                                 </lu>
3821                                                 <b/> 
3822                                                 <lu>   
3823                                                         <clip pos="3" side="tl" part="lem"/>
3824                                                         <lit-tag v="prn.pro" />
3825                                                         <clip pos="3" side="tl" part="tipoenc_pro"/>
3826                                                 </lu>
3827                                                 <b/> 
3828                                         </out>
3829                                         <choose>
3830                                                 <when>
3831                                                         <test>
3832                                                                 <equal>
3833                                                                         <clip pos="1" side="sl" part="temps"/>
3834                                                                         <lit-tag v="ifi"/>
3835                                                                 </equal>
3836                                                         </test>
3837                                                         <out>
3838                                                                 <lu>
3839                                                                         <get-case-from pos="1">
3840                                                                                 <lit v="anar"/>
3841                                                                         </get-case-from>
3842                                                                         <lit-tag v="vaux"/>
3843                                                                         <clip pos="1" side="sl" part="persona"/>
3844                                                                         <clip pos="1" side="sl" part="nbr"/>
3845                                                                 </lu>
3846                                                                 <b/>
3847                                                                 <lu>
3848                                                                         <clip pos="1" side="tl" part="lemh"/>
3849                                                                         <clip pos="1" side="tl" part="a_verb"/>
3850                                                                         <lit-tag v="inf"/>
3851                                                                         <clip pos="1" side="tl" part="lemq"/>
3852                                                                 </lu>
3853                                                         </out>
3854                                                 </when> 
3855                                                 <otherwise>
3856                                                         <out>
3857                                                                 <lu>
3858                                                                         <clip pos="1" side="tl" part="lemh"/>
3859                                                                         <clip pos="1" side="tl" part="a_verb"/>
3860                                                                         <clip pos="1" side="tl" part="temps"/>
3861                                                                         <clip pos="1" side="tl" part="persona"/>
3862                                                                         <clip pos="1" side="tl" part="gen"/>
3863                                                                         <clip pos="1" side="tl" part="nbr"/>
3864                                                                         <clip pos="1" side="tl" part="lemq"/>    
3865                                                                 </lu>
3866                                                         </out>  
3867                                                 </otherwise>
3868                                         </choose>
3869                                 </otherwise>            
3870                         </choose>
3871                                 <!--
3872                         
3873                         
3874                         
3875                 <action>
3876                         <out>
3877                                 <mlu>
3878                                         <lu>
3879                                                 <clip pos="1" side="tl" part="lemh"/>
3880                                                 <clip pos="1" side="tl" part="a_verb"/>
3881                                                 <clip pos="1" side="tl" part="temps"/>
3882                                                 <clip pos="1" side="tl" part="persona"/>
3883                                                 <clip pos="1" side="tl" part="nbr"/>
3884                                         </lu>
3885                                         <lu>
3886                                                 <clip pos="2" side="tl" part="lem"/>
3887                                                 <clip pos="2" side="tl" part="a_prnenc"/>
3888                                                 <clip pos="2" side="tl" part="persona"/>
3889                                                 <clip pos="2" side="tl" part="gen"/>
3890                                                 <clip pos="2" side="tl" part="nbr"/>
3891                                         </lu>
3892                                         <lu>
3893                                                 <clip pos="3" side="tl" part="lem"/>
3894                                                 <clip pos="3" side="tl" part="a_prnenc"/>
3895                                                 <clip pos="3" side="tl" part="persona"/>
3896                                                 <clip pos="3" side="tl" part="gen"/>
3897                                                 <clip pos="3" side="tl" part="nbr"/>
3898                                                 <clip pos="1" side="tl" part="lemq"/>
3899                                         </lu>    
3900                                 </mlu>
3901                         </out>-->
3902                 </action>
3903         </rule>
3905 <rule> <!--REGLA 35: PROCLÍTIC + VERB-->
3906         <pattern>
3907                 <pattern-item n="prnpro"/>
3908                 <pattern-item n="verb"/>
3909         </pattern>
3910         <action>
3911                 <call-macro n="f_lexverb">
3912                         <with-param pos="2"/>
3913                 </call-macro>
3914                 <choose>
3915                         <when>
3916                                 <test>
3917                                         <or>
3918                                                 <equal>
3919                                                         <clip pos="2" side="sl" part="temps"/>
3920                                                         <lit-tag v="inf"/>
3921                                                 </equal>
3922                                                 <equal>
3923                                                         <clip pos="2" side="sl" part="temps"/>
3924                                                         <lit-tag v="ger"/>
3925                                                 </equal>
3926                                                 <equal>
3927                                                         <clip pos="2" side="sl" part="temps"/>
3928                                                         <lit-tag v="imp"/>
3929                                                 </equal>
3930                                         </or>
3931                                 </test>
3932                                 <out>
3933                                         <mlu>
3934                                                 <lu>
3935                                                         <get-case-from pos="1" >
3936                                                                 <clip pos="2" side="tl" part="lemh"/>
3937                                                         </get-case-from>
3938                                                         <clip pos="2" side="tl" part="a_verb"/>
3939                                                         <clip pos="2" side="tl" part="temps"/>
3940                                                         <clip pos="2" side="tl" part="persona"/>
3941                                                         <clip pos="2" side="tl" part="nbr"/>
3942                                                 </lu>
3943                                                 <lu>
3944                                                         <get-case-from pos="2" >
3945                                                                 <clip pos="1" side="tl" part="lem"/>
3946                                                         </get-case-from>
3947                                                         <lit-tag v="prn.enc" />
3948                                                         <clip pos="1" side="tl" part="tipoenc_pro"/>
3949                                                         <clip pos="2" side="tl" part="lemq"/>
3950                                                 </lu>  
3951                                         </mlu>
3952                                 </out>
3953                         </when>
3954                         <otherwise>
3955                                 <out>
3956                                         <lu>   
3957                                                 <clip pos="1" side="tl" part="whole"/>
3958                                         </lu>
3959                                         <b pos="1"/> 
3960                                 </out>
3961                                 <choose>
3962                                         <when>
3963                                                 <test>
3964                                                         <equal>
3965                                                                 <clip pos="2" side="sl" part="temps"/>
3966                                                                 <lit-tag v="ifi"/>
3967                                                         </equal>
3968                                                 </test>
3969                                                 <out>
3970                                                         <lu>
3971                                                                 <get-case-from pos="2">
3972                                                                         <lit v="anar"/>
3973                                                                 </get-case-from>
3974                                                                 <lit-tag v="vaux"/>
3975                                                                 <clip pos="2" side="sl" part="persona"/>
3976                                                                 <clip pos="2" side="sl" part="nbr"/>
3977                                                         </lu>
3978                                                         <b/>
3979                                                         <lu>
3980                                                                 <clip pos="2" side="tl" part="lemh"/>
3981                                                                 <clip pos="2" side="tl" part="a_verb"/>
3982                                                                 <lit-tag v="inf"/>
3983                                                                 <clip pos="2" side="tl" part="lemq"/>
3984                                                         </lu>
3985                                                 </out>
3986                                         </when> 
3987                                         <otherwise>
3988                                                 <out>
3989                                                         <lu>
3990                                                                 <clip pos="2" side="tl" part="lemh"/>
3991                                                                 <clip pos="2" side="tl" part="a_verb"/>
3992                                                                 <clip pos="2" side="tl" part="temps"/>
3993                                                                 <clip pos="2" side="tl" part="persona"/>
3994                                                                 <clip pos="2" side="tl" part="gen"/>
3995                                                                 <clip pos="2" side="tl" part="nbr"/>
3996                                                                 <clip pos="2" side="tl" part="lemq"/>    
3997                                                         </lu>
3998                                                 </out>  
3999                                         </otherwise>
4000                                 </choose>
4001                         </otherwise>            
4002                 </choose>
4003         </action>
4004 </rule>
4007 <rule> <!--REGLA : prnpro prnrpo VERB-->
4008         <pattern>
4009                 <pattern-item n="prnpro"/>
4010                 <pattern-item n="prnpro"/>
4011                 <pattern-item n="verb"/>
4012         </pattern>
4013         <action>
4014                 <call-macro n="f_lexverb">
4015                         <with-param pos="3"/>
4016                 </call-macro>
4017                 <choose>
4018                         <when>
4019                                 <test>
4020                                         <or>
4021                                                 <equal>
4022                                                         <clip pos="3" side="sl" part="temps"/>
4023                                                         <lit-tag v="inf"/>
4024                                                 </equal>
4025                                                 <equal>
4026                                                         <clip pos="3" side="sl" part="temps"/>
4027                                                         <lit-tag v="ger"/>
4028                                                 </equal>
4029                                                 <equal>
4030                                                         <clip pos="3" side="sl" part="temps"/>
4031                                                         <lit-tag v="imp"/>
4032                                                 </equal>
4033                                         </or>
4034                                 </test>
4035                                 <out>
4036                                         <mlu>
4037                                                 <lu>
4038                                                         <get-case-from pos="1" >
4039                                                                 <clip pos="3" side="tl" part="lemh"/>
4040                                                         </get-case-from>
4041                                                         <clip pos="3" side="tl" part="a_verb"/>
4042                                                         <clip pos="3" side="tl" part="temps"/>
4043                                                         <clip pos="3" side="tl" part="persona"/>
4044                                                         <clip pos="3" side="tl" part="nbr"/>
4045                                                 </lu>
4046                                                 <lu>
4047                                                         <get-case-from pos="2" >
4048                                                                 <clip pos="1" side="tl" part="lem"/>
4049                                                         </get-case-from>
4050                                                         <lit-tag v="prn.enc" />
4051                                                         <clip pos="1" side="tl" part="tipoenc_pro"/>
4052                                                 </lu>  
4053                                                 <lu>
4054                                                         <get-case-from pos="3" >
4055                                                                 <clip pos="2" side="tl" part="lem"/>
4056                                                         </get-case-from>
4057                                                         <lit-tag v="prn.enc" />
4058                                                         <clip pos="2" side="tl" part="tipoenc_pro"/>
4059                                                         <clip pos="3" side="tl" part="lemq"/>
4060                                                 </lu>  
4061                                         </mlu>
4062                                 </out>
4063                         </when>
4064                         <otherwise>
4065                                 <out>
4066                                         <lu>   
4067                                                 <clip pos="1" side="tl" part="whole"/>
4068                                         </lu>
4069                                         <b pos="1"/> 
4070                                         <lu>   
4071                                                 <clip pos="2" side="tl" part="whole"/>
4072                                         </lu>
4073                                         <b pos="2"/> 
4074                                 </out>
4075                                 <choose>
4076                                         <when>
4077                                                 <test>
4078                                                         <equal>
4079                                                                 <clip pos="3" side="sl" part="temps"/>
4080                                                                 <lit-tag v="ifi"/>
4081                                                         </equal>
4082                                                 </test>
4083                                                 <out>
4084                                                         <lu>
4085                                                                 <get-case-from pos="3">
4086                                                                         <lit v="anar"/>
4087                                                                 </get-case-from>
4088                                                                 <lit-tag v="vaux"/>
4089                                                                 <clip pos="3" side="sl" part="persona"/>
4090                                                                 <clip pos="3" side="sl" part="nbr"/>
4091                                                         </lu>
4092                                                         <b/>
4093                                                         <lu>
4094                                                                 <clip pos="3" side="tl" part="lemh"/>
4095                                                                 <clip pos="3" side="tl" part="a_verb"/>
4096                                                                 <lit-tag v="inf"/>
4097                                                                 <clip pos="3" side="tl" part="lemq"/>
4098                                                         </lu>
4099                                                 </out>
4100                                         </when> 
4101                                         <otherwise>
4102                                                 <out>
4103                                                         <lu>
4104                                                                 <clip pos="3" side="tl" part="lemh"/>
4105                                                                 <clip pos="3" side="tl" part="a_verb"/>
4106                                                                 <clip pos="3" side="tl" part="temps"/>
4107                                                                 <clip pos="3" side="tl" part="persona"/>
4108                                                                 <clip pos="3" side="tl" part="gen"/>
4109                                                                 <clip pos="3" side="tl" part="nbr"/>
4110                                                                 <clip pos="3" side="tl" part="lemq"/>    
4111                                                         </lu>
4112                                                 </out>  
4113                                         </otherwise>
4114                                 </choose>
4115                         </otherwise>            
4116                 </choose>
4117         </action>
4118         </rule>
4119         
4120         <rule> <!--REGLA 35: pro vbmod inf-> vbmod inf-enc: la calec trapar -> va caldre trobar-la-->
4121                 <pattern>
4122                         <pattern-item n="prnpro"/>
4123                         <pattern-item n="vbmod"/>
4124                         <pattern-item n="inf"/>
4125                 </pattern>
4126                 <action>
4127                         <call-macro n="f_lexverb">
4128                                 <with-param pos="3"/>
4129                         </call-macro>
4130                         <choose>
4131                                 <when>
4132                                         <test>
4133                                                 <equal>
4134                                                         <clip pos="2" side="sl" part="temps"/>
4135                                                         <lit-tag v="ifi"/>
4136                                                 </equal>
4137                                         </test>
4138                                         <out>
4139                                                 <lu>
4140                                                         <get-case-from pos="1">
4141                                                                 <lit v="anar"/>
4142                                                         </get-case-from>
4143                                                         <lit-tag v="vaux"/>
4144                                                         <clip pos="2" side="sl" part="persona"/>
4145                                                         <clip pos="2" side="sl" part="nbr"/>
4146                                                 </lu>
4147                                                 <b/>
4148                                                 <lu>
4149                                                         <get-case-from pos="2">
4150                                                                 <clip pos="2" side="tl" part="lemh"/>
4151                                                         </get-case-from>
4152                                                         <clip pos="2" side="tl" part="a_verb"/>
4153                                                         <lit-tag v="inf"/>
4154                                                         <clip pos="2" side="tl" part="lemq"/>
4155                                                 </lu>
4156                                         </out>
4157                                 </when> 
4158                                 <otherwise>
4159                                         <out>
4160                                                 <lu>
4161                                                         <get-case-from pos="1">
4162                                                                 <clip pos="2" side="tl" part="lemh"/>
4163                                                         </get-case-from>
4164                                                         <clip pos="2" side="tl" part="a_verb"/>
4165                                                         <clip pos="2" side="tl" part="temps"/>
4166                                                         <clip pos="2" side="tl" part="persona"/>
4167                                                         <clip pos="2" side="tl" part="gen"/>
4168                                                         <clip pos="2" side="tl" part="nbr"/>
4169                                                         <clip pos="2" side="tl" part="lemq"/>    
4170                                                 </lu>
4171                                         </out>  
4172                                 </otherwise>
4173                         </choose>
4174                         <out>
4175                         <b pos="1"/> 
4176                                 <mlu>
4177                                         <lu>
4178                                                 <get-case-from pos="2" >
4179                                                         <clip pos="3" side="tl" part="lemh"/>
4180                                                 </get-case-from>
4181                                                 <clip pos="3" side="tl" part="a_verb"/>
4182                                                 <clip pos="3" side="tl" part="temps"/>
4183                                                 <clip pos="3" side="tl" part="persona"/>
4184                                                 <clip pos="3" side="tl" part="nbr"/>
4185                                         </lu>
4186                                         <lu>
4187                                                 <get-case-from pos="2" >
4188                                                         <clip pos="1" side="tl" part="lem"/>
4189                                                 </get-case-from>
4190                                                 <lit-tag v="prn.enc" />
4191                                                 <clip pos="1" side="tl" part="tipoenc_pro"/>
4192                                                 <clip pos="3" side="tl" part="lemq"/>
4193                                         </lu>  
4194                                 </mlu>
4195                         </out>
4196                         <call-macro n="f_bcond">
4197                                 <with-param pos="2"/>
4198                         </call-macro>
4199                 </action>
4200         </rule>
4201         
4202         <rule> <!--REGLA 35: pro pro vbmod inf-> vbmod inf-enc-enc: mos la calec trapar -> va caldre trobar-nos-la-->
4203                 <pattern>
4204                         <pattern-item n="prnpro"/>
4205                         <pattern-item n="prnpro"/>
4206                         <pattern-item n="vbmod"/>
4207                         <pattern-item n="inf"/>
4208                 </pattern>
4209                 <action>
4210                         <call-macro n="f_lexverb">
4211                                 <with-param pos="4"/>
4212                         </call-macro>
4213                         <choose>
4214                                 <when>
4215                                         <test>
4216                                                 <equal>
4217                                                         <clip pos="3" side="sl" part="temps"/>
4218                                                         <lit-tag v="ifi"/>
4219                                                 </equal>
4220                                         </test>
4221                                         <out>
4222                                                 <lu>
4223                                                         <get-case-from pos="1">
4224                                                                 <lit v="anar"/>
4225                                                         </get-case-from>
4226                                                         <lit-tag v="vaux"/>
4227                                                         <clip pos="3" side="sl" part="persona"/>
4228                                                         <clip pos="3" side="sl" part="nbr"/>
4229                                                 </lu>
4230                                                 <b/>
4231                                                 <lu>
4232                                                         <clip pos="3" side="tl" part="lemh"/>
4233                                                         <clip pos="3" side="tl" part="a_verb"/>
4234                                                         <lit-tag v="inf"/>
4235                                                         <clip pos="3" side="tl" part="lemq"/>
4236                                                 </lu>
4237                                         </out>
4238                                 </when> 
4239                                 <otherwise>
4240                                         <out>
4241                                                 <lu>
4242                                                         <get-case-from pos="1">
4243                                                                 <clip pos="3" side="tl" part="lemh"/>
4244                                                         </get-case-from>
4245                                                         <clip pos="3" side="tl" part="a_verb"/>
4246                                                         <clip pos="3" side="tl" part="temps"/>
4247                                                         <clip pos="3" side="tl" part="persona"/>
4248                                                         <clip pos="3" side="tl" part="gen"/>
4249                                                         <clip pos="3" side="tl" part="nbr"/>
4250                                                         <clip pos="3" side="tl" part="lemq"/>    
4251                                                 </lu>
4252                                         </out>  
4253                                 </otherwise>
4254                         </choose>
4255                         <out>
4256                         <b pos="1"/> 
4257                                 <mlu>
4258                                         <lu>
4259                                                 <get-case-from pos="2" >
4260                                                         <clip pos="4" side="tl" part="lemh"/>
4261                                                 </get-case-from>
4262                                                 <clip pos="4" side="tl" part="a_verb"/>
4263                                                 <clip pos="4" side="tl" part="temps"/>
4264                                                 <clip pos="4" side="tl" part="persona"/>
4265                                                 <clip pos="4" side="tl" part="nbr"/>
4266                                         </lu>
4267                                         <lu>
4268                                                 <get-case-from pos="2" >
4269                                                         <clip pos="1" side="tl" part="lem"/>
4270                                                 </get-case-from>
4271                                                 <lit-tag v="prn.enc" />
4272                                                 <clip pos="1" side="tl" part="tipoenc_pro"/>
4273                                         </lu>  
4274                                         <lu>
4275                                                 <clip pos="2" side="tl" part="lem"/>
4276                                                 <lit-tag v="prn.enc" />
4277                                                 <clip pos="2" side="tl" part="tipoenc_pro"/>
4278                                                 <clip pos="4" side="tl" part="lemq"/>
4279                                         </lu>  
4280                                 </mlu>
4281                         </out>
4282                         <call-macro n="f_bcond">
4283                                 <with-param pos="2"/>
4284                         </call-macro>
4285                         <call-macro n="f_bcond">
4286                                 <with-param pos="3"/>
4287                         </call-macro>
4288                 </action>
4289         </rule>
4291         
4292         <rule> <!--REGLA: prep "en" + nploc = a + nploc: en Barcelona -> a Barcelona -->
4293                 <pattern>
4294                         <pattern-item n="prep"/>
4295                         <pattern-item n="nploc"/>
4296                 </pattern>
4297                 <action>
4298                         <call-macro n="f_lexprep">
4299                                 <with-param pos="1"/>
4300                         </call-macro> 
4301                         <out>
4302                                 <lu>
4303                                         <clip pos="1" side="tl" part="lem"/>
4304                                         <clip pos="1" side="tl" part="a_prep"/>
4305                                 </lu>
4306                                 <b pos="1"/>
4307                                 <lu>
4308                                         <clip pos="2" side="tl" part="lem"/>
4309                                         <clip pos="2" side="tl" part="a_nploc"/>
4310                                 </lu>  
4311                         </out>
4312                 </action>
4313         </rule>
4314         
4315         <rule> <!--REGLA: a + nploc = en ciutat -> a ciutat-->
4316                 <pattern>
4317                         <pattern-item n="prep"/>
4318                         <pattern-item n="nloc"/>
4319                 </pattern>
4320                 <action>         
4321                         <call-macro n="f_lexprep">
4322                                 <with-param pos="1"/>
4323                         </call-macro> 
4324                         <out>
4325                                 <lu>
4326                                         <clip pos="1" side="tl" part="lem"/>
4327                                         <clip pos="1" side="tl" part="a_prep"/>
4328                                 </lu> 
4329                                 <b pos="1"/>
4330                                 <lu>
4331                                         <clip pos="2" side="tl" part="whole"/>
4332                                 </lu>
4333                         </out>   
4334                 </action>
4335         </rule> 
4336         
4337         <rule> <!--REGLA: en + det + nploc = ena ciutat -> a la ciutat-->
4338                 <pattern>
4339                         <pattern-item n="prep"/>
4340                         <pattern-item n="det"/>
4341                         <pattern-item n="nloc"/>
4342                 </pattern>
4343                 <action>          
4344                         <call-macro n="f_lexprep">
4345                                 <with-param pos="1"/>
4346                         </call-macro> 
4347                         <call-macro n="f_concord2">
4348                                 <with-param pos="3"/>
4349                                 <with-param pos="2"/>
4350                         </call-macro> 
4351                         <out>
4352                                 <lu>
4353                                         <clip pos="1" side="tl" part="lem"/>
4354                                         <clip pos="1" side="tl" part="a_prep"/>
4355                                 </lu>
4356                                 <b pos="1"/>
4357                                 <lu>
4358                                         <clip pos="2" side="tl" part="whole"/>
4359                                 </lu>
4360                                 <b pos="2"/>
4361                                 <lu>
4362                                         <clip pos="3" side="tl" part="whole"/>
4363                                 </lu>
4364                         </out>   
4365                 </action>
4366         </rule> 
4367         
4368         
4369         <rule> <!--REGLA: en + nploc = ena bonica ciutat -> a la adj ciutat-->
4370                 <pattern>
4371                         <pattern-item n="prep"/>
4372                         <pattern-item n="det"/>
4373                         <pattern-item n="adj"/>
4374                         <pattern-item n="nloc"/>
4375                 </pattern>
4376                 <action>          
4377                         <call-macro n="f_lexprep">
4378                                 <with-param pos="1"/>
4379                         </call-macro> 
4380                         <call-macro n="f_concord2">
4381                                 <with-param pos="4"/>
4382                                 <with-param pos="3"/>
4383                                 <with-param pos="2"/>
4384                         </call-macro> 
4385                         <out>
4386                                 <lu>
4387                                         <clip pos="1" side="tl" part="lem"/>
4388                                         <clip pos="1" side="tl" part="a_prep"/>
4389                                 </lu>
4390                                 <b pos="1"/>
4391                                 <lu>
4392                                         <clip pos="2" side="tl" part="whole"/>
4393                                 </lu>
4394                                 <b pos="2"/>
4395                                 <lu>
4396                                         <clip pos="3" side="tl" part="whole"/>
4397                                 </lu>
4398                                 <b pos="3"/>
4399                                 <lu>
4400                                         <clip pos="4" side="tl" part="whole"/>
4401                                 </lu>
4402                         </out>   
4403                 </action>
4404         </rule> 
4405         
4406         <rule> <!--REGLA: en + nploc = ena bonica ciutat -> a la adj ciutat-->
4407                 <pattern>
4408                         <pattern-item n="prep"/>
4409                         <pattern-item n="det"/>
4410                         <pattern-item n="nloc"/>
4411                         <pattern-item n="adj"/>
4412                 </pattern>
4413                 <action>          
4414                         <call-macro n="f_lexprep">
4415                                 <with-param pos="1"/>
4416                         </call-macro> 
4417                         <call-macro n="f_concord2">
4418                                 <with-param pos="3"/>
4419                                 <with-param pos="4"/>
4420                                 <with-param pos="2"/>
4421                         </call-macro> 
4422                         <out>
4423                                 <lu>
4424                                         <clip pos="1" side="tl" part="lem"/>
4425                                         <clip pos="1" side="tl" part="a_prep"/>
4426                                 </lu>
4427                                 <b pos="1"/>
4428                                 <lu>
4429                                         <clip pos="2" side="tl" part="whole"/>
4430                                 </lu>
4431                                 <b pos="2"/>
4432                                 <lu>
4433                                         <clip pos="3" side="tl" part="whole"/>
4434                                 </lu>
4435                                 <b pos="3"/>
4436                                 <lu>
4437                                         <clip pos="4" side="tl" part="whole"/>
4438                                 </lu>
4439                         </out>   
4440                 </action>
4441         </rule> 
4442         
4443         <rule> <!--REGLA: prep "en" + mes = a + det + mes: en agost -> a l'agost -->
4444                 <pattern>
4445                         <pattern-item n="en"/>
4446                         <pattern-item n="mes"/>
4447                 </pattern>
4448                 <action>
4449                         <out>
4450                                 <lu>
4451                                         <get-case-from pos="1">            
4452                                                 <lit v="a"/>
4453                                         </get-case-from>
4454                                         <lit-tag v="pr"/>
4455                                 </lu>
4456                                 <b pos="1"/>
4457                                 <lu>
4458                                         <get-case-from pos="2">            
4459                                                 <lit v="el"/>
4460                                         </get-case-from>
4461                                         <lit-tag v="det.def.m.sg"/>
4462                                 </lu>
4463                                 <b/>
4464                                 <lu>
4465                                         <clip pos="2" side="tl" part="whole"/>
4466                                 </lu>  
4467                         </out>
4468                 </action>
4469         </rule>
4470         
4471         <rule> <!--REGLA: prep "en" + mes = a + det + mes: en agost -> a l'agost -->
4472                 <pattern>
4473                         <pattern-item n="en"/>
4474                         <pattern-item n="det"/>
4475                         <pattern-item n="mes"/>
4476                 </pattern>
4477                 <action>
4478                         <out>
4479                                 <lu>
4480                                         <get-case-from pos="1">            
4481                                                 <lit v="a"/>
4482                                         </get-case-from>
4483                                         <lit-tag v="pr"/>
4484                                 </lu>
4485                                 <b pos="1"/>
4486                                 <lu>
4487                                         <clip pos="2" side="tl" part="whole"/>
4488                                 </lu>
4489                                 <b pos="2"/>
4490                                 <lu>
4491                                         <clip pos="3" side="tl" part="whole"/>
4492                                 </lu>  
4493                         </out>
4494                 </action>
4495         </rule>
4496         <rule> <!--REGLA: per + det + partdia = peth maitin -> al matí-->
4497                 <pattern>
4498                         <pattern-item n="per"/>
4499                         <pattern-item n="det"/>
4500                         <pattern-item n="partdia"/>
4501                 </pattern>
4502                 <action>          
4503                         <call-macro n="f_concord2">
4504                                 <with-param pos="3"/>
4505                                 <with-param pos="2"/>
4506                         </call-macro> 
4507                         
4508                         <out>
4509                                 <lu>
4510                                         <get-case-from pos="1">
4511                                                 <lit v="a"/>
4512                                         </get-case-from>
4513                                         <clip pos="1" side="tl" part="a_prep"/>
4514                                 </lu> 
4515                                 <b pos="1"/>
4516                                 <lu>
4517                                         <clip pos="2" side="tl" part="whole"/>
4518                                 </lu>
4519                                 <b pos="2"/>
4520                                 <lu>
4521                                         <clip pos="3" side="tl" part="whole"/>
4522                                 </lu>
4523                         </out>   
4524                 </action>
4525         </rule> 
4526         <rule> <!-- REGLA: reset variables-->
4527                 <pattern>
4528                         <pattern-item n="sent"/>
4529                 </pattern>
4530                 <action>
4531                         <let>
4532                                 <var n="numero"/>
4533                                 <lit-tag v="sg"/>
4534                         </let>
4535                         <let>
4536                                 <var n="genero"/>
4537                                 <lit-tag v="m"/>
4538                         </let>
4539                         <let>
4540                                 <var n="genenc"/>
4541                                 <lit v="ind"/>
4542                         </let>
4543                         <let>
4544                                 <var n="tipusverb"/>
4545                                 <lit v="no"/>
4546                         </let>
4547                         <out>
4548                                 <lu>
4549                                         <clip pos="1" side="tl" part="whole"/>
4550                                 </lu>
4551                         </out>
4552                 </action>
4553     </rule>
4554     
4556 </section-rules>
4558 </transfer>