...$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...
... public void __construct($arg=NULL) $arg 源码: sdk/php/lib/XSTokenizer.class.php#L106 (显示) public function __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = intval($arg); if ($this->arg < 1 || $this->arg > 255) { throw new XSE...
... public void __construct($arg=NULL) $arg 源码: sdk/php/lib/XSTokenizer.class.php#L137 (显示) public function __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = intval($arg); if ($this->arg < 1 || $this->arg > 255) { throw new XSE...
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...
...s 分词 xunsearch好像集成了 scws 对于分词 xunsearch 可以通过 XSTokenizer 扩展 我想问的是 既然是 集成scws 那么 1.有没有提供scws的api接口,实现短语分词功能 2.是否可以对scws自定义中文词典,方便扩展