views:

335

answers:

1

Possible Duplicate:
Is there a Python library/class that can take a piece of text and determine the language?

How to detect the language of user submitted text (some keywords shorter than 30 chars in this case) natively in Python?

One method is to use Google AJAX Language API (Python Wrapper for Google AJAX Language API). I'm not sure if there is any daily query limit on single ip address?

+1  A: 

http://code.activestate.com/recipes/326576/:

Recipe 326576: Language detection using character trigrams

The Trigram class can be used to compare blocks of text based on their local structure, which is a good indicator of the language used. It could also be used within a language to discover and compare the characteristic footprints of various registers or authors. As all n-gram implementations should, it has a method to make up nonsense words.

The MYYN