Mixed modes

From Apertium
Jump to navigation Jump to search

En français

Mode files are used to specify Apertium pipelines. They have a variety of uses.

Joining together two translators

Because Apertium works on text streams, if we want to translate between two languages for which we don't currently have a translation pair, we can stick two translation pairs together, and make a rough system, although without the normal level of quality. The results will not be as bad as typical, paste in text in one box, and paste in translation because we leave out the second stage of analysis.

Here is an example of translating from English to Spanish through Catalan.

$ echo "With mode files we can make hybrid translators." |  \
  apertium-detxt | \
  lt-proc apertium-en-ca/en-ca.automorf.bin | \
  apertium-tagger -g apertium-en-ca/en-ca.prob | \
  apertium-pretransfer | \
  apertium-transfer apertium-en-ca/apertium-en-ca.en-ca.t1x  apertium-en-ca/en-ca.t1x.bin apertium-en-ca/en-ca.autobil.bin | \
  apertium-interchunk apertium-en-ca/apertium-en-ca.en-ca.t2x  apertium-en-ca/en-ca.t2x.bin | \
  apertium-postchunk apertium-en-ca/apertium-en-ca.en-ca.t3x  apertium-en-ca/en-ca.t3x.bin | \
  apertium-transfer apertium-es-ca/apertium-es-ca.trules-ca-es.xml  apertium-es-ca/trules-ca-es.bin  apertium-es-ca/ca-es.autobil.bin | \ 
  lt-proc -g apertium-es-ca/ca-es.autogen.bin | \
  lt-proc -p apertium-es-ca/ca-es.autopgen.bin | \
  apertium-retxt 

Con archivos de modo podemos hacer traductores híbridos.

The modes.xml would look like

TODO :-)

See also