开发者

Autodetect language of a text in Java (Android) [closed]

开发者 https://www.devze.com 2023-04-05 03:22 出处:网络
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 3 years ago.

开发者_如何学C Improve this question

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.

Thanks in advance


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.


Microsoft Translator has multiple APIs, including HTTP API - you should be able to use it and its Detect method

Unfortunately Google Translate is not an option.


Google Translate has an API


Google Translate which is deprecated was replaced by Google Translate v2 API, which is now a paid service ($20 / 1M chars). (word on the street is that free service was cancelled because of SEO optimizers used it to set fake sites).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号