$language.detect

(Tries to) detect the language and encoding of a string
Usage
language.detect(<text: string>)
Description
Tries to detect the language and encoding of the string specified as [text]. The accuracy of the detection mainly depends on the length of the supplied text. Good results can be achieved with some thousands characters.
This command is exported by the "language" module.
Syntax Specification
<hash> language.detect(<text: string>)
Examples

%dati = $language.detect("I'm a lord and i speak perfect english.");
if(%dati{"error"} != "")echo "Language detection failed: " %dati{"error"};
%count = %dati{"matchcount"};
for(%i=0;%i<%count;%i++)
{
echo "LANGUAGE " %i " : " %dati{"matches"}[%i]{"language"};
echo "ENCODING " %i " : " %dati{"matches"}[%i]{"encoding"};
echo "SCORE " %i " : "%dati{"matches"}[%i]{"score"};
}
echo "ACCURACY: " %dati{"accuracy"};


Index, Functions
KVIrc 4.0.3.4984 Documentation
Generated by builder at Fri Nov 12 01:12:46 2010