Translation Api result vs online translation difference

668 views
Skip to first unread message

Zoltán Kovács

unread,
Jun 28, 2017, 1:11:29 PM6/28/17
to Google Cloud Translation API
I just started to use the Google translation API in OmegaT translation software, and noticed that the translation different - and actually much lower quality - than in the free online translation tool (https://translate.google.com/) at the same source sentence.
Do you have same experience? Is it possible to get the translation of the online tool in the API?
The language pair was English -> Hungarian.

BR

Zoltan

Jordan (Cloud Platform Support)

unread,
Jun 29, 2017, 11:37:18 AM6/29/17
to Google Cloud Translation API
The Translation API webpage makes use of the new Neural Machine Translation (NMT) model, where as the actual API uses the default Phrase-Based Machine Translation (PBMT) model. 

To use the new NMT model for translations, simply set the 'model' option to 'nmt' in your API calls. 

Zoltán Kovács

unread,
Jun 30, 2017, 3:34:50 PM6/30/17
to Google Cloud Translation API
Thank you for your answer, but it is not so simple.

Please compare the https://cloud.google.com/translate/ with the https://translate.google.com/

Eng -> Hun
"This is the example of the bad translation."

https://cloud.google.com/translate/  => "Ez a példa a rossz fordítás."   (It is about: This example is the bad translation.)

https://translate.google.com/  => "Ez a rossz fordítás példája."  (It is correct in meaning: This is the example of the bad translation)

Do you think that the https://translate.google.com/ already has NMT for Hungarian, and the https://cloud.google.com/translate/ not yet?

Jordan (Cloud Platform Support)

unread,
Jul 3, 2017, 2:11:35 PM7/3/17
to Google Cloud Translation API
You are exactly correct, Translation API webpage and the Translation API currently only have the 'base' PBMT model enabled for the English - Hungarian pair. Where as https://translate.google.com/ is testing the new NMT model of translations. 

Seeing that https://translate.google.com/ is already using the new model for English - Hungarian, we can assume that the actual Translation API will have this functionality very soon. 

Zoltán Kovács

unread,
Jul 4, 2017, 8:43:47 AM7/4/17
to Google Cloud Translation API
Thank you Jorden - the NMT translation works much much better, I hope tha Translation API follows soon the https://translate.google.com/. How possible to check which model is used?

Jordan (Cloud Platform Support)

unread,
Jul 4, 2017, 11:01:57 AM7/4/17
to Google Cloud Translation API
By default, the API will attempt to use the new NMT model. But this is not always supported for language pairs as we have seen. 

Therefore, if you manually set a "model" option (e.g to 'nmt') in your API requests, the response will return the actual model used (e.g in this case it returned 'base' because 'nmt' was not available for the language pair):

Response: 
{
"data": {
"translations": [
{
"translatedText": "test",
"model": "base"
}
]
}
}

Zoltán Kovács

unread,
Jul 4, 2017, 2:06:24 PM7/4/17
to Google Cloud Translation API
Ok, thank you for your help!
Reply all
Reply to author
Forward
0 new messages