On 28 October 2010 16:18, Antonio Toral <[email protected]> wrote:
> hi everybody,
>
> I'm trying to automatically add entries from a multilingual gazetteer to
> Apertium, testing it in Apertium en-es 0.7.1. I leave morphology
> undefined (gen=mf, num=sp) as I don't have that info. This is an example
> of what I'm adding:
>
> - es.dix:
> <pardef n="Aquisgrán__np"><e><p><l/><r><s n="np"/><s n="mf"/><s
> n="sp"/></r></p></e></pardef>
> <e lm="Ekaterimburgo"><i>Ekaterimburgo</i><par n="Aquisgrán__np"/></e>
>
> - en.metadix:
> <pardef n="Aachen__np"><e><p><l/><r><s n="np"/><s n="mf"/><s
> n="sp"/></r></p></e></pardef>
> <e lm="Yekaterinburg"><i>Yekaterinburg</i><par n="Aachen__np"/></e>
>
> - en-es.dix:
> <e><p><l>Yekaterinburg<s n="np"/></l><r>Ekaterimburgo<s
> n="np"/></r></p></e>
>
>
> Now, translating es->en, it seems to be working:
>
> # echo "Ekaterimburgo" | apertium -d . test-es-en
> Yekaterinburg
>
> but en->es, it's not:
> # echo "Yekaterinburg" | apertium -d . test-en-es
> #Ekaterimburgo<mf><sp>
>
> I've executed it step by step and it looks like the error is in the
> transfer:
>
No, the error is in your dictionary entries. English placenames do not
have gender, they only have number. The rules do not, and will not,
take it into account. Fix your entries.
FWIW, it's generally safe to assume <m><sg> for placenames in Spanish,
and <sg> for English.
> # echo "Yekaterinburg" | apertium-destxt | lt-proc en-es.automorf.bin |
> apertium-tagger -g en-es.prob | apertium-pretransfer | apertium-transfer
> apertium-en-es.en-es.t1x en-es.t1x.bin en-es.autobil.bin
> ^nom<SN><UNDET><mf><sp>{^Ekaterimburgo<3><4>$}$^punt<sent>{^.<sent>$}$[][
>
> # echo "Ekaterimburgo" | apertium-destxt | lt-proc es-en.automorf.bin |
> apertium-tagger -g es-en.prob | apertium-pretransfer | apertium-transfer
> apertium-en-es.es-en.t1x es-en.t1x.bin es-en.autobil.bin
> ^default<default>{^Yekaterinburg<np><mf><sp>$}$^punt<sent>{^.<sent>$}$[][
>
>
> Anybody can tell me what's going on?
>
> Thank you very much!
> Antonio
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Apertium-stuff mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>
--
<Leftmost> jimregan, that's because deep inside you, you are evil.
<Leftmost> Also not-so-deep inside you.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff