<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- -*- nxml -*- -->
<interchunk>
  <section-def-cats>

    <def-cat n="SN">
      <cat-item tags="SN.*"/>
    </def-cat>  
    <def-cat n="prnpers">
      <cat-item lemma="prnpers" tags="PRN.*"/>
    </def-cat> 
    <def-cat n="prnsubj">
      <cat-item lemma="prnsubj" tags="prn.subj.*"/>
    </def-cat> 


    <def-cat n="SNcomp">
      <cat-item tags="SN.*.comp"/>
    </def-cat>
 
    <def-cat n="SN_prn">
      <cat-item tags="SN.*"/>
      <cat-item lemma="prnpers" tags="PRN.*"/>
    </def-cat>
    <def-cat n="SPR"><!--sintagma preposicional -->
      <cat-item tags="SPR.*"/>
      <cat-item tags="SPGEN.*"/>
    </def-cat>  
 
    <def-cat n="SPRnogencomp">
      <cat-item tags="SPR.*.comp"/>
    </def-cat> 
    <def-cat n="SPGEN">
      <cat-item tags="SPGEN.*"/>
    </def-cat> 
   
    <def-cat n="PREP"><!--preposición (sin el SN que formaria un sintagma prep) -->
      <cat-item tags="PREP.*"/>
      <cat-item tags="PREPGEN.*"/>
    </def-cat>  

    <def-cat n="PREPGEN">
      <cat-item tags="PREPGEN.*"/>
    </def-cat>  

    <def-cat n="SA">
      <cat-item tags="SA.*"/>
      <cat-item tags="SADV.adj.*"/>
    </def-cat> 
    <def-cat n="SAcomp">
      <cat-item tags="SA.*.comp"/>
      <cat-item tags="SADV.adj.*.comp"/>
    </def-cat> 

  <def-cat n="SADV">
      <cat-item tags="SADV.adv"/>
      <cat-item tags="SADV.pr"/>
    </def-cat> 

  <def-cat n="SADVcomp">
      <cat-item tags="SADV.adv.comp"/>
      <cat-item tags="SADV.pr.comp"/>
    </def-cat> 

<def-cat n="SVconj">
      <cat-item lemma="vbconj" tags="SV.*"/>
      <cat-item lemma="vbconj_ukan" tags="SV.*"/>
      <cat-item lemma="vbconj_izan" tags="SV.*"/>
      <cat-item lemma="subjunt" tags="SV.*"/>
      <cat-item lemma="vbconj_inf" tags="SV.*"/>
      <cat-item lemma="estar_ger" tags="SV.*"/>
      <cat-item lemma="lakoan_egon" tags="SV.*"/>
    </def-cat> 

<def-cat n="ukan_izan">
      <cat-item lemma="vbconj_ukan" tags="SV.vblex.pri.*"/>
      <cat-item lemma="vbconj_izan" tags="SV.vbser.pri.*"/>
    </def-cat> 
 

<def-cat n="izan">
      <cat-item lemma="vbconj_izan" tags="SV.vbser.pri.*"/>
    </def-cat> 
 <def-cat n="tzeko">
      <cat-item lemma="tzeko" tags="SVsub.*"/>
      <cat-item lemma="ez_tzeko" tags="SVsub.*"/>
    </def-cat>  

 <def-cat n="SVsub">
      <cat-item tags="SVsub.*"/>
    </def-cat>  

<def-cat n="SPVERB">
      <cat-item lemma="pr_inf" tags="SV.*"/>
    </def-cat>  

 <def-cat n="pp">
      <cat-item lemma="pp" tags="SV.*"/>
    </def-cat>  

 <def-cat n="formasnopersonales">
      <cat-item lemma="pfut" tags="SV.*"/>
      <cat-item lemma="ger" tags="SV.*"/>
      <cat-item lemma="pp" tags="SV.*"/>
    </def-cat> 

    <def-cat n="querel">
      <cat-item tags="rel"/>
    </def-cat>  


<def-cat n="cnjadv1">
      <cat-item lemma="cnjadv1" tags="cnjadv"/>
    </def-cat>  

<def-cat n="cnjadv2">
      <cat-item lemma="ezean" tags="cnjadv"/>
      <cat-item lemma="ezik" tags="cnjadv"/>
      <cat-item lemma="ondoren" tags="cnjadv"/>
      <cat-item lemma="eta gero" tags="cnjadv"/>
      <cat-item lemma="baino lehen" tags="cnjadv"/>
      <cat-item lemma="arren" tags="cnjadv"/>
      <cat-item lemma="advgen" tags="SADV.*"/>
    </def-cat>  

<def-cat n="si">
      <cat-item lemma="si" tags="cnjadv"/>
    </def-cat> 

<def-cat n="baino">
      <cat-item lemma="baino" tags="cnjcoo"/>
    </def-cat>  
<def-cat n="que">
      <cat-item lemma="que" tags="cnjsub"/>
    </def-cat> 

<def-cat n="ez">
      <cat-item lemma="ez" tags="SADV.adv"/>
    </def-cat> 
 
<def-cat n="elkar">
      <cat-item lemma="elkar" tags="SADV.rec"/>
  <!--    <cat-item lemma="pr_elkar" tags="SADV"/>-->
    </def-cat> 
<def-cat n="elkar_post">
      <cat-item tags="SPR.rec"/>
    </def-cat> 

 
<def-cat n="procl">
      <cat-item lemma="procl" tags="prn.pro.*"/>
    </def-cat> 

<def-cat n="PADV">
      <cat-item lemma="det_nom_pp" tags="SN.*"/>
      <cat-item lemma="pr_det_nom_pp" tags="SPR.*"/>
</def-cat>


    <def-cat n="punt">
      <cat-item tags="sent"/>
    </def-cat>


  </section-def-cats>

  <section-def-attrs>

    <def-attr n="pers">
      <attr-item tags="p1"/>
      <attr-item tags="p2"/>
      <attr-item tags="p3"/>
      <attr-item tags="PD"/>
    </def-attr>

    <def-attr n="gen">
      <attr-item tags="m"/>
      <attr-item tags="f"/>
      <attr-item tags="mf"/>
      <attr-item tags="GD"/>
      <attr-item tags="nt"/>
    </def-attr>

    <def-attr n="nbr">
      <attr-item tags="sg"/>
      <attr-item tags="pl"/>
      <attr-item tags="sp"/>
      <attr-item tags="ND"/>
    </def-attr>

    <def-attr n="temps">
      <attr-item tags="inf"/>
      <attr-item tags="pres"/>
      <attr-item tags="past"/>
      <attr-item tags="pri"/>
      <attr-item tags="ifip"/>
      <attr-item tags="cni"/>
      <attr-item tags="fti"/>
      <attr-item tags="pp"/>
      <attr-item tags="ger"/>
      <attr-item tags="pprs"/>
      <attr-item tags="subs"/>
      <attr-item tags="pfut"/>
      
    </def-attr>

    <def-attr n="tipus_det">          
      <attr-item tags="art"/>         
      <attr-item tags="def"/>         
      <attr-item tags="ind"/>         
      <attr-item tags="num"/>
    </def-attr> 

   <def-attr n="a_adv">          
      <attr-item tags="adv"/>         
      <attr-item tags="pr"/> 
    </def-attr> 

 <def-attr n="a_SP">          
      <attr-item tags="SPGEN"/>         
      <attr-item tags="SPR"/>        
      <attr-item tags="SPR-SN"/>     
      <attr-item tags="SV"/> 
      <attr-item tags="SVneg"/> 
    </def-attr> 


 <def-attr n="valor_NK">  
   <attr-item tags="NK_HK"/>
   <attr-item tags="NK_HU"/>
   <attr-item tags="NK_NI"/>
   <attr-item tags="NK_ZK"/>
   <attr-item tags="NK_GU"/>
   <attr-item tags="NK_ZU"/>
   <attr-item tags="NK_HI"/>
 </def-attr>


  </section-def-attrs>

  <section-def-vars> 
    <def-var n="EOS"/>
    <def-var n="genere"/>
    <def-var n="nombre"/>
    <def-var n="fifrase" v="yes"/>
  </section-def-vars>
  
  <section-def-lists>
    <def-list n="SV_personals"> 
      <list-item v="vbconj"/>
      <list-item v="have_pp"/>
    </def-list>

  </section-def-lists>

  <section-def-macros>

    <def-macro n="nombre_SN" npar="1">
      <choose><!--To determine value of variables of gender and
		  number and propagate to other rules.  Variables are
		  not used again in this rule -->
	<when> 
	  <test>
	    <equal>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </equal>
	  </test>
	  <let><var n="nombre"/><lit-tag v="sg"/></let>
	</when>
	<when>
	  <test>
	    <equal>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="pl"/>
	    </equal>
	  </test>
	  <let><var n="nombre"/><lit-tag v="pl"/></let>
	</when>
	<otherwise>
	  <let><var n="nombre"/><lit-tag v="sg"/></let>
	</otherwise>
      </choose> 
    </def-macro>

    <def-macro n="f_bcond" npar="2"><!--Per mirar si el blanc conté o no format. Cal posar aquesta funció en les regles en què desaparegui alguna paraula, per tal de decidir si el blanc de la paraula eliminada s'ha d'eliminar o conservar. Si conté format cal conservar-la, si no en conté cal eliminar-la perquè no apareguin dos espais seguits. -->
      <choose>
	<when>
	  <test>
	    <not>
	      <equal>
		<b pos="1"/>
		<lit v=" "/>
	      </equal>
	    </not>
	  </test>
	  <out>
	    <b pos="1"/>
	  </out>
	</when>     	    
      </choose>
    </def-macro>

  </section-def-macros>

  <section-rules>

    <rule comment="REGLA: SN (si es GD y no se tiene más información, se asignará masculino">
      <pattern>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>

    
    <rule comment="REGLA: SA (si va solo y no se le puede asignar género a los GD, se asignará masculino, y singular para ND)">
      <pattern>
	<pattern-item n="SA"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>

 <rule comment="REGLA: SPR">
      <pattern>
	<pattern-item n="SPR"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>




 <rule comment="REGLA: SPGEN + SN">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>	
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>

 <rule comment="REGLA: SPGEN + SPR (arratsaldeko azken orduan)">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SPR"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>


	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	    <clip pos="2" part="tags"/>
	    <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>
  
 <rule comment="REGLA: SPGEN + SADV (etxearen aurrean - delante de la casa)">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SADV"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
<!--	<choose>
	   <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>
	    <let>	      
		<clip pos="1" part="a_SP"/>
		<lit-tag v="SPR-SN"/>
	    </let>
	   </when>
	</choose> -->
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


 <rule comment="REGLA: SPGEN + SPR (nire etxean egindako lehergailu bat)">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="PADV"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
<!--	    <choose>
	      <when>
		<test>
		  <equal>
		    <clip pos="1" part="temps"/>
		    <lit-tag v="pp"/>
		  </equal>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise> -->
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	<!--    <choose>
	      <when>
		<test>
		  <equal>
		    <clip pos="1" part="temps"/>
		    <lit-tag v="pp"/>
		  </equal>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise> -->
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	  </when>
	</choose>

	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>
  

 <rule comment="REGLA: SPR + PR (lanetik kanpo; iturri ofizialen arabera)">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="PREP"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>		
	    <let>	      
	      <clip pos="1" part="a_SP"/>
	      <lit-tag v="SPR-SN"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>




 <rule comment="REGLA: SPGEN + SPR + PR (EAren presidentearen ustez)">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SPR"/>
	<pattern-item n="PREP"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>

	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>
	    <let>	      
	      <clip pos="2" part="a_SP"/>
	      <lit-tag v="SPR-SN"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


 <rule comment="REGLA: SPGEN + SPGEN + SN">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>

	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="2" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="3" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="2" part="gen"/>
		  <clip pos="3" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="2" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="2" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="3" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="2" part="nbr"/>
		  <clip pos="3" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="2" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="3" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="3" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="3" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="3" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>	

	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


<rule comment="REGLA: SPR + PR + SN (Autonomiari buruzko erreferenduma)">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="PREPGEN"/>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>
	    <let>	      
	      <clip pos="1" part="a_SP"/>
	      <lit-tag v="SPR-SN"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


<rule comment="REGLA: SPR + PR + SN (2-12 urte bitarteko haurrak)">
      <pattern>
	<pattern-item n="SN"/>
	<pattern-item n="PREPGEN"/>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


<rule comment="REGLA: SPR + PR + SN (2-12 urte bitarteko haurrentzat)">
      <pattern>
	<pattern-item n="SN"/>
	<pattern-item n="PREPGEN"/>
	<pattern-item n="SPR"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>



<rule comment="REGLA: SPR + PR + SPGEN + SADV (gobernu demokratikoaren aurkako kolpearen ostean)">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="PREPGEN"/>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SADV"/> 
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>
	    <let>	      
	      <clip pos="1" part="a_SP"/>
	      <lit-tag v="SPR-SN"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="4" part="lem"/>
	    </get-case-from>
	      <clip pos="4" part="tags"/>
	      <clip pos="4" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="3" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


 <rule comment="REGLA: SN+ PREP (entrenatzaile gabe; enplegurik gabe)">
      <pattern>
	<pattern-item n="SN"/>
	<pattern-item n="PREP"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	    <clip pos="2" part="tags"/>
	    <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	</out>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="adv"/>
	      </equal>
	    </test>		
	    <out>
	      <chunk>
		<lit v="de"/>
		<lit-tag v="PREP"/>
		<lit v="{^of"/>
		<lit-tag v="pr"/>
		<lit v="$}"/>
	      </chunk>
	      <b/>
	    </out>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>


<!-- reglas para el comparativo -->

 <rule comment="REGLA: (aberatsek baino gizen gehiago) ">
      <pattern>
	<pattern-item n="SN_prn"/>
	<pattern-item n="baino"/>
	<pattern-item n="SAcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>


 <rule comment="REGLA: (400 milioi baino gehiago)  ">
      <pattern>
	<pattern-item n="SN_prn"/>
	<pattern-item n="baino"/>
	<pattern-item n="SADVcomp"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="num"/>
	      </equal>
	    </test>	
	    <let>
	      <clip pos="2" part="lem"/>
	      <lit v="baino-de"/>
	    </let>
	  </when>
	  <otherwise>
	    <let>
	      <clip pos="2" part="lem"/>
	      <lit v="baino-que"/>
	    </let>
	  </otherwise>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>



 <rule comment="REGLA: (Atzo baino jende gutxiago) ">
      <pattern>
	<pattern-item n="SADV"/>
	<pattern-item n="baino"/>
	<pattern-item n="SNcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>



 <rule comment="REGLA: (Atzo baino lasterkari gutxiagorekin) ">
      <pattern>
	<pattern-item n="SADV"/>
	<pattern-item n="baino"/>
	<pattern-item n="SPRnogencomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>



 <rule comment="REGLA: (Atzo baino gehiago) ">
      <pattern>
	<pattern-item n="SADV"/>
	<pattern-item n="baino"/>
	<pattern-item n="SADVcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>

<rule comment="REGLA: (inoiz baino ederrago) ">
      <pattern>
	<pattern-item n="SADV"/>
	<pattern-item n="baino"/>
	<pattern-item n="SAcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>



<rule comment="REGLA: (Iazko entzierroetan baino zazpi lagun gutxiagok) ">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="baino"/>
	<pattern-item n="SNcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>


<rule comment="REGLA: (Estatu frantsesean baino garestiago)">
      <pattern>
	<pattern-item n="SPR"/>
	<pattern-item n="baino"/>
	<pattern-item n="SAcomp"/>
      </pattern>
      <action>
	<let>
	  <clip pos="2" part="lem"/>
	  <lit v="baino-que"/>
	</let>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	    <clip pos="3" part="tags"/>
	    <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
 </rule>

<!--********************REGLAS CON SINTAGMAS VERBALES ************************* -->
<!--con formas no conjugadas -->

 <rule comment="REGLA: PP + PREP (sinatu gabe - without signing (MG: por ahora sólo con pp por provar, puede hacerse extensivo a todos los SV))">
      <pattern>
	<pattern-item n="pp"/>
	<pattern-item n="PREP"/>
      </pattern>
      <action>
	
	<out>
	  <chunk>
	    <get-case-from pos="1">
	    <clip pos="2" part="lem"/>
	    </get-case-from>
	    <clip pos="2" part="tags"/>
	    <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	</out>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="adv"/>
	      </equal>
	    </test>		
	    <out>
	      <chunk>
		<lit v="of"/>
		<lit-tag v="PREP"/>
		<lit v="{^of"/>
		<lit-tag v="pr"/>
		<lit v="$}"/>
	      </chunk>
	      <b/>
	    </out>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>

<rule comment="REGLA: SPverbal + PREP (nabarmentzeaz gain - además de destacar))">
      <pattern>
	<pattern-item n="SPVERB"/>
	<pattern-item n="PREP"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="a_adv"/>
		<lit-tag v="pr"/>
	      </equal>
	    </test>		
	    <let>	      
	      <clip pos="1" part="a_SP"/>
	      <lit-tag v="SPR-SN"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>




<rule comment="SN + SVsub (afaria prestatzeko - to prepare the dinner)">
  <pattern>
    <pattern-item n="SN"/>
    <pattern-item n="SVsub"/>
  </pattern>
  <action>
    <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
    <out>
      <chunk>
	<get-case-from pos="1">
	  <clip pos="2" part="lem"/>
	</get-case-from>
	  <clip pos="2" part="tags"/>
	  <clip pos="2" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	  <clip pos="1" part="tags"/>
	  <clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>

 <rule comment="REGLA: SPGEN + SN + SVsub">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SN"/>
	<pattern-item n="SVsub"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>	
	
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>

<rule comment="gurekin jokatzeko - to play with us (por ahora SPR incluye SPGEN, sintagmas en genitivo, revisar si esto provoca algún error">
  <pattern>
    <pattern-item n="SPR"/>
    <pattern-item n="SVsub"/>
  </pattern>
  <action>
    <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
    <out>
      <chunk>
	<get-case-from pos="1">
	  <clip pos="2" part="lem"/>
	</get-case-from>
	  <clip pos="2" part="tags"/>
	  <clip pos="2" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	  <clip pos="1" part="tags"/>
	  <clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>



<rule comment="tzeko + SN (osatzeko aukera -&gt; opción para componer)">
  <pattern>
    <pattern-item n="tzeko"/>
    <pattern-item n="SN"/>
  </pattern>
  <action>
   
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="2" part="tipus_det"/>
	    <lit-tag v="art"/>
	  </equal>
	</test>
	<let>
	  <clip pos="2" part="tipus_det"/>
	  <lit-tag v="def"/>
	</let>
      </when>
    </choose>
     <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="2" part="gen"/>
	    <lit-tag v="GD"/>
	  </equal>
	</test>
	<let>
	  <clip pos="2" part="gen"/>
	  <lit-tag v="m"/>
	</let>
      </when>
    </choose>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="2" part="nbr"/>
	    <lit-tag v="ND"/>
	  </equal>
	</test>
	<let>
	  <clip pos="2" part="nbr"/>
	  <lit-tag v="sg"/>
	</let>
      </when>
    </choose>
    <out>
      <chunk>
	<get-case-from pos="1">
	  <clip pos="2" part="lem"/>
	</get-case-from>
	<clip pos="2" part="tags"/>
	<clip pos="2" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	<clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>


<rule comment="SN + tzeko + SN (gobernua osatzeko aukera -&gt; opción para componer el gobierno)">
  <pattern>
    <pattern-item n="SN"/>
    <pattern-item n="tzeko"/>
    <pattern-item n="SN"/>
  </pattern>
  <action>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="1" part="tipus_det"/>
	    <lit-tag v="art"/>
	  </equal>
	</test>
	<let>
	  <clip pos="1" part="tipus_det"/>
	  <lit-tag v="def"/>
	</let>
      </when>
    </choose>
    <choose><!--pingui: en aquest cas per al  SN 3 no vull convertir 'art' en 'def': falta arreglar t3x i treure el seg. choose -->
      <when>
	<test>
	  <equal>
	    <clip pos="3" part="tipus_det"/>
	    <lit-tag v="art"/>
	  </equal>
	</test>
	<let>
	  <clip pos="3" part="tipus_det"/>
	  <lit-tag v="def"/>
	</let>
      </when>
    </choose>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="1" part="gen"/>
	    <lit-tag v="GD"/>
	  </equal>
	</test>
	<let>
	  <clip pos="1" part="gen"/>
	  <lit-tag v="m"/>
	</let>
      </when>
    </choose>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="1" part="nbr"/>
	    <lit-tag v="ND"/>
	  </equal>
	</test>
	<let>
	  <clip pos="1" part="nbr"/>
	  <lit-tag v="sg"/>
	</let>
      </when>
    </choose>
     <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="3" part="gen"/>
	    <lit-tag v="GD"/>
	  </equal>
	</test>
	<let>
	  <clip pos="3" part="gen"/>
	  <lit-tag v="m"/>
	</let>
      </when>
    </choose>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="3" part="nbr"/>
	    <lit-tag v="ND"/>
	  </equal>
	</test>
	<let>
	  <clip pos="3" part="nbr"/>
	  <lit-tag v="sg"/>
	</let>
      </when>
    </choose>
    <out>
      <chunk>
	<get-case-from pos="1">
	  <clip pos="3" part="lem"/>
	</get-case-from>
	<clip pos="3" part="tags"/>
	<clip pos="3" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<clip pos="2" part="whole"/>
      </chunk>
      <b pos="2"/>
      <chunk>
	<get-case-from pos="2">
	<clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>

 <rule comment="REGLA: SPGEN + SN + tzeko + SN (Estatu frantseseko gobernua osatzeko aukera)">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SN"/>
	<pattern-item n="tzeko"/>
	<pattern-item n="SN"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose><!--pingui: en aquest cas per al  SN 3 no vull convertir 'art' en 'def': falta arreglar t3x i treure el seg. choose -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>	
	
     <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="4" part="gen"/>
	    <lit-tag v="GD"/>
	  </equal>
	</test>
	<let>
	  <clip pos="4" part="gen"/>
	  <lit-tag v="m"/>
	</let>
      </when>
    </choose>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="4" part="nbr"/>
	    <lit-tag v="ND"/>
	  </equal>
	</test>
	<let>
	  <clip pos="4" part="nbr"/>
	  <lit-tag v="sg"/>
	</let>
      </when>
    </choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="4" part="lem"/>
	    </get-case-from>
	    <clip pos="4" part="tags"/>
	    <clip pos="4" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="3" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="3"/>
	  <chunk>
	    <get-case-from pos="2">
	    <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>




<!--con formas conjugadas -->





<rule comment="SA + izan (garestia da)">
  <pattern>
    <pattern-item n="SA"/>
    <pattern-item n="izan"/>
  </pattern>
  <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	    <clip pos="2" part="tags"/>
	    <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	    <clip pos="1" part="tags"/>
	    <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
  </action>
</rule>


<!-- reglas con relativos y oraciones relativas-->


<rule comment="SV + rel + SN (datorren urtea)">
  <pattern>
    <pattern-item n="SVconj"/>
    <pattern-item n="querel"/>
    <pattern-item n="SN"/>
  </pattern>
  <action>
    <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>	    
	  <chunk>
	    <get-case-from pos="3">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
  </action>
</rule>
<rule comment="SV + rel + SN (datorren urtea)">
  <pattern>
    <pattern-item n="prnsubj"/>
    <pattern-item n="SVconj"/>
    <pattern-item n="querel"/>
    <pattern-item n="SN"/>
  </pattern>
  <action>
    <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="4" part="lem"/>
	    </get-case-from>
	      <clip pos="4" part="tags"/>
	      <clip pos="4" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="3" part="whole"/>
	  </chunk>
	  <b pos="3"/>
	</out>
	<choose>
	  <when>
	    <test>
              <not>
	        <equal>
		  <clip pos="1" part="pers"/>
		  <lit-tag v="p3"/>
	        </equal>
              </not>
	    </test>
	    <out>
	      <chunk>
	        <get-case-from pos="4">
	          <clip pos="1" part="lem"/>
	        </get-case-from>
	          <clip pos="1" part="tags"/>
	          <clip pos="1" part="chcontent"/>
	      </chunk>
	      <b pos="3"/>
	      <chunk>
	        <clip pos="2" part="lem"/>
	        <clip pos="2" part="tags"/>
	        <clip pos="2" part="chcontent"/>
	      </chunk>
	    </out>
	  </when>
          <otherwise>
	    <out>
	      <chunk>
	        <get-case-from pos="4">
	          <clip pos="2" part="lem"/>
	        </get-case-from>
	          <clip pos="2" part="tags"/>
	          <clip pos="2" part="chcontent"/>
	      </chunk>
	    </out>
          </otherwise>
	</choose>
  </action>
</rule>

 <rule comment="REGLA: SV + rel + SPR (datorren urteko martxoan">
      <pattern>
	<pattern-item n="SVconj"/>
	<pattern-item n="querel"/>
	<pattern-item n="SPR"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	      <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="3">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>



<rule comment="SV + rel + SN (gure ekonomia )berpiztu dezakeen erakunde bakarra">
  <pattern>
    <pattern-item n="SVconj"/>
    <pattern-item n="querel"/>
    <pattern-item n="SN"/>
  </pattern>
  <action>
    <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	      <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>	    
	  <chunk>
	    <get-case-from pos="3">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
  </action>
</rule>



<rule comment="Auzitegi Konstituzionalak galarazten badu - el 'si' pasa delante del SN, el verbo no se detecta porque viene siempre después del 'si' y se queda tal como está. Por ahora queda así, estudiar si sería adecuado pasar también el verbo delante del SN en la mayoría de casos (si impide el tribunal constitucional.../ 'hanka sartzen baldin badu' - si la pierna mete / si mete la pierna ">
  <pattern>
    <pattern-item n="SN"/>
    <pattern-item n="si"/>
  </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="2" part="lem"/>
	    </get-case-from>
	      <clip pos="2" part="tags"/>
	      <clip pos="2" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>




 <rule comment="REGLA: SPGEN + SN + si">
      <pattern>
	<pattern-item n="SPGEN"/>
	<pattern-item n="SN"/>
	<pattern-item n="si"/>
      </pattern>
      <action>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="1" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="2" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="2" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="gen"/>
			<lit-tag v="mf"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="gen"/>
		  <clip pos="2" part="gen"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="gen"/>
		  <lit-tag v="m"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="1" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <choose>
	      <when>
		<test>
		  <and>
		    <equal>
		      <clip pos="1" part="temps"/>
		      <lit-tag v="pp"/>
		    </equal>
		    <not>
		      <equal>
			<clip pos="2" part="nbr"/>
			<lit-tag v="sp"/>
		      </equal>
		    </not>
		  </and>
		</test>
		<let>
		  <clip pos="1" part="nbr"/>
		  <clip pos="2" part="nbr"/>
		</let>
	      </when>
	      <otherwise>
		<let>
		  <clip pos="1" part="nbr"/>
		  <lit-tag v="sg"/>
		</let>
	      </otherwise>
	    </choose>
	  </when>
	</choose>	
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	</out>
      </action>
</rule>



<!--formas de reciprocidad (elkar) -->


<rule comment="elkar maite dugu">
  <pattern>
    <pattern-item n="elkar"/>
    <pattern-item n="SVconj"/>
  </pattern>
  <action>
    <let>
      <clip pos="1" part="lem"/>
      <get-case-from pos="1">
	<lit v="elkar-prn"/>
      </get-case-from>
    </let>
    <out>
      <chunk>
	<clip pos="1" part="lem"/>
	<clip pos="2" part="valor_NK"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<clip pos="2" part="whole"/>
      </chunk>     
    </out>
  </action>
</rule>
      
    
<rule comment="elkarri aitortu genion (cuando es elkarri, el verbo es NOR-NORI-NORK, con lo que el t1x envía el pronombre nori en un chunk aparte">
  <pattern>
    <pattern-item n="elkar_post"/>
    <pattern-item n="procl"/>
    <pattern-item n="SVconj"/>
  </pattern>
  <action>
    <let>
      <clip pos="1" part="lem"/>
      <get-case-from pos="1">
	<lit v="elkar-pr-prn"/>
      </get-case-from>
    </let>
    <out>
      <chunk>
	<clip pos="1" part="lem"/>
	<clip pos="3" part="valor_NK"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<clip pos="3" part="whole"/>
      </chunk>     
    </out>
  </action>
</rule>
      



    
<rule comment="eman zioten elkarri (cuando es elkarri, el verbo es NOR-NORI-NORK, con lo que el t1x envía el pronombre nori en un chunk aparte">
  <pattern>
    <pattern-item n="procl"/>
    <pattern-item n="SVconj"/>
    <pattern-item n="elkar_post"/>
  </pattern>
  <action>
    <let>
      <clip pos="3" part="lem"/>
      <get-case-from pos="1">
	<lit v="elkar-pr-prn"/>
      </get-case-from>
    </let>
    <out>
      <chunk>
	<clip pos="3" part="lem"/>
	<clip pos="2" part="valor_NK"/>
	<clip pos="3" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<clip pos="2" part="whole"/>
      </chunk>     
    </out>
  </action>
</rule>





<rule comment="azaldu duenez">
  <pattern>
    <pattern-item n="SVconj"/>
    <pattern-item n="cnjadv1"/>
  </pattern>
  <action>
    <out> 
      <chunk>
	<get-case-from pos="1">
	  <clip pos="2" part="lem"/>
	</get-case-from>
	<clip pos="2" part="tags"/>
	<clip pos="2" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>

<rule comment="ez jaso dutelako">
  <pattern>
    <pattern-item n="ez"/>
    <pattern-item n="SVconj"/>
    <pattern-item n="cnjadv1"/>
  </pattern>
  <action>
    <out> 
      <chunk>
	<get-case-from pos="1">
	  <clip pos="3" part="lem"/>
	</get-case-from>
	<clip pos="3" part="tags"/>
	<clip pos="3" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
      <b pos="2"/>
      <chunk>
	<clip pos="2" part="whole"/>
      </chunk>      
    </out>
  </action>
</rule>


<rule comment="PP + cnjadv (egin ezik -&gt; a menos que hacer:-/)">
  <pattern>
    <pattern-item n="pp"/>
    <pattern-item n="cnjadv2"/>
  </pattern>
  <action>
    <out> 
      <chunk>
	<get-case-from pos="1">
	  <clip pos="2" part="lem"/>
	</get-case-from>
	<clip pos="2" part="tags"/>
	<clip pos="2" part="chcontent"/>
      </chunk>
      <b pos="1"/>
    </out>
    <choose>
      <when>
	<test>
	  <equal caseless="yes">
	    <clip pos="2" part="lem"/>
	    <lit v="advgen"/>
	  </equal>
	</test>
	<out>
	<chunk>
	  <lit v="de"/>
	  <lit-tag v="PREP"/>
	  <lit v="{^of"/>
	  <lit-tag v="pr"/>
	  <lit v="$}"/>
	</chunk>
	<b/>
      </out>
      </when>
    </choose>
    <out>    
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
    </out>
  </action>
</rule>


<rule comment="SUBJ + PP + cnjadv (nik egin ezik -&gt; a menos que yo haga)">
  <pattern>
    <pattern-item n="prnpers"/>
    <pattern-item n="pp"/>
    <pattern-item n="cnjadv2"/>
  </pattern>
  <action>
    <let>
      <clip pos="2" part="pers"/>
      <clip pos="1" part="pers"/>
    </let>
    <let>
      <clip pos="2" part="nbr"/>
      <clip pos="1" part="nbr"/>
    </let>
    <choose>
      <when>
	<test>
	  <equal>
	    <clip pos="3" part="lem"/>
	    <lit v="ezean"/>
	  </equal>
	</test>
	<let>
	  <clip pos="2" part="temps"/>
	  <lit-tag v="pri"/>
	</let>
      </when>
      <when>
	<test>
	  <equal>
	    <clip pos="3" part="lem"/>
	    <lit v="ezik"/>
	  </equal>
	</test>
	<let>
	  <clip pos="2" part="temps"/>
	  <lit-tag v="prs"/>
	</let>
      </when>
    </choose>     
      
    <out> 
      <chunk>
	<get-case-from pos="1">
	  <clip pos="3" part="lem"/>
	</get-case-from>
	<clip pos="3" part="tags"/>
	<clip pos="3" part="chcontent"/>
      </chunk>
      <b pos="1"/>
      <chunk>
	<get-case-from pos="2">
	  <clip pos="1" part="lem"/>
	</get-case-from>
	<clip pos="1" part="tags"/>
	<clip pos="1" part="chcontent"/>
      </chunk>
      <b pos="2"/>
      <chunk>
	<clip pos="2" part="whole"/>
      </chunk>      
    </out>
  </action>
</rule>
	   
<!--formas verbales negativas con sintagmas intercalados entre auxiliar y forma no personal -->
   
<rule comment="REGLA: ez + izan + SN + PP/GER/PFUT - ez dute ezer aurkitu)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="SN"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="4" part="pers"/>
	  <clip pos="2" part="pers"/>
	</let>
	<let>
	  <clip pos="4" part="nbr"/>
	  <clip pos="2" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="3" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>	  
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	</out>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="lem"/>
		<lit v="ezer"/>
	      </equal>
	    </test>
            <out>
              <chunk>
                <lit v="anything"/>
                <lit-tag v="SN"/>
                <lit v="{^anything"/>
                <lit-tag v="prn.tn.m.sg"/>
                <lit v="$}"/>
              </chunk>
            </out>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="3" part="lem"/>
		<lit v="ezertxo"/>
	      </equal>
	    </test>
            <out>
              <chunk>
                <lit v="anything_at_all"/>
                <lit-tag v="SN"/>
                <lit v="{^anything at all"/>
                <lit-tag v="prn.tn.m.sg"/>
                <lit v="$}"/>
              </chunk>
            </out>
	  </when>
	  <when>
	    <test>
              <or>
	        <equal>
		  <clip pos="3" part="lem"/>
		  <lit v="inortxo"/>
	        </equal>
	        <equal>
		  <clip pos="3" part="lem"/>
		  <lit v="nehor"/>
	        </equal>
              </or>
	    </test>
            <out>
              <chunk>
                <lit v="anybody"/>
                <lit-tag v="SN"/>
                <lit v="{^anybody"/>
                <lit-tag v="prn.tn.m.sg"/>
                <lit v="$}"/>
              </chunk>
            </out>
	  </when>
          <otherwise>
            <out>
	      <chunk>
	        <clip pos="3" part="whole"/>
  	      </chunk>
            </out>
          </otherwise>
	</choose>
	<call-macro n="f_bcond">
	  <with-param pos="3"/>
	  <with-param pos="4"/>
	</call-macro>
      </action>
</rule>

	  
	      
<rule comment="REGLA: ez + izan + ADV + PP/GER/PFUT - ez dute oraindik aurkitu) ">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="SADV"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="4" part="pers"/>
	  <clip pos="2" part="pers"/>
	</let>
	<let>
	  <clip pos="4" part="nbr"/>
	  <clip pos="2" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>
	<out>	  
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	  <b pos="1"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="3" part="whole"/>
	  </chunk>
	</out>
	<call-macro n="f_bcond">
	  <with-param pos="3"/>
	  <with-param pos="4"/>
	</call-macro>
      </action>
</rule>	  

	      
<rule comment="REGLA: ez + izan + (e)la + SN + PP/GER/PFUT (ez dutela galdeketa egingo - que no harán el cuestionario)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="que"/>
	<pattern-item n="SN"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="5" part="pers"/>
	  <clip pos="2" part="pers"/>
	</let>
	<let>
	  <clip pos="5" part="nbr"/>
	  <clip pos="2" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>

	<let>
	  <clip pos="3" part="lem"/>
	  <lit v="que_enviar"/>
	</let>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	  <b pos="4"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>


<rule comment="REGLA: ez + izan + (e)la + SN + PP/GER/PFUT (ez dela eragingarria izango - que no será operativo)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="izan"/>
	<pattern-item n="que"/>
	<pattern-item n="SA"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="5" part="pers"/>
	  <clip pos="2" part="pers"/>
	</let>
	<let>
	  <clip pos="5" part="nbr"/>
	  <clip pos="2" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>

	<let>
	  <clip pos="3" part="lem"/>
	  <lit v="que_enviar"/>
	</let>
<!--operaciones para el SA -->
       <choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	  <b pos="4"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>

	  
	      
<rule comment="REGLA: ez + izan + (e)la + SN + PP/GER/PFUT (ez duela Lisboako Ituna berriro negoziatuko)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="que"/>
	<pattern-item n="SN"/>
	<pattern-item n="SADV"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="6" part="pers"/>
	  <clip pos="2" part="pers"/>
	</let>
	<let>
	  <clip pos="6" part="nbr"/>
	  <clip pos="2" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>

	<let>
	  <clip pos="3" part="lem"/>
	  <lit v="que_enviar"/>
	</let>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="3" part="lem"/>
	    </get-case-from>
	      <clip pos="3" part="tags"/>
	      <clip pos="3" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="6" part="whole"/>
	  </chunk>
	  <b pos="4"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	  <b pos="5"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>


<!--formas verbales negativas con sintagmas intercalados entre auxiliar y forma no personal: ahora con proclítico detrás de 'ez' -->




<rule comment="REGLA: ez + procl + izan + SN + PP/GER/PFUT - ez dute ezer aurkitu)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="procl"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="SN"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="5" part="pers"/>
	  <clip pos="3" part="pers"/>
	</let>
	<let>
	  <clip pos="5" part="nbr"/>
	  <clip pos="3" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="4" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="4" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>	  
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	  <b pos="3"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	</out>
	<call-macro n="f_bcond">
	  <with-param pos="4"/>
	  <with-param pos="5"/>
	</call-macro>
      </action>
</rule>

	  
	      
<rule comment="REGLA: ez + procl + izan + ADV + PP/GER/PFUT - ez dute oraindik aurkitu) ">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="procl"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="SADV"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="5" part="pers"/>
	  <clip pos="3" part="pers"/>
	</let>
	<let>
	  <clip pos="5" part="nbr"/>
	  <clip pos="3" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>
	<out>	  
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	  <b pos="1"/> 
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	  <b pos="3"/>
	  <chunk>
	    <clip pos="4" part="whole"/>
	  </chunk>
	</out>
	<call-macro n="f_bcond">
	  <with-param pos="4"/>
	  <with-param pos="5"/>
	</call-macro>
      </action>
</rule>	  

	      
<rule comment="REGLA: ez + procl + izan + (e)la + SN + PP/GER/PFUT (ez dutela galdeketa egingo - que no harán el cuestionario)">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="procl"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="que"/>
	<pattern-item n="SN"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="6" part="pers"/>
	  <clip pos="3" part="pers"/>
	</let>
	<let>
	  <clip pos="6" part="nbr"/>
	  <clip pos="3" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="6" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="6" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>

	<let>
	  <clip pos="4" part="lem"/>
	  <lit v="que_enviar"/>
	</let>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="4" part="lem"/>
	    </get-case-from>
	      <clip pos="4" part="tags"/>
	      <clip pos="4" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	  <b pos="3"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="4"/>
	  <chunk>
	    <clip pos="6" part="whole"/>
	  </chunk>
	  <b pos="5"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>



	  
	      
<rule comment="REGLA: ez + procl + izan + (e)la + SN + PP/GER/PFUT (ez duela Lisboako Ituna berriro negoziatuko) mireia no fet">
      <pattern>
	<pattern-item n="ez"/>
	<pattern-item n="procl"/>
	<pattern-item n="ukan_izan"/>
	<pattern-item n="que"/>
	<pattern-item n="SN"/>
	<pattern-item n="SADV"/>
	<pattern-item n="formasnopersonales"/>
      </pattern>
      <action>
	<let>
	  <clip pos="7" part="pers"/>
	  <clip pos="3" part="pers"/>
	</let>
	<let>
	  <clip pos="7" part="nbr"/>
	  <clip pos="3" part="nbr"/>
	</let>	
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="7" part="temps"/>
		<lit-tag v="pfut"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="7" part="temps"/>
	      <lit-tag v="fti"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="7" part="temps"/>
		<lit-tag v="ger"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="7" part="temps"/>
	      <lit-tag v="pri"/>
	    </let>
	  </when>
	  <when>
	    <test>
	      <equal>
		<clip pos="7" part="temps"/>
		<lit-tag v="pp"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="7" part="lem"/>
	      <lit v="posahaver_pp"/>
	    </let>
	  </when>
	</choose>

	<let>
	  <clip pos="4" part="lem"/>
	  <lit v="que_enviar"/>
	</let>
<!--operaciones para el SN -->
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="tipus_det"/>
		<lit-tag v="art"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="tipus_det"/>
	      <lit-tag v="def"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="gen"/>
		<lit-tag v="GD"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="gen"/>
	      <lit-tag v="m"/>
	    </let>
	  </when>
	</choose>
	<choose>
	  <when>
	    <test>
	      <equal>
		<clip pos="5" part="nbr"/>
		<lit-tag v="ND"/>
	      </equal>
	    </test>
	    <let>
	      <clip pos="5" part="nbr"/>
	      <lit-tag v="sg"/>
	    </let>
	  </when>
	</choose>
	<out>
	  <chunk>
	    <get-case-from pos="1">
	      <clip pos="4" part="lem"/>
	    </get-case-from>
	      <clip pos="4" part="tags"/>
	      <clip pos="4" part="chcontent"/>
	  </chunk>
	  <b pos="1"/>	  
	  <chunk>
	    <get-case-from pos="2">
	      <clip pos="1" part="lem"/>
	    </get-case-from>
	      <clip pos="1" part="tags"/>
	      <clip pos="1" part="chcontent"/>
	  </chunk>
	  <b pos="2"/>
	  <chunk>
	    <clip pos="2" part="whole"/>
	  </chunk>
	  <b pos="3"/>
	  <chunk>
	    <clip pos="7" part="whole"/>
	  </chunk>
	  <b pos="5"/>
	  <chunk>
	    <clip pos="6" part="whole"/>
	  </chunk>
	  <b pos="6"/>
	  <chunk>
	    <clip pos="5" part="whole"/>
	  </chunk>
	</out>
      </action>
</rule>
	  

    <rule comment="REGLA: reset variables">
      <pattern>
	<pattern-item n="punt"/>
      </pattern>
      <action>
	<let>
	  <var n="nombre"/>
	  <lit-tag v="sg"/>
	</let>
	<out>
	  <chunk>
	    <clip pos="1" part="whole"/>
	  </chunk>
	</out>
      </action>
    </rule>


 



  </section-rules>
</interchunk>
