Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google transliterate vs translate api

We want to transliterate sentences from English to Hindi using google cloud services or any other similar/scaled platform.

Currently we started using google translate as its transliterate api is deprecated now.

But the issue is, its translating it basis actual sentiments that we don't want:

Example:

English (Lemon Tree) ---google translate in hindi--- नींबू का पेड़

What we intend for our use case is :

English (Lemon Tree) ---google translate in hindi--- लेमन ट्री

Is there any workaround in current translation api to get transliteration or any better/stable , similar cost api which we can use for solving this use case.

Api Sources :

Currently getting used : https://cloud.google.com/translate/

Deprecated but working well: https://developers.google.com/transliterate/

like image 549
abhinsit Avatar asked Mar 12 '18 06:03

abhinsit


People also ask

Does Google have a translation API?

It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents: https://translate.googleapis.com/$discovery/rest?version=v3.

How accurate is Google Translate API?

The answer to how accurate Google translate is is 85%, according to a survey conducted by Google in 2017. Google Translate is a simple-to-use software that allows you to interact quickly and learn foreign languages. The translation service switches text and speech back into any language.

Can Google Translate do transliteration?

To use transliteration, the first step is to enable Input Tools. Follow instructions to enable Input Tools in Search, Gmail, Google Drive, Youtube, Translate, Chrome and Chrome OS. Transliteration is represented by a character from the language, such as .


1 Answers

An easy workaround if you want to use Google cloud translation api, is to pass :
(My name is "YOUR_TEXT_HERE")
as input to google Cloud Translation API and that will give you desired transliterated text inside double quotes "...". Then you can extract out your transliteration that is within " ".

In your example:
Pass Input: (My name is "Lemon Tree")
Output: (मेरा नाम "लेमन ट्री" है)

NOTE: This will unnecessarily increase your character count and hence your service bill.

like image 148
Saurabh Chauhan Avatar answered Sep 30 '22 05:09

Saurabh Chauhan