Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offline language translation API [closed]

Tags:

Please note that I am aware that this question has appeared in various forms at several places, including stackoverflow, but I have yet to see a satisfying answer.

There are several pretty solid language translation APIs out there (eg., Microsoft and Google). They are HTTP RESTful APIs that work well for web or mobile applications, apps that operate in online mode.

However, I am looking for a language translation API that can translate short (or long) sentences in offline mode, when no Internet connectivity is available.

Another version of my question: Google Translate app comes with an option to download certain language models to allow it to operate in offline mode. Is there an Android Java library (official or unofficial; free or paid) that allows leveraging Google Translate's downloadable models for offline translations?

like image 518
Anurag Bhandari Avatar asked Jan 02 '17 10:01

Anurag Bhandari


People also ask

Can I use Google Translate API offline?

When you're traveling somewhere without access to the internet or don't want to use your data plan, you can still use the Google Translate app on Android and iOS when your phone is offline.

Why can't I use Google Translate offline?

To use Google Translate while offline, you'll need to download the languages you want onto your phone. Google Translate offers dozens of languages for use offline, and you should check back often to find new languages and make sure your dictionary is up-to-date.

Is there a translator that works offline?

How to use Google Translate offline : Download the Google Translate app free from the app store. Open the app, and check that the language you want to download is one of the two at the top of your screen. If it isn't, click on the Translate To or Translate From side of the screen and select the language you want.

Can I use Google Translate API for free?

The official Google Translate API is available for businesses only but you can use Google Apps Script to create your own Google Language Translation API without having to pay the enterprise license fee.


1 Answers

There are no web APIs that could operate in offline mode alone, without a client library component providing some offline functionality, since the nature of a web API is that that you are making requests to an external host.

That leaves client libraries. Both Google Translate offline and Microsoft Translator offline exist, but these are implemented as applications and not exposed as a developer accessible client library. Mature translation libraries exist in the form of Apache Joshua and Stanford Phrasal, however these are based on statistical rather than neural models.

If you're looking for the one perfect Java library for offline, neural based translation that has already been developed and ready to use you'd be out of luck. For now you'd need to roll your own, for example as you've mentioned using TensorFlow and the sample models. The trained models used by translation service providers are somewhat of a "secret sauce", so it is unlikely these would be made available to developers for free any time soon for use in offline translation, but its completely possible that quality open source or otherwise free translation models will be developed and released by the ML community or third parties.

like image 95
Adam Avatar answered Sep 28 '22 05:09

Adam