|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.lm.BitTrieWriter
public class BitTrieWriter
A BitTrieWriter provides a trie writer that wraps a
bit-level output.
The reader for the output of a bit trie writer is BitTrieReader.
Counts of trie nodes and differences between
successive symbols on transitions are delta coded for compression
(see BitOutput.writeDelta(long)).
The method copy(TrieReader,TrieWriter) is available to
copy the contents of a reader to a writer.
| Constructor Summary | |
|---|---|
BitTrieWriter(BitOutput bitOutput)
Construct a bit trie writer from the specified bit output with the specified maximum n-gram. |
|
| Method Summary | |
|---|---|
static void |
copy(TrieReader reader,
TrieWriter writer)
Copies the content of the specified trie reader to the specified trie writer. |
void |
writeCount(long count)
Writes the specified count for the next sub-trie. |
void |
writeSymbol(long symbol)
Writes the specified symbol for the next daughter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitTrieWriter(BitOutput bitOutput)
bitOutput - Underlying bit output.| Method Detail |
|---|
public void writeCount(long count)
throws IOException
TrieWriter
writeCount in interface TrieWritercount - Count to write.
IOException - If there is an underlying I/O error.
public void writeSymbol(long symbol)
throws IOException
TrieWriterThe symbol -1 must be written following the last
daughter of a tree.
writeSymbol in interface TrieWritersymbol - Symbol to write.
IOException - If there is an underlying I/O error.
public static void copy(TrieReader reader,
TrieWriter writer)
throws IOException
reader - Reader from which to read.writer - Writer to which to write.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||