|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.lm.PruneTrieReader
public class PruneTrieReader
A PruneTrieReader filters a contained trie
reader by removing all subtrees whose counts fall below
a specified minimum.
| Constructor Summary | |
|---|---|
PruneTrieReader(TrieReader reader,
long minCount)
Construct a scaling trie reader wrapping the specified reader which deletes all subtrees with counts below the specified minimum. |
|
| Method Summary | |
|---|---|
long |
readCount()
Returns the count of the next tree. |
long |
readSymbol()
Returns the identifier of the symbol leading from the root of the current tree to the daughter subtree for the symbol, or -1 if there are no more subtrees for the current
node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PruneTrieReader(TrieReader reader,
long minCount)
throws IOException
reader - Contained reader.minCount - Minimum count to retain a subtree.
IllegalArgumentException - If the minimum count is negative.
IOException| Method Detail |
|---|
public long readCount()
TrieReader
readCount in interface TrieReader
public long readSymbol()
throws IOException
TrieReader-1 if there are no more subtrees for the current
node.
readSymbol in interface TrieReaderIOException - If there is an underlying I/O error.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||