mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Add pear/Text_LanguageDetect to Composer/vendor
- Updated mobiledetectlib to 2.8.26 - Updated PEAR to 1.10.5 - Updated Archive_Tar to 1.4.3 - Updated XML_Util to 1.4.3
This commit is contained in:
parent
93fd189198
commit
7d876aab98
109 changed files with 6517 additions and 243 deletions
35
vendor/pear/text_languagedetect/docs/example_clui.php
vendored
Normal file
35
vendor/pear/text_languagedetect/docs/example_clui.php
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* example usage (CLI)
|
||||
*
|
||||
* @package Text_LanguageDetect
|
||||
* @version CVS: $Id$
|
||||
*/
|
||||
|
||||
require_once 'Text/LanguageDetect.php';
|
||||
|
||||
$l = new Text_LanguageDetect;
|
||||
|
||||
$stdin = fopen('php://stdin', 'r');
|
||||
|
||||
echo "Supported languages:\n";
|
||||
$langs = $l->getLanguages();
|
||||
sort($langs);
|
||||
echo join(', ', $langs);
|
||||
|
||||
echo "\ntotal ", count($langs), "\n\n";
|
||||
|
||||
while ($line = fgets($stdin)) {
|
||||
$result = $l->detect($line, 4);
|
||||
print_r($result);
|
||||
$blocks = $l->detectUnicodeBlocks($line, true);
|
||||
print_r($blocks);
|
||||
}
|
||||
|
||||
fclose($stdin);
|
||||
unset($l);
|
||||
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue