|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.LexiconOutputStream<KEY>
KEY
- public abstract class LexiconOutputStream<KEY>
This class implements an output stream for the lexicon structure.
Field Summary | |
---|---|
protected java.io.DataOutput |
lexiconStream
A data input stream to read from the bufferInput. |
protected long |
numPointersWritten
Pointer written - the sum of the Nts |
protected int |
numTermsWritten
|
protected long |
numTokensWritten
collection length - the sum of the TFs |
Constructor Summary | |
---|---|
protected |
LexiconOutputStream()
|
Method Summary | |
---|---|
void |
close()
Closes the lexicon stream. |
long |
getNumberOfPointersWritten()
Returns the number of pointers there would be in an inverted index built using this lexicon (thus far). |
int |
getNumberOfTermsWritten()
Returns the number of terms written so far by this LexiconOutputStream |
long |
getNumberOfTokensWritten()
Returns the number of tokens there are in the entire collection represented by this lexicon (thus far). |
protected void |
incrementCounters(EntryStatistics t)
|
abstract int |
writeNextEntry(KEY _key,
LexiconEntry _value)
Writes a lexicon entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.DataOutput lexiconStream
protected long numPointersWritten
protected long numTokensWritten
protected int numTermsWritten
Constructor Detail |
---|
protected LexiconOutputStream()
Method Detail |
---|
public void close()
close
in interface java.io.Closeable
public abstract int writeNextEntry(KEY _key, LexiconEntry _value) throws java.io.IOException
_key
- the key - usually the term_value
- the lexicon entry value
java.io.IOException
- if an I/O error occursprotected void incrementCounters(EntryStatistics t)
public long getNumberOfPointersWritten()
public long getNumberOfTokensWritten()
public int getNumberOfTermsWritten()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |