Google translation for Hinglish Input (V2)

496 views
Skip to first unread message

Nihit

unread,
Jun 19, 2020, 12:11:26 PM6/19/20
to Google Cloud Translation API
Hi,

I am trying to use google translate api v2 for translating Hindi-RomanScript (Hinglish) into English. This is required because we get the input text in Hinglish. This text needs to converted into English for further usage. 

  1. aap bahut ache hai (Hinglish) => You are very good (English)
  2. aaj aap kya khayenge(Hinglish) => What will you eat today? (English)

This is the use case that is needed. 

When trying to use Google Translate Api there seems to be some ambiguity in how the translation is happening. There are two models in v2 Base and NMT.
When using NMT Model it recognises the language as Hindi but doesn't translate into English. For the Base Model it does translate in most of the cases. Some cases it does not though. 
Both the models detect the language correct. But it's only the Base model which translates Hinglish into English. NMT model gives input as the response for any text

Please find a file attached for the same.

These are the questions i have.
  1. Why does NMT model not work but Base model work in most cases?
  2. Base model does not work in some cases. Is there a way to know if the base model would work or not?
  3. Google Translate works properly for Hinglish input. Is the any Google Translation API that I can use for my purpose?
screencapture-localhost-8888-notebooks-translation-google-ipynb-2020-06-19-16_24_02.png

Yue Shi

unread,
Jun 22, 2020, 1:26:43 PM6/22/20
to Google Cloud Translation API
Hi,

1. Cloud Translation API nmt doesn't have Transliteration support. Could you try "तुम सही नहीं कर रहे" instead of "tum sahi nahi kar rahe" in the nmt request?
2. Google Translate (translate.google.com) is using nmt model, that's why it is not comparable with base model (PBMT) output.
Reply all
Reply to author
Forward
0 new messages