|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.indexing.LexiconMap org.terrier.structures.indexing.BlockLexiconMap
public class BlockLexiconMap
LexiconMap implementation that also keeps track of the number of blocks that a term occurrs in. This is useful for sizing the block inverted index
Field Summary | |
---|---|
protected gnu.trove.TObjectIntHashMap<java.lang.String> |
blockFreqs
Mapping term to blocks |
protected long |
numberOfBlocks
Total number of blocks in this index |
protected static byte |
zerob
|
protected static long |
zerol
|
Fields inherited from class org.terrier.structures.indexing.LexiconMap |
---|
BUNDLE_AVG_UNIQUE_TERMS, nts, numberOfNodes, numberOfPointers, tfs |
Constructor Summary | |
---|---|
BlockLexiconMap()
|
Method Summary | |
---|---|
void |
clear()
Clear the lexicon map |
void |
insert(DocumentPostingList _doc)
Inserts all the terms from a document posting into the lexicon map |
void |
insert(java.lang.String term,
int tf,
int blockfreq)
Inserts a new term in the lexicon map. |
void |
storeToStream(LexiconOutputStream<java.lang.String> lexiconStream)
Stores the lexicon map to a lexicon stream as a sequence of entries. |
Methods inherited from class org.terrier.structures.indexing.LexiconMap |
---|
getNumberOfNodes, getNumberOfPointers, insert |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final byte zerob
protected static final long zerol
protected long numberOfBlocks
protected final gnu.trove.TObjectIntHashMap<java.lang.String> blockFreqs
Constructor Detail |
---|
public BlockLexiconMap()
Method Detail |
---|
public void insert(java.lang.String term, int tf, int blockfreq)
term
- The term to be inserted.tf
- The id of the term.public void clear()
clear
in class LexiconMap
public void insert(DocumentPostingList _doc)
insert
in class LexiconMap
_doc
- The postinglist for that document - must be a instance of BlockDocumentPostingList.public void storeToStream(LexiconOutputStream<java.lang.String> lexiconStream) throws java.io.IOException
storeToStream
in class LexiconMap
lexiconStream
- The lexicon output stream to store to.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |