org.terrier.structures.indexing
Class BlockFieldLexiconMap

java.lang.Object
  extended by org.terrier.structures.indexing.LexiconMap
      extended by org.terrier.structures.indexing.BlockLexiconMap
          extended by org.terrier.structures.indexing.BlockFieldLexiconMap

public class BlockFieldLexiconMap
extends BlockLexiconMap

BlockFieldLexiconMap class


Field Summary
protected  gnu.trove.TObjectIntHashMap<java.lang.String>[] field_tfs
           
protected  int fieldCount
           
 
Fields inherited from class org.terrier.structures.indexing.BlockLexiconMap
blockFreqs, numberOfBlocks, zerob, zerol
 
Fields inherited from class org.terrier.structures.indexing.LexiconMap
BUNDLE_AVG_UNIQUE_TERMS, nts, numberOfNodes, numberOfPointers, tfs
 
Constructor Summary
BlockFieldLexiconMap(int _fieldCount)
          Constructs an instance of the BlockFieldLexiconMap.
 
Method Summary
 void clear()
          Clear the lexicon map
protected  int[] getFieldFrequency(java.lang.String term)
           
 void insert(DocumentPostingList _doc)
          Inserts all the terms from a document posting into the lexicon map
 void storeToStream(LexiconOutputStream<java.lang.String> lexiconStream)
          Stores the lexicon tree to a lexicon stream as a sequence of entries.
 
Methods inherited from class org.terrier.structures.indexing.BlockLexiconMap
insert
 
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

fieldCount

protected final int fieldCount

field_tfs

protected final gnu.trove.TObjectIntHashMap<java.lang.String>[] field_tfs
Constructor Detail

BlockFieldLexiconMap

public BlockFieldLexiconMap(int _fieldCount)
Constructs an instance of the BlockFieldLexiconMap.

Parameters:
_fieldCount -
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 class BlockLexiconMap
Parameters:
_doc - The postinglist for that document. Assumed to be of type BlockFieldDocumentPostingList.

storeToStream

public void storeToStream(LexiconOutputStream<java.lang.String> lexiconStream)
                   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 class BlockLexiconMap
Parameters:
lexiconStream - The lexicon output stream to store to.
Throws:
java.io.IOException

clear

public void clear()
Description copied from class: BlockLexiconMap
Clear the lexicon map

Overrides:
clear in class BlockLexiconMap


Terrier 3.5. Copyright © 2004-2011 University of Glasgow