anl.aida.score
Class AbstractSTCScorer

java.lang.Object
  extended by anl.aida.score.AbstractSTCScorer
Direct Known Subclasses:
TFIDFScorer, TFScorer

public class AbstractSTCScorer
extends java.lang.Object

Abstract base class for scorers that use an STC. This does some caching of the term indices to improve speed.


Field Summary
protected  ScoredTermsCollection stc
           
private  java.util.Map<java.lang.String,java.lang.Integer> termIndexCache
           
 
Constructor Summary
AbstractSTCScorer(ScoredTermsCollection stc)
           
 
Method Summary
protected  int getTermIndex(java.lang.String term)
          Gets the stc term index for the specified term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stc

protected ScoredTermsCollection stc

termIndexCache

private java.util.Map<java.lang.String,java.lang.Integer> termIndexCache
Constructor Detail

AbstractSTCScorer

public AbstractSTCScorer(ScoredTermsCollection stc)
Method Detail

getTermIndex

protected int getTermIndex(java.lang.String term)
Gets the stc term index for the specified term.

Parameters:
term - the term whose index we want to get
Returns:
the stc term index for the specified term.