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