How to get romanization of word using google translate API (word is translated in different language but get its pronunciation form in english ) - google-translate

I am trying to get translation of words using https://cloud.google.com/translate/docs/setup API
It all works fine but I need to get the translated word in english(romanized)
For eg: If input word in english is hello & translated to Japanese returns こんにちは
But I need this translated in english Kon'nichiwa (like the way google translate website shows it)
Using the google translate API, it just returns the translated word in the corresponding language.
Is there anyway to achieve this ?
I am open to use any other API as well (as long as it has some free version of it)

Related

Translate mixed languages to single language

I would like to allow users to view a list of mixed-language comments (ie ten in English and four in Spanish) in their preferred language. I am only able to get Google Translate to translate the list to Spanish. How do I use Google Translate to translate the Spanish inputs to English? When I select "English" it just shows me the original mixed inputs.
My mistake. I reverted to W3C example code and it worked as I had intended.

How to get roman hindi from google translate api?

While using google translate api for english to hindi translation, we are trying to fetch translated roman hindi for an english search query, searching for suitable method.
Currently, the transliteration from English en to Hindi hi, which means that the result will the translated text with only Latin characters, is not supported. As per the comments, from English shoes the expected output would be joote. However, the output is जूते.
There is an already open Feature request within Google's Issue tracker, here, addressing the Transliteration for the Cloud Translation API. Thus, you can click on the +1 button and leave a comment so the Googlers know this issue is also relevant to you. Lastly, I should point out that this platform is used to track bugs and feature requests made by the costumers.

Transcription in Google Translate API

Is it possible to get transcription of word translated by Google API?
Same as in translate.google.com right under the textarea.
I need translation and transcription of single words only, like in dictionary, so may be Google offers some dictionary API, simpler than translation but with transcription?
Look at this picture, second red arrow points to transcription of word "transcription"
Google Translation API doesn't give you the variants of translation of a single word and doesn't give to you the text to speech functionality. Translate API can detect the language automatically and respond the translated text.

wrong language detection with google translate (multiple languages)

I am currently working on something where I am trying to translate a paragraph which includes more than one language.
Now I have realised with the google translate API if we have lets say:
hello bye hola
it will detect the language as English and if its:
hello hola adios then it will detect Spanish.
So basically whichever language has the highest word count in the sentence/paragraph, it will detect that language. Now the funny thing is that on google translate they actually have this feature.
Is there any way that to fix this issue so that it will only detect the foreign language and not English?
No, there's not a way to do that with the Google Translate API because there's just no mechanism for that exposed in their public API.
If you use an alternate language detection library, you can define a threshold under which to remove the content of the less-represented language. This would allow you to remove the English content if it makes up less than, say, 30% of the text in your overall sample.
For example, see the RemoveMinorityScriptsTextFilterTest class in the optimaize/language-detector project.

Google Translate API Pricing and Language auto-detect Effeciency

I have the following three questions
I want to use Google's API to translate text. I know that Google charges separately for translation and detection. Google translate also supports translation two ways to translate
i) By specifying both source and target, as in
https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&source=en&target=de&q=Hello%20world&q=My%20name%20is%20Jeff
ii) By specifying just the target, where the source us auto-detected,
like this https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&target=de&q=Hello%20world
My question is, if i call the API as in the second example, will I be charged for both detection and translation or just translation?
Is it more efficient when you specify both source and target than when you just the target, or, are there any downsides of using the second way above?
How many words should be sent to Google Translate API to detect a language reliably?
Thanks
I pretty much translate using the second approach most of the time (not informing to google the source language) and they only charge for the translation, not for the detection.
However, you must be aware of the fact that, in case your source text is of the same language as your target language, google will attempt to translate it anyways, and sometimes it leads to confused results, or at least a translation which was not necessary, since you already had the text in the desired language.

Resources