Closed ChristianYeah closed 5 years ago
加载了自定义词后 Jieba::cut()没有问题 但是Posseg::cut() 无法分词
Jieba::init(); Jieba::loadUserDict('/Users/christian/Downloads/1.txt'); Finalseg::init(); Posseg::init(); $words = Jieba::cut('luckin30'); print_r($words); $words = Posseg::cut('luckin30'); print_r($words); die();
Array ( [0] => luckin [1] => 30 ) Array ( [0] => Array ( [word] => luckin30 [tag] => m ) )
加载了自定义词后 Jieba::cut()没有问题 但是Posseg::cut() 无法分词