/** * 取文本的分词 * $text 待分词的文本 * return 返回词汇数组, 每个词汇是包含 [off:词在文本中的位置,attr:词性,word:词] * */ public function xs_getResult($text) { if (!$this->settings['App_textsearch']) { return FALSE; } @(include_once ROOT_PATH . 'lib/class/textsearch.class.php'); if (class_exists('textsearch')) { $ts = new textsearch(); return $ts->get_Result($text); } }