PHP code example of zetaiota / func

1. Go to this page and download the library: Download zetaiota/func 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/ */

    

zetaiota / func example snippets


composer 

$content = "北京大学生喝进口红酒,在北京大学生活区喝进口红酒";
Dict::participle($content); //参数说明:$content(分词内容) $participle_type(分词切割类型) $type(读取字典类型)
//北京大学|生喝|进口|红酒|,|在|北京大学|生活区|喝|进口|红酒
//$arr 是一个数组 每个单元的结构[词语,词语位置,词性,这个词语是否包含在词典中] 这里只值列出了词语