Download the PHP package javareact/splitword without Composer
On this page you can find all versions of the php package javareact/splitword. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package splitword
VicWord 一个纯php的分词
安装
分词说明
- 含有3种切分方法
getWord
长度优先切分 。最快getShortWord
细粒度切分。比最快慢一点点getAutoWord
自动切分 (在相邻词做了递归) 。效果最好
- 可自定义词典,自己添加词语到词库,词库支持文本格式
json
和二级制格式igb
二进制格式词典小,加载快 dict.igb
含有175662个词,欢迎大家补充词语到dict.txt
,格式(词语 \t idf \t 词性)- idf 获取方法 百度搜索这个词语
Math.log(100000001/结果数量)
,如果你有更好的方法欢迎补充。 - 词性 [标点符号,名词,动词,形容词,区别词,代词,数词,量词,副词,介词,连词,助词,语气词,拟声词,叹词] 取index ;标点符号取0
- idf 获取方法 百度搜索这个词语
- 三种分词结果对比
$fc = new VicWord('igb'); $arr = $fc->getWord('北京大学生喝进口红酒,在北京大学生活区喝进口红酒'); //北京大学|生喝|进口|红酒|,|在|北京大学|生活区|喝|进口|红酒 //$arr 是一个数组 每个单元的结构[词语,词语位置,词性,这个词语是否包含在词典中] 这里只值列出了词语
$arr = $fc->getShortWord('北京大学生喝进口红酒,在北京大学生活区喝进口红酒'); //北京|大学|生喝|进口|红酒|,|在|北京|大学|生活|区喝|进口|红酒
$arr = $fc->getAutoWord('北京大学生喝进口红酒,在北京大学生活区喝进口红酒'); //北京|大学生|喝|进口|红酒|,|在|北京大学|生活区|喝|进口|红酒
//对比 //qq的分词和百度的分词 http://nlp.qq.com/semantic.cgi#page2 http://ai.baidu.com/tech/nlp/lexical
All versions of splitword with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0.0
ext-json Version *
ext-mbstring Version *
ext-json Version *
ext-mbstring Version *
The package javareact/splitword contains the following files
Loading the files please wait ....