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