public class PruneTrieReader extends Object
PruneTrieReader filters a contained trie
reader by removing all subtrees whose counts fall below
a specified minimum.| Constructor and Description |
|---|
PruneTrieReader(TrieReader reader,
long minCount)
Construct a scaling trie reader wrapping the specified
reader which deletes all subtrees with counts below the
specified minimum.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
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.IOExceptionpublic long readCount()
TrieReaderreadCount in interface TrieReaderpublic 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.Copyright © 2019 Alias-i, Inc.. All rights reserved.