Xunsearch PHP-SDK v1.4.9 API 参考文档

XSTokenizerSplit

包 XS.tokenizer
继承关系 class XSTokenizerSplit
实现接口 XSTokenizer
版本 1.0.0
源代码 sdk/php/lib/XSTokenizer.class.php
内置的分割分词器

Public 方法

隐去继承来的方法

名称描述定义于
__construct() XSTokenizerSplit
getTokens() XSTokenizerSplit

方法明细

__construct() 方法
public void __construct($arg=NULL)
$arg
源码: sdk/php/lib/XSTokenizer.class.php#L79 (显示)
public function __construct($arg = null)
{
    if (
$arg !== null && $arg !== '') {
        
$this->arg = $arg;
    }
}

getTokens() 方法
public void getTokens($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($this->arg, $value);
    }
    return 
explode($this->arg, $value);
}

Copyright © 2008-2011 by 杭州云圣网络科技有限公司
All Rights Reserved.