Exemplo n.º 1
0
 public function testSanitizeByStopwords()
 {
     $instance = new Sanitizer('Foo bar foobar');
     $stopwordAnalyzer = new StopwordAnalyzer();
     $stopwordAnalyzer->setCustomStopwordList(array('zh' => array('bar')));
     $this->assertEquals('Foo foobar', $instance->sanitizeBy($stopwordAnalyzer));
 }
Exemplo n.º 2
0
 public function testCustomStopwordList()
 {
     $instance = new StopwordAnalyzer();
     $instance->setCustomStopwordList(array('zoo' => array('Foo')));
     $this->assertTrue($instance->isStopWord('Foo'));
 }