El dl 20 de 02 de 2012 a les 15:07 +0000, en/na Jimmy O'Regan va
escriure:
> On 20 February 2012 14:08, Francis Tyers <[email protected]> wrote:
> > The weird thing is the difference in output between outside lexical
> > transfer and inside lexical transfer ... Looking at the code I would
> > have expected them to give the same results.
>
> It's not being set by anything.
>
> If I change the rule from:
> <rule comment="REGLA: ADJ (quan no acompanya res o va amb desconeguda)">
> <pattern>
> <pattern-item n="adjec"/>
> </pattern>
> <action>
> <call-macro n="f_concord1">
> <with-param pos="1"/>
> </call-macro>
>
> to:
> <rule comment="REGLA: ADJ (quan no acompanya res o va amb desconeguda)">
> <pattern>
> <pattern-item n="adjec"/>
> </pattern>
> <out>
> <lit v="[nbr: "/>
> <clip pos="1" side="tl" part="nbr"/>
> <lit v="|nbr_sense_sp: "/>
> <clip pos="1" side="tl" part="nbr_sense_sp"/>
> <lit v="|tags sl: "/>
> <clip pos="1" side="sl" part="tags"/>
> <lit v="|tags tl: "/>
> <clip pos="1" side="tl" part="tags"/>
> <lit v="]"/>
> </out>
> <action>
> <call-macro n="f_concord1">
> <with-param pos="1"/>
> </call-macro>
>
> cho '^direbech<adj><mf><sp>$' |apertium-transfer
> apertium-br-fr.br-fr.t1x br-fr.t1x.bin br-fr.bin
> [nbr: <sp>|nbr_sense_sp: <ND>|tags sl: <adj><mf><sp>|tags tl:
> <adj><mf><sp>]^Adj<SA><mf><sp>{^sans reproche<adj><mf><3><sp>$}$
>
> i.e., it's the first thing to happen in the <action> - no macros have
> been called. Both sets of tags are as expected, the ND is coming from
> nowhere.
>
> Changing <clip pos="1" side="tl" part="nbr_sense_sp"/> to <clip
> pos="1" side="sl" part="nbr_sense_sp"/> gives:
> [nbr: <sp>|nbr_sense_sp: |tags sl: <adj><mf><sp>|tags tl:
> <adj><mf><sp>]^Adj<SA><mf><sp>{^sans reproche<adj><mf><3><sp>$}$
> ...as expected.
Interestingly:
$ echo "direbech" | apertium -d . br-fr-tagger | lt-proc -b
br-fr.autobil.bin
^direbech<adj><mf><sp>/sans
reproche<adj><mf><sp>/irréprochable<adj><mf><ND>$^.<sent>/.<sent>$
The output of the lexical transfer is ambiguous... I didn't spot that
before...
If I comment out the other entry I get:
$ echo "direbech" | apertium -d . br-fr-tagger | apertium-transfer
apertium-br-fr.br-fr.t1x br-fr.t1x.bin br-fr.autobil.bin
^Adj<SA><mf><sp>{^sans reproche<adj><mf><sp>$}$^punt<sent>{^.<sent>$}$
Which is the expected behaviour. Should the lexical transfer be getting
some attributes from the first word and others from the second ? Because
if so we need to rework how lt-proc -b and apertium-transfer -b work.
Fran
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff