From: micathom Date: 2007-05-09T17:10:07+09:00 Subject: Re: Natural language detection library > thx, I don't have a clue how it works, but it's great ;-) You need some base corpus/sample (I use the GPL License) for each language and calculate an index number for this on initiatlization. Then you compare a sample text's index with the base index. An example for how to use this can be found at: http://deplate.cvs.sourceforge.net/deplate/deplate/lib/deplate/mod/guesslanguage.rb?view=markup First call #register(language_name, text) for each corpus, then call #guess_with_diff(text) to guess a text's language.