6 * @package Text_LanguageDetect
7 * @version CVS: $Id: example_clui.php 322305 2012-01-15 00:04:17Z clockwerx $
10 require_once 'Text/LanguageDetect.php';
12 $l = new Text_LanguageDetect;
14 $stdin = fopen('php://stdin', 'r');
16 echo "Supported languages:\n";
17 $langs = $l->getLanguages();
19 echo join(', ', $langs);
21 echo "\ntotal ", count($langs), "\n\n";
23 while ($line = fgets($stdin)) {
24 $result = $l->detect($line, 4);
26 $blocks = $l->detectUnicodeBlocks($line, true);
33 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */