wdmg / lingua-detect
根据源文本来检测语言。
1.0.1
2020-05-06 23:23 UTC
Requires
- php: >=5.6
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
This package is auto-updated.
Last update: 2024-09-07 08:53:23 UTC
README
LinguaDetect
根据源文本来检测语言。
基于字母表和语言识别图。它描述了可以用来高精度确定文档语言的简单线索。了解更多 [https://en.wikipedia.org/wiki/Wikipedia:Language_recognition_chart]
支持 en
、ru
、uk
、fr
、es
、de
、it
、pl
、hu
、el
区域设置。
要求
- PHP 5.6 或更高版本
安装
要安装库,请在控制台中运行以下命令
$ composer require "wdmg/lingua-detect"
使用方法
<?php
$text = 'Chicago has many historic places to visit. Keith found the Chicago Water Tower impressive as it is one
of the few remaining landmarks to have survived the Great Chicago Fire of 1871.';
$detector = new LinguaDetect();
print $detector->process($text);
?>
状态和版本 [准备使用]
- v.1.0.1 - 添加了命名空间
- v.1.0.0 - 添加了 LinguaDetect() 类
版权
- 版权(c)2020 W.D.M.Group,乌克兰(https://wdmg.com.ua/)
- 版权(c)2020 由 Alexsander Vyshnyvetskyy alex.vyshnyvetskyy@gmail.com