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

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

问题描述

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

那里有几种相当不错的语言翻译API(例如, Microsoft Google ).它们是HTTP RESTful API,适用于Web或移动应用程序以及以在线模式运行的应用程序.

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.

但是,我正在寻找一种语言翻译API,当没有Internet连接可用时,该API可以离线模式翻译短(或长)句子.

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库(官方或非官方;免费或付费),可以利用Google Translate的可下载模型进行离线翻译?

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.

剩下客户端库. 离线Google翻译 Microsoft Translator脱机存在,但它们是作为应用程序实现的,不会暴露为开发人员可访问的客户端库.成熟的翻译库以 Apache Joshua

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天全站免登陆