XSTokenizerScws All Packages | 方法(函数) 包 XS.tokenizer 继承关系 class XSTokenizerScws 实现接口 XSTokenizer 始于 1.3.1 版本 1.0.0 源代码 sdk/php/lib/XSTokenizer.class.php SCWS - 分词器(与搜索服务端通讯) Public ...
...ated before using ' . __CLASS__); } self::$_server = $xs->getScwsServer(); self::$_server->setTimeout(0); self::$_charset = $xs->getDefaultCharset(); // constants if (!defined('SCWS_MULTI_NONE')) { define('SCWS_MULTI_NONE', 0); define('...
setDict() 方法 public XSTokenizerScws setDict(string $fpath, int $mode=NULL) $fpath string 服务端的词典路径 $mode int 词典类型, 常量: SCWS_XDICT_XDB|SCWS_XDICT_TXT|SCWS_XDICT_MEM {return} XSTokenizerScws 返回对象本身以支持串接操作 源...
addDict() 方法 public XSTokenizerScws addDict(string $fpath, int $mode=NULL) $fpath string 服务端的词典路径 $mode int 词典类型, 常量: SCWS_XDICT_XDB|SCWS_XDICT_TXT|SCWS_XDICT_MEM {return} XSTokenizerScws 返回对象本身以支持串接操作 源...
setMulti() 方法 public XSTokenizerScws setMulti(int $mode=3) $mode int 复合选项, 值范围 0~15 默认为值为 3, 可使用常量组合: SCWS_MULTI_SHORT|SCWS_MULTI_DUALITY|SCWS_MULTI_ZMAIN|SCWS_MULTI_ZALL {return} XSTokenizerScws 返回对象本身以支持串接操...
getScwsServer() 方法 public XSServer getScwsServer() {return} XSServer 分词服务器 源码: sdk/php/lib/XS.class.php#L467 (显示) public function getScwsServer(){ if ($this->_scws === null) { $conn = isset($this->_config['server.search']) ? $this->_config['server....
...示) public function getVersion(){ $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_VERSION); $res = self::$_server->execCommand($cmd, XS_CMD_OK_INFO); return $res->buf;} 获取 scws 版本号
... $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_RESULT); while ($res->buf !== '') { $tmp = unpack('Ioff/a4attr/a*word', $res->buf); $tmp['word'] = XS::c...
setScwsMulti() 方法 (自版本 v1.4.7 起可用) public XSIndex setScwsMulti(int $level) $level int 要设置的分词复合等级 {return} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L331 (显示) public function setScwsMulti($...
setScwsMulti() 方法 (自版本 v1.4.7 起可用) public XSSearch setScwsMulti(int $level) $level int 要设置的分词复合等级 {return} XSSearch 返回自身对象以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L444 (显示) public function setScwsMult...