KEY
- public abstract class LexiconOutputStream<KEY> extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected 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
|
Modifier | Constructor and Description |
---|---|
protected |
LexiconOutputStream() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected DataOutput lexiconStream
protected long numPointersWritten
protected long numTokensWritten
protected int numTermsWritten
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public abstract int writeNextEntry(KEY _key, LexiconEntry _value) throws IOException
_key
- the key - usually the term_value
- the lexicon entry valueIOException
- if an I/O error occursprotected void incrementCounters(EntryStatistics t)
public long getNumberOfPointersWritten()
public long getNumberOfTokensWritten()
public int getNumberOfTermsWritten()
Terrier 4.0. Copyright © 2004-2014 University of Glasgow