离线语言翻译API [英] Offline language translation API

查看:67
本文介绍了离线语言翻译API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意,我知道这个问题以各种形式出现在多个地方,包括 stackoverflow,但我还没有看到令人满意的答案.

有几个非常可靠的语言翻译 A​​PI(例如,MicrosoftGoogle).它们是 HTTP RESTful API,适用于网络或移动应用以及在线模式下运行的应用.

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.

但是,我正在寻找一种语言翻译 A​​PI,它可以在没有互联网连接的情况下在离线模式下翻译短(或长)句.

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.

我的问题的另一个版本:谷歌翻译应用程序带有下载某些语言模型的选项,以允许它在离线模式下运行.是否有允许利用 Google 翻译的可下载模型进行离线翻译的 Android Java 库(官方或非官方;免费或付费)?

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?

推荐答案

没有可以单独在离线模式下运行的 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.

这篇关于离线语言翻译API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆