Closed LazyYangi closed 2 years ago
Call to undefined function Home\Model\scws_new() private function segment($text) { $outText = array(); //实例化 $so = scws_new(); //字符集 $so->set_charset('utf8'); //处理 $so->send_text($text);
//便利出需要的数组 while ($res = $so->get_result()) { foreach ($res as $v) { $outText[] = isset($v['word']) ? strtoupper($v['word']) : ""; } } //关闭 $so->close(); return $outText; }
https://github.com/xiaobeicn/text-similarity-php/blob/master/TextSimilarity.class.php#L117
Call to undefined function Home\Model\scws_new() private function segment($text) { $outText = array(); //实例化 $so = scws_new(); //字符集 $so->set_charset('utf8'); //处理 $so->send_text($text);