自动检测Java中的文本语言(Android) [英] Autodetect language of a text in Java (Android)

查看:94
本文介绍了自动检测Java中的文本语言(Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的应用程序,我希望在给定文本的情况下检测其语言(例如ISO代码和机会)。我想知道是否有某种Web服务或java库这样做。

For my app I'd like to, given a text , detect its language (the ISO code and a chance for example). I'd like to know if there is some kind of web service or java library for doing so.

提前致谢

推荐答案

使用双字母分析算法自动检测文本的自然语言相对容易。您可以自己实现它,也可以只使用一些现有的库,例如语言检测项目。

Auto-detecting the natural language of a text is relatively easy using a bigram analysis algorithm. You can either implement it by yourself or simply use some existing library, e.g. Language-Detection project.

这篇关于自动检测Java中的文本语言(Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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