
Let's make something beautiful together
+44 920 090 505
See More Projects
composer require liliuwei/liliuwei-pscws4
使用:先引入分词类,然后实例化对象并使用
use liliuwei\pscws4\PSCWS4API;//引入分词类
$text = 'wekyun博客是一个分享开发中一些应用技术的博客!';
$pscws = new PSCWS4API('utf8'); $pscws->PSCWS4($text); //获取所有分词
$res = $pscws->PSCWS4_TOP($text, 4); //返回分词结果的词语按权重统计的前个4词
var_dump($res);
© Copyrights 2022 StreakyAlgo All rights reserved.