Google Translate: UI translates but API fails

Viewed 115

Just struggling with the following thing:

I have a lot of kind-of-comments-dirty-writing-manner comments. Comments came from India region, and there is a mix of languages (but not within the single comment). In addition there are samples with the transliteration, and I was wondering whether I can detect the language in this kind of mess.

But with Google Translate UI I found it deals with it.

Example of Google Translate UI dealing with transliteration

As may be seen Google Translate UI detects language (probably correctly), suggests how the text should be written in the language detected, and finally translated it.

In contrast, Google Translate API does not give such a translation, but detects the language yet. Here's the response for the same input string:

translations {
  translated_text: "Theek kiya"
  detected_language_code: "hi"
}

So, I just wondering whether UI does additional stuff before it runs the translation, like spelling or whatever.

I do not see what did I missed with the API to make it finally translate the text.

Maybe someone faced the same problem and can help me?

0 Answers
Related