Francis Tyers <fty...@prompsit.com> writes: > El dl 05 de 05 de 2014 a les 13:59 +0200, en/na David Chan va escriure:
[...] > $ echo "El gato negro caminaba en la playa." | python3 /tmp/nums.py > [0]El [1]gato [2]negro [3]caminaba [4]en [5]la [6]playa. > > Then run it through Apertium: > > $ echo "El gato negro caminaba en la playa." | python3 /tmp/nums.py | > apertium -f none -d ~/source/apertium/trunk/apertium-en-es/ es-en > [0]The[1] black[2] cat [3]walked[4] in[5] the[6] beach. Note: If you want to put numbers in blanks in real text, you should alter the script to do <apertium-notrans>0</apertium-notrans>El<apertium-notrans>1</apertium-notrans> … instead of [0]El[1] and call apertium with the "-f html-noent" format option instead of "-f none" (since the latter will break as soon as you get any "special symbol" as input). -- Kevin Brubeck Unhammer GPG: 0x766AC60C
pgp9kXBcVlGtz.pgp
Description: PGP signature
------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce
_______________________________________________ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff