Difference between revisions of "Translation memory"

From Apertium
Jump to navigation Jump to search
(New page: ==Further reading== * Planas, E., Furuse, O. (1999) "Formalizing translation memories". ''Proc. MT Summit'' VII. pp. 331–339 * Elliott Macklovitch and Graham Russell (2000) "What's b...)
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
Apertium can use a translation memory (TMX file) to override the default translations by using the <code>-m</code> (and <code>-o</code>) command line argument:
  +
<pre>
  +
-m memory.tmx use a translation memory to recycle translations
  +
-o direction translation direction using the translation memory,
  +
by default 'direction' is used instead
  +
</pre>
  +
==Example usage==
  +
Example TMX:
  +
<pre>
  +
<?xml version='1.0' encoding='utf-8'?>
  +
<!DOCTYPE tmx SYSTEM "tmx14.dtd">
  +
<tmx version="1.4">
  +
<header creationtool="Translate Toolkit - po2tmx" creationtoolversion="1.9.0"
  +
segtype="sentence" o-tmf="UTF-8" adminlang="en" srclang="en" datatype="PlainText"/>
  +
<body>
  +
<tu>
  +
<tuv xml:lang="en">
  +
<seg>Welcome to Wikipedia</seg>
  +
</tuv>
  +
<tuv xml:lang="ca">
  +
<seg>Benvinguts a la Viquipèdia</seg>
  +
</tuv>
  +
</tu>
  +
<tu>
  +
<tuv xml:lang="en">
  +
<seg>The Free Encyclopedia</seg>
  +
</tuv>
  +
<tuv xml:lang="ca">
  +
<seg>L'Enciclopèdia Lliure</seg>
  +
</tuv>
  +
</tu>
  +
</body>
  +
</tmx>
  +
</pre>
   
  +
If you've saved that as en-ca.tmx, entries there will override the suggestions from apertium. Let's try with and without the tmx:
  +
<pre>
  +
$ echo Welcome to Wikipedia. Hello|apertium en-ca
  +
Benvingut a Viquipèdia. Hola
  +
$ echo Welcome to Wikipedia. Hello|apertium en-ca -m en-ca.tmx
  +
Benvinguts a la Viquipèdia. Hola
  +
</pre>
   
  +
  +
==See also==
  +
* [[Tools for TMX]]
  +
* [[TMX]]
  +
* [[Tips for translators]]
  +
* [[Ideas_for_Google_Summer_of_Code/Command-line_translation_memory_fuzzy-match_repair]]
   
 
==Further reading==
 
==Further reading==
 
* Planas, E., Furuse, O. (1999) "Formalizing translation memories". ''Proc. MT Summit'' VII. pp. 331–339
 
* Planas, E., Furuse, O. (1999) "Formalizing translation memories". ''Proc. MT Summit'' VII. pp. 331–339
 
* Elliott Macklovitch and Graham Russell (2000) "What's been Forgotten in Translation Memory". ''AMTA 2000'' pp.137–146
 
* Elliott Macklovitch and Graham Russell (2000) "What's been Forgotten in Translation Memory". ''AMTA 2000'' pp.137–146
  +
* http://en.wikipedia.org/wiki/Translation_Memory_eXchange
   
  +
[[Category:TMX]]
 
[[Category:Development]]
+
[[Category:Using Apertium]]

Latest revision as of 13:33, 1 July 2016

Apertium can use a translation memory (TMX file) to override the default translations by using the -m (and -o) command line argument:

 -m memory.tmx    use a translation memory to recycle translations
 -o direction     translation direction using the translation memory,
                  by default 'direction' is used instead

Example usage[edit]

Example TMX:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE tmx SYSTEM "tmx14.dtd">
<tmx version="1.4">
  <header creationtool="Translate Toolkit - po2tmx" creationtoolversion="1.9.0" 
          segtype="sentence" o-tmf="UTF-8" adminlang="en" srclang="en" datatype="PlainText"/>
  <body>
    <tu>
      <tuv xml:lang="en">
        <seg>Welcome to Wikipedia</seg>
      </tuv>
      <tuv xml:lang="ca">
        <seg>Benvinguts a la Viquipèdia</seg>
      </tuv>
    </tu>
    <tu>
      <tuv xml:lang="en">
        <seg>The Free Encyclopedia</seg>
      </tuv>
      <tuv xml:lang="ca">
        <seg>L'Enciclopèdia Lliure</seg>
      </tuv>
    </tu>
  </body>
</tmx>

If you've saved that as en-ca.tmx, entries there will override the suggestions from apertium. Let's try with and without the tmx:

$ echo Welcome to Wikipedia. Hello|apertium en-ca 
Benvingut a Viquipèdia. Hola
$ echo Welcome to Wikipedia. Hello|apertium en-ca -m en-ca.tmx
Benvinguts a la Viquipèdia. Hola


See also[edit]

Further reading[edit]