PHP code example of mr-jiawen / analysis
1. Go to this page and download the library: Download mr-jiawen/analysis 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/ */
mr-jiawen / analysis example snippets
$result = $ananlysis->cut('好好学习天天上上'); // 最初的分词结果
$result = $ananlysis->cut('好好学习天天上上','encode_array'); //转码到utf8并且去除特殊字符,得到其字符串结果
$result = $ananlysis->cut('好好学习天天上上','encode_array'); //转码到utf8并且去除特殊字符,得到其数组结果