You pass the string, and it outputs the language: english/spanish/japanese. Is there such library, and is it efficient?
views:
246answers:
3
+7
A:
Yes, there is a great library named NLTK, the natural language toolkit. There is a free online book about it that covers the topic of detecting languages.
Gattster
2010-01-08 01:51:27
+5
A:
Google's Translation API supports detecting languages, try to follow this link: http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=Ciao%20mondo
The output is JSON encoded and look like this:
{"responseData": {"language":"it","isReliable":false,"confidence":0.1805579}, "responseDetails": null, "responseStatus": 200}
For more usage details check the reference.
Nadia Alramli
2010-01-08 02:17:38
+1, great, I was about to mention same thing.
S.Mark
2010-01-08 02:20:35
Good suggestion. That is probably much more practical than NLTK for most cases. Also it doesn't require reading a book.
Gattster
2010-01-08 02:28:07
+3
A:
If you need language guessing offline, try guess-language, I've used it myself and it is neat. According to the project site, it currently detects 60 languages based on trigram similarity.
PhilS
2010-01-08 09:29:37