# Machine Translation

Machine Translation

## Introduction

Machine Translation Introduction

As opposed to user-generated translation memories (as in the case of OmegaT) Machine translation (MT) tools use rule-based linguistic tools to create a translation of the source segment without the need for a translation memory. Statistical learning techniques, based on source and target texts, are used to build a translation model. Machine translation services have been achieving good and steadfastly improving results in research evaluations.

To activate any of the Machine Translation services, go to Options > Machine Translate ... and activate the service desired. Note that they are all web-based: you will have to be on-line if you want to use them.

## Google Translate

Machine Translation Google Translate

Google Translate is a payable service offered by Google, for translating sentences, web sites and complete texts between an ever-growing number of languages. At the time of writing the list includes more than 50 languages, from Albanian to Yiddish, including of course all the major languages. The current version of the service is based on usage, with the price of 20 USD per million characters at the time of writing.

Important: Google Translate API v2 requires billing information for all accounts before you can start using the service (see Pricing and Terms of Service for more). To identify yourself as a valid user for the Google services, you use your private unique key sent to you by Google, when you have registered for the service. See chapter Installing and Running, section Launch command arguments, for details on how to add this key to the OmegaT environment.

The quality of the Google Translate translation depends on one side on the reservoir of target-language texts and the availability of their bilingual versions, on the other hand on the quality of the models built. It is pretty much certain that while the quality may be insufficient in some cases, it will definitely get better with time and not worse.

## OmegaT users and Google Translate

The OmegaT user is not forced to use Google Translate. If used, neither the user's decision to accept the translation nor the final translation are made available to Google. The following window shows an example of a) the English source b) Spanish and c) Slovenian Google Translate translation.

Google Translate - example

The Spanish translation is better than the Slovenian. Note interesar and navegar in Spanish, are correctly translated as the verbs interest and sail respectively. In the Slovenian version both words have been translated as nouns. It is actually quite probable that the Spanish translation is based at least partially on the actual translation of the book.

Once you have activated the service, a suggestion for the translation will appear in the Machine Translate pane every time a new source segment is opened. If you find the suggestion acceptable, press Ctrl M to replace the target part of the opened segment with the suggestion. In the above segment, for instance, Ctrl M would replace the Spanish version with the Slovenian suggestion.

Shortcuts Machine Translate - Ctrl+M

If you do not wish OmegaT to send your source segments to Google to get translated, untick the Google Translate menu entry in Options.

Note that nothing but your source segment is sent to the MT service. The online version of Google Translate allows the user to correct the suggestion and send the corrected segment in. This feature, however, is not implemented in OmegaT.

## Belazar

Machine Translation Belazar

Belazar is a Machine language translation tool for the Russian-Belarusian language pair.

## Apertium

Machine Translation Apertium

Apertium is a free/open-source machine translation platform, initially aimed at related-language pairs, like CA, ES, GA, PT, OC and FR but recently expanded to deal with more divergent language pairs (such as English-Catalan). Check the web site for the latest list of implemented language pairs.

The platform provides

- a language-independent machine translation engine

- tools to manage the linguistic data necessary to build a machine translation system for a given language pair

- linguistic data for a growing number of language pairs

Apertium uses a shallow-transfer machine translation engine which processes the input text in stages, as in an assembly line: de-formatting, morphological analysis, part-of-speech disambiguation, shallow structural transfer, lexical transfer, morphological generation, and re-formatting.

It is possible to use Apertium to build machine translation systems for a variety of language pairs; to that end, Apertium uses simple XML-based standard formats to encode the linguistic data needed (either by hand or by converting existing data), which are compiled using the provided tools into the high-speed formats used by the engine.

## MyMemory (machine)

Machine Translation MyMemory

By default, MyMemory allows a maximum of 100 requests per day. By specifying an email address, it is possible to use 1000 requests per day instead of 100 ones.

There are at least 3 ways to specify your address:

- in the OmegaT.l4J.ini file (Windows only), change:

  # MyMemory email

  to:

  MyMemory your@email-address.com

- When starting OmegaT from the command line, specify in the command:

  -Dmymemory.api.email=your@email-address.com

- in the Kaptain launcher (Linux only), enter the address in the corresponding field on the "Online Services" tab.

MyMemory provides also Human translations originating from professional translators, LSPs, customers and multilingual web content. To get these translations, you must upload your source file on their site that generates a TMX file. Then you must put this TMX file in the /tm/ or /tm/auto/ folder of your OmegaT project.

MyMemory offers also the possibility to manage private TMs. Note: OmegaT does not interact dynamically with them (you must export/import TMX files manually).

## Microsoft Translator

Machine Translation Microsoft Translator

In order to get credentials for MS Translator, follow these steps:

1. Log into Microsoft Azure Marketplace: http://datamarket.azure.com/

   If you do not already have an Azure Marketplace account you will need to register one first.

2. Click on the My Account option at the top of the page.

3. Near the bottom you will see entries and values for:

   - Primary Account Key (corresponds to `microsoft.api.client_secret` command-line parameter)

   - Customer ID (corresponds to `microsoft.api.client_id` command-line parameter)

To enable MS Translator in OmegaT edit its launcher or see chapter Installing and Running to learn how to start OmegaT from the command line.

## Yandex Translate

Machine Translation Yandex Translate

In order to be able to use Yandex Translate in OmegaT, you need to obtain an API key from Yandex.

The obtained API key needs to be passed to OmegaT at startup through `yandex.api.key` command-line parameter. To do that edit OmegaT launcher or see chapter Installing and Running to learn how to start OmegaT from the command line.

## Machine translation - trouble shooting

Machine Translation Troubleshooting

If there's nothing appearing in the Machine Translate pane, then check the following:

- Are you online? You need to be online to be able to use an MT tool.

- What is the language pair you need? Check if the selected service offers it.

- Google Translate does not work: have you applied Translate API service? Note that Google Translate service is not free of charge, see chapter Installing and Running (runtime parameters) for more on that.

- "Google Translate returned HTTP response code: 403 ...": check that the 38-characters key, entered in the pinfo.list file, is correct. Check that Translate API service has been activated.

- Google Translate does not work: - with the Google API key entered as requested. Check in Options > Machine Translate, that Google Translate V2 is checked.

- Google Translate V2 reports "Bad request" - check the source and target languages for your project. Having no languages defined elicits this kind or a response.