Offline Language Translation API

Please note that I know that this question appeared in different forms in several places, including stackoverflow, but I have not yet found a satisfactory answer.

There are several fairly complex language translation APIs (e.g. Microsoft and Google ). These are RESTful HTTP APIs that work well for web or mobile apps, online apps.

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

Another version of my question: The Google Translate application comes with the ability to download certain language models, allowing it to work offline. Is there an Android Java library (official or unofficial, free or paid) that allows you to use downloadable Google Translate models for offline translations?

+14
source share
1 answer

There is no web API that could work offline without a client library component that provides some autonomous functions, because the nature of the web API is that you make requests to an external host.

This leaves the client libraries. There are both Google Translate offline and Microsoft Translator offline , but they are implemented as applications and do not appear as a client library available to developers. Mature translation libraries exist in the form of Apache Joshua and Stanford Phrasal , but they are based on statistical rather than neural models.

If you're looking for the perfect Java library for offline translation based on neurons that is already designed and ready to use, you're out of luck. For now, you need to roll your own, for example, as you mentioned, using TensorFlow and sample models . The trained models used by translation service providers are a kind of "secret sauce", so it is unlikely that they will be provided to developers for free in the near future for use in offline translation, but it is quite possible that this is high-quality open source code or otherwise free. Translation models will be developed and released by the ML community or third parties.

+16
source

Source: https://habr.com/ru/post/1013699/


All Articles