We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
此Java 语言检测库对 53 种语言的准确率应达到 99% 以上。
另外,还有 Apache Tika,这是一个用于内容分析的库,它提供的不仅仅是语言检测。
This Language Detection Library for Java should give more than 99% accuracy for 53 languages.
Alternatively, there is Apache Tika, a library for content analysis that offers much more than just language detection.
这里有两个选项
Here are two options
Google 提供了一个 API 可以为您执行此操作。我昨天偶然发现了这个,没有保留链接,但如果你,嗯,谷歌搜索它,你应该设法找到它。
这与他们的翻译 API 的描述很接近,它将为您将文本翻译成您喜欢的任何语言。还有另一个调用只是为了猜测输入语言。
谷歌在机械翻译领域处于世界领先地位;他们的东西基于非常大的文本语料库(大多数互联网,有点)和统计方法,通常仅仅凭借拥有巨大的样本空间就可以“得到”正确的结果。
编辑:这是链接:http://code.google.com/apis/ajaxlanguage/
编辑2:如果您坚持“离线”:一个得到好评的答案是 Guess-Language 的建议。它是一个 C++ 库,可处理大约 60 种语言。
Google offers an API that can do this for you. I just stumbled across this yesterday and didn't keep a link, but if you, umm, Google for it you should manage to find it.
This was somewhere near the description of their translation API, which will translate text for you into any language you like. There's another call just for guessing the input language.
Google is among the world's leaders in mechanical translation; they base their stuff on extremely large corpuses of text (most of the Internet, kinda) and a statistical approach that usually "gets" it right simply by virtue of having a huge sample space.
EDIT: Here's the link: http://code.google.com/apis/ajaxlanguage/
EDIT 2: If you insist on "offline": A well upvoted answer was the suggestion of Guess-Language. It's a C++ library and handles about 60 languages.
另一种选择是 JLangDetect,但它不是很强大并且语言基础有限。好处是它是 Apache 许可证,如果它满足您的要求,您可以使用它。我在这里猜测,但是你在单跳和双跳事件之间释放空格键吗?
在 0.4 版本中它非常强大。我已经在自己的许多项目中使用了它,并且从未遇到过任何重大问题。此外,就速度而言,它可以与非常专业的语言检测器(例如,仅少数语言)相媲美。
An alternative is the JLangDetect but it's not very robust and has a limited language base. Good thing is it's an Apache license, if it satisfies your requirements, you can use it. I'm guessing here, but do you release the space key between the single and double jump event?
In version 0.4 it is very robust. I have been using this in many projects of my own and never had any major problems. Also, when it comes to speed it is comparable to very specialized language detectors (e.g., few languages only).
检测语言 API 还提供 Java 客户端。
例子:
Detect Language API also provides Java client.
Example:
这是另一个选项:Java 语言检测库
这是 Java 中的一个库。
here is another option : Language Detection Library for Java
this is a library in Java.
可以从以下位置下载配置文件:
https://language-detection.googlecode.com/files/langdetect -09-13-2011.zip
Profiles can be downloaded from:
https://language-detection.googlecode.com/files/langdetect-09-13-2011.zip