> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
> Date: Tue, 05 Feb 2013 12:57:17 +0100
> From: Kevin Brubeck Unhammer <[email protected]>
> To: [email protected]
> Reply-To: [email protected]
> Subject: Re: [Apertium-stuff] conditions in a rule
>
> "Bernard Chardonneau" <[email protected]>
> writes:
>
> > Now, I would like to make a rule in witch several attributes will be
> > changed according to conditions.
> >
> > The rule (half working)
> >
> >     <rule>
> >       <pattern>
> >         <pattern-item n="prn"/>
> >         <pattern-item n="verbe"/>
> >       </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="personne"/>
> >             <clip pos="1" side="tl" part="genre"/>
> >             <clip pos="1" side="tl" part="nombre"/>
> >           </lu>
> >           <b />
> >           <lu>
> >             <clip pos="2" side="tl" part="lem"/>
> >             <clip pos="2" side="tl" part="type_mot"/>
> >             <clip pos="2" side="tl" part="temps"/>
> >             <clip pos="1" side="tl" part="personne"/>
> >             <clip pos="1" side="tl" part="nombre"/>
> >           </lu>
> >         </out>
> >       </action>
> >     </rule>
> >
> > I would like to change some values according to conditions :
> >
> > if personne = "p2" then
> >     nombre <- "pl"
> >
> > if personne = p3 and nombre = "pl" then
> >     genre <- "m"
>
> http://wiki.apertium.eu/index.php/Session_5:_Structural_transfer_basics#Practice
>> has a simple example that does this kind of thing, look for the
> <choose><when> parts. 
>
>
> -- 
> Kevin Brubeck Unhammer
>
> GPG: 0x766AC60C
>
>
It works, I will just have to try macro for "temps" concordance, and there does
not seem to be a wiki page for that. Just examples in other pairs files.


--------------------------------
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

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to