Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing
Class BlockLexiconMap

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.LexiconMap
      extended by uk.ac.gla.terrier.structures.indexing.BlockLexiconMap

public class BlockLexiconMap
extends LexiconMap

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


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 _lexiconStream)
          Stores the lexicon map to a lexicon stream as a sequence of entries.
 
Methods inherited from class uk.ac.gla.terrier.structures.indexing.LexiconMap
getNumberOfNodes, getNumberOfPointers, insert
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockLexiconMap

public BlockLexiconMap()
Method Detail

insert

public void insert(java.lang.String term,
                   int tf,
                   int blockfreq)
Inserts a new term in the lexicon map.

Parameters:
term - The term to be inserted.
tf - The id of the term.

clear

public void clear()
Clear the lexicon map

Overrides:
clear in class LexiconMap

insert

public void insert(DocumentPostingList _doc)
Inserts all the terms from a document posting into the lexicon map

Overrides:
insert in class LexiconMap
Parameters:
_doc - The postinglist for that document - must be a instance of BlockDocumentPostingList.

storeToStream

public void storeToStream(LexiconOutputStream _lexiconStream)
                   throws java.io.IOException
Stores the lexicon map to a lexicon stream as a sequence of entries.

Overrides:
storeToStream in class LexiconMap
Parameters:
_lexiconStream - The lexicon output stream to store to.
Throws:
java.io.IOException

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow