com.sun.labs.minion.retrieval
Class Okapi

java.lang.Object
  extended by com.sun.labs.minion.retrieval.Okapi
All Implemented Interfaces:
WeightingFunction

public class Okapi
extends java.lang.Object
implements WeightingFunction

A class implementing the Okapi term weighting function.


Field Summary
protected static java.lang.String logTag
           
 
Constructor Summary
Okapi()
           
 
Method Summary
 float initTerm(WeightingComponents wc)
          Initializes the TFIDF weighting function for the given term, calculating the collection-level IDF component, which is returned.
 float termWeight(WeightingComponents wc)
          Calculates the weight for a particular term in a particular document, given a set of weighting components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logTag

protected static java.lang.String logTag
Constructor Detail

Okapi

public Okapi()
Method Detail

initTerm

public float initTerm(WeightingComponents wc)
Initializes the TFIDF weighting function for the given term, calculating the collection-level IDF component, which is returned.

Specified by:
initTerm in interface WeightingFunction
Parameters:
wc - a set of weighting components.
Returns:
the collection-level weight associated with this term.
See Also:
WeightingComponents.wt

termWeight

public float termWeight(WeightingComponents wc)
Calculates the weight for a particular term in a particular document, given a set of weighting components.

Specified by:
termWeight in interface WeightingFunction
Parameters:
wc - a set of weighting components.
Returns:
the weight of the given term in the given document.