From: Thomas Nitsche Date: 2007-05-09T18:35:05+09:00 Subject: Re: Natural language detection library Sorry, I meant I have no idea how the algorithm is working. The code itself works like a charm. Actually I'm using the "Declaration of Human Rights" ;-) Cheers, Thomas On May 9, 10:08 am, micathom wrote: > > 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/gu... > > First call #register(language_name, text) for each corpus, then call > #guess_with_diff(text) to guess a text's language.