Package org.terrier.structures.indexing
Class FieldLexiconMap
- java.lang.Object
-
- org.terrier.structures.indexing.LexiconMap
-
- org.terrier.structures.indexing.FieldLexiconMap
-
public class FieldLexiconMap extends LexiconMap
class FieldLexicanMap
-
-
Field Summary
Fields Modifier and Type Field Description protected gnu.trove.TObjectIntHashMap<java.lang.String>[]
field_tfs
protected int
fieldCount
-
Fields inherited from class org.terrier.structures.indexing.LexiconMap
BUNDLE_AVG_UNIQUE_TERMS, maxtfs, nts, numberOfNodes, numberOfPointers, tfs
-
-
Constructor Summary
Constructors Constructor Description FieldLexiconMap(int _fieldCount)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the lexicon mapprotected int[]
getFieldFrequency(java.lang.String term)
void
insert(DocumentPostingList _doc)
Inserts all the terms from a document posting into the lexicon mapvoid
storeToStream(LexiconOutputStream<java.lang.String> lexiconStream, TermCodes termCodes)
Stores the lexicon tree to a lexicon stream as a sequence of entries.-
Methods inherited from class org.terrier.structures.indexing.LexiconMap
getNumberOfNodes, getNumberOfPointers, insert
-
-
-
-
Method Detail
-
getFieldFrequency
protected int[] getFieldFrequency(java.lang.String term)
-
insert
public void insert(DocumentPostingList _doc)
Inserts all the terms from a document posting into the lexicon map- Overrides:
insert
in classLexiconMap
- Parameters:
_doc
- The postinglist for that document. Assumed to be a FieldDocumentPostingList.
-
storeToStream
public void storeToStream(LexiconOutputStream<java.lang.String> lexiconStream, TermCodes termCodes) throws java.io.IOException
Stores the lexicon tree to a lexicon stream as a sequence of entries. The binary tree is traversed in order, by called the method traverseAndStoreToStream.- Overrides:
storeToStream
in classLexiconMap
- Parameters:
lexiconStream
- The lexicon output stream to store to.- Throws:
java.io.IOException
-
clear
public void clear()
Description copied from class:LexiconMap
Clear the lexicon map- Overrides:
clear
in classLexiconMap
-
-