> X-Mailer: Evolution 3.2.2-1+b1 
> Date: Sun, 03 Feb 2013 18:31:13 +0000
> From: Francis Tyers <[email protected]>
> To: [email protected]
> Reply-To: [email protected], [email protected]
> Subject: Re: [Apertium-stuff] Constant strings or attributes in transfer
>  rules
>
> El dg 03 de 02 de 2013 a les 19:11 +0100, en/na Bernard Chardonneau va
> escriure:
> > Hello,
> > 
> > Here are my two first transfer rules :
> > 
> >     <rule>
> >       <pattern>
> >         <pattern-item n="det"/>
> >         <pattern-item n="nom_commun"/>
> >       </pattern>
> >       <action>
> >         <out>
> >           <lu>
> >             <clip pos="1" side="tl" part="lem"/>
> >             <clip pos="1" side="tl" part="type_mot"/>
> >             <clip pos="1" side="tl" part="type_det"/>
> >             <clip pos="2" side="tl" part="genre"/>
> >             <clip pos="2" side="tl" part="nombre" />
> >           </lu>
> >           <!-- space here -->
> >           <lu>
> >             <clip pos="2" side="tl" part="lem"/>
> >             <clip pos="2" side="tl" part="type_mot"/>
> >             <clip pos="2" side="tl" part="genre"/>
> >             <clip pos="2" side="tl" part="nombre"/>
> >           </lu>
> >         </out>
> >       </action>
> >     </rule>
> > 
> >     <rule>
> >       <pattern>
> >         <pattern-item n="nom_commun"/>
> >       </pattern>
> >       <action>
> >         <out>
> >           <lu>
> >             <!-- generate here : un<det><ind> -->
> >             <clip pos="1" side="tl" part="genre"/>
> >             <clip pos="1" side="tl" part="nombre" />
> >           </lu>
> >           <!-- space here -->
> >           <lu>
> >             <clip pos="1" side="tl" part="lem"/>
> >             <clip pos="1" side="tl" part="type_mot"/>
> >             <clip pos="1" side="tl" part="genre"/>
> >             <clip pos="1" side="tl" part="nombre"/>
> >           </lu>
> >         </out>
> >       </action>
> >     </rule>
> > 
> > The first one quite works except that a space is needed between the two
> > lexical units.
>
> Insert <b pos="1"/> where you have the comment.
>
> > For the second one, a word is added. So, a lexical unit must start by a
> > constant string made of elements which cannot be taken on input.
> > 
> > How to do that ?
> > 
> > Note : the attribute type_det of the first rule can also be a constant
>
> <lu>
> <lit v="un"/>
> <lit-tag v="det.ind"/>
> <clip pos="1" side="tl" part="genre"/>
> <clip pos="1" side="tl" part="nombre" />
> </lu>
>
> Fran
>
>
>

It works, but with something strange for <b pos="1"/>
There is an execution error for the second rule, but <b pos="0"/>
works for it.

More simple : the tag <b /> works for the 2 rules.

So, what means pos="1" (or another value) inside <b .../> tag ?


--------------------------------
Bernard Chardonneau (France)
Phone : [33] 1 64 90 87 04 or [33] 9 72 36 32 90
(from Sept to June except holidays)
GSM phone : [33] 6 49 95 13 95 (french scholl holidays, C zone)

Multilingual websites for my free softwares :
http://libremail.free.fr and http://libremail.tuxfamily.org
http://cyloop.tuxfamily.org (mainly translated with Apertium)

My general website (in french only)
http://bech.free.fr

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to