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