/**
  * @param string $token
  *
  * @return bool
  */
 private function isStopWord(string $token) : bool
 {
     return $this->stopWords && $this->stopWords->isStopWord($token);
 }
Exemple #2
0
 public function __construct()
 {
     parent::__construct($this->stopWords);
 }
Exemple #3
0
 public function testPolishStopWords()
 {
     $stopWords = StopWords::factory('Polish');
     $this->assertTrue($stopWords->isStopWord('wam'));
     $this->assertFalse($stopWords->isStopWord('transhumanizm'));
 }