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.
Related
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)
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.
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.
E.g. - translating "amigo" from Spanish to English.
This gives a result ("friend"), which I'd expect in the API.
Does the API also offer the dictionary-like elements from that page like in the following image?
The API is not free to test, so I've been unable to see if it contains the result I want or not.
If not possible, can anyone suggest a different API for the purpose (multilingual dictionary, at least English -> other languages)?
No. The Google Translate API doesn't expose an endpoint for retrieving the dictionary-like elements you're asking about.
As of today the functions available through the API are for:
Translation of text
Detection of the source language of the given text
Listing which language codes the API supports.
There's no endpoint available for retrieving the audio for the translations either.
On the plus side, I've seen that the API has had its list of supported languages expanded regularly, though, and its language models have apparently been being updated.
Recommendations for other APIs to use is outside the scope of StackOverflow, but some Google searching should help you find what's available.
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.