Offline language translation API [closed]

半城伤御伤魂 提交于 2019-11-30 07:08:48

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/41425218/offline-language-translation-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!