...$value, $doc=NULL) $value $doc 源码: sdk/php/lib/XSTokenizer.class.php#L147 (显示) public function getTokens($value, XSDocument $doc = null){ $terms = array(); $i = $this->arg; while (true) { $terms[] = substr($value, 0, $i); if ($i >= strlen($valu...
...$value, $doc=NULL) $value $doc 源码: sdk/php/lib/XSTokenizer.class.php#L86 (显示) public function getTokens($value, XSDocument $doc = null){ if (strlen($this->arg) > 2 && substr($this->arg, 0, 1) == '/' && substr($this->arg, -1, 1) == '/') { return preg_split($...
...ing getVersion() {return} string 版本号 源码: sdk/php/lib/XSTokenizer.class.php#L327 (显示) 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;} ...
setIgnore() 方法 public XSTokenizerScws setIgnore(bool $yes=true) $yes bool 是否忽略 {return} XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L256 (显示) public function setIgnore($yes = true){ $this->_setting['...
... return false; } return (!$this->hasIndex() || $this->tokenizer !== XSTokenizer::DFL);} 判断当前字段的索引是否为布尔型 目前只有内置分词器支持语法型索引, 自 1.0.1 版本起把非索引字段也视为布尔便于判断
setCharset() 方法 public XSTokenizerScws setCharset(string $charset) $charset string {return} XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L242 (显示) public function setCharset($charset){ self::$_charset = strt...
setDuality() 方法 public XSTokenizerScws setDuality(bool $yes=true) $yes bool 是否开启散字自动二分组合功能 {return} XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L316 (显示) public function setDuality($...
... bool 文本中是否包含指定词性的词汇 源码: sdk/php/lib/XSTokenizer.class.php#L382 (显示) public function hasWord($text, $xattr){ $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_HAS_WORD, 0, $text, $xattr); $res = self::$_se...
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 返回对象本身以支持串接操...
...rg string 复合等级参数,默认不指定 源码: sdk/php/lib/XSTokenizer.class.php#L188 (显示) public function __construct($arg = null){ if (self::$_server === null) { $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should...