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 questionFor 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).
精彩评论