且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

离线语言翻译API

更新时间:2023-02-20 22:00:26

没有可以单独在离线模式下运行的 Web API,没有提供一些离线功能的客户端库组件,因为 Web API 的本质是您正在向外部主机发出请求.

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.

剩下的就是客户端库了.离线谷歌翻译Microsoft Translator offline 存在,但这些是作为应用程序实现的,而不是作为开发人员可访问的客户端库.成熟的翻译库以 Apache JoshuaStanford Phrasal,但是这些是基于统计而不是神经模型.

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.

如果您正在寻找一个完美的 Java 库,用于离线、基于神经的翻译,并且已经开发并准备好使用,那么您就不走运了.现在你需要自己动手,例如你提到的使用 TensorFlow 和示例模型.翻译服务提供商使用的经过训练的模型有点像秘密武器",因此不太可能很快免费提供给开发人员用于离线翻译,但完全有可能高质量的开源或以其他方式免费翻译模型将由 ML 社区或第三方开发和发布.

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.