use of org.trie4j.tail.builder.SuffixTrieTailBuilder in project trie4j by takawitter.
the class TailPatriciaTrieWithSuffixTrieTailBuilderTest method investigate.
public void investigate() throws Exception {
Trie t = new TailPatriciaTrie(new SuffixTrieTailBuilder());
int start = 0;
int end = 5;
int i = 0;
for (String word : new WikipediaTitles()) {
if (i >= end)
break;
if (i >= start) {
t.insert(word);
System.out.println(word);
}
i++;
}
i = 0;
for (String word : new WikipediaTitles()) {
if (i >= end)
break;
if (i >= start)
Assert.assertTrue(i + "th word: " + word, t.contains(word));
i++;
}
}
Aggregations