Пример #1
0
 /**
  * 标准分词测试
  */
 public function testIndex()
 {
     echo "test...\n";
     $split = new Split();
     var_dump($split->start("您好phpSplit,不管怎么说你开心就好"));
     $this->assertTrue(True);
 }
Пример #2
0
 public static function start($string)
 {
     // TODO 分词+原句
     $split = new Split();
     $strings = $split->start($string);
     self::filter($strings);
     // abc
     // a
     // a - b
     // a - b - c
     $strings[] = $string;
     // TODO 过滤
     return self::generate($strings);
 }