PHP code example of liliuwei / liliuwei-pscws4
1. Go to this page and download the library: Download liliuwei/liliuwei-pscws4 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
liliuwei / liliuwei-pscws4 example snippets
namespace liliuwei\pscws4;
$text = 'GitHub是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名GitHub。';
$o= new \liliuwei\pscws4\PSCWS4API();
$o->PSCWS4($text); //获取所有分词
$o->PSCWS4_TOP($text); //返回分词结果的词语按权重统计的前 N 个词