+ $this->assertEquals(100, count($oPhrase->getWordSets()));
+ }
+
+
+ public function testPartialTokensShortTerm()
+ {
+ $oPhrase = new Phrase('a b c d', '');
+ $oPhrase->computeWordSets(new TokensPartialSet(array('a', 'b', 'd', 'b c', 'b c d')));
+ $this->assertEquals(
+ '(a|b c d),(a|b c|d)',
+ $this->serializeSets($oPhrase->getWordSets())
+ );
+ }
+
+
+ public function testPartialTokensLongTerm()
+ {
+ $oPhrase = new Phrase(join(' ', array_fill(0, 18, 'a')), '');
+ $oPhrase->computeWordSets(new TokensPartialSet(array('a', 'a a a a a')));
+ $this->assertEquals(80, count($oPhrase->getWordSets()));