org.terrier.matching.models.basicmodel
Class B

java.lang.Object
  extended by org.terrier.matching.models.basicmodel.BasicModel
      extended by org.terrier.matching.models.basicmodel.B
All Implemented Interfaces:
java.io.Serializable

public class B
extends BasicModel

This class implements the B basic model for randomness. B stands for Bose-Einstein statistics.

Author:
Ben He
See Also:
Serialized Form

Field Summary
protected  java.lang.String modelName
          The name of the model.
 
Fields inherited from class org.terrier.matching.models.basicmodel.BasicModel
i, numberOfDocuments, numberOfTokens
 
Constructor Summary
B()
          A default constructor.
 
Method Summary
 java.lang.String getInfo()
          Returns the name of the model.
 double score(double tf, double documentFrequency, double termFrequency, double keyFrequency, double documentLength)
          This method computes the score for the implemented weighting model.
 
Methods inherited from class org.terrier.matching.models.basicmodel.BasicModel
setNumberOfDocuments, setNumberOfTokens, stirlingPower
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelName

protected java.lang.String modelName
The name of the model.

Constructor Detail

B

public B()
A default constructor.

Method Detail

getInfo

public java.lang.String getInfo()
Returns the name of the model.

Specified by:
getInfo in class BasicModel
Returns:
the name of the model

score

public double score(double tf,
                    double documentFrequency,
                    double termFrequency,
                    double keyFrequency,
                    double documentLength)
This method computes the score for the implemented weighting model.

Specified by:
score in class BasicModel
Parameters:
tf - The term frequency in the document
documentFrequency - The document frequency of the term
termFrequency - the term frequency in the collection
keyFrequency - The normalised query term frequency.
documentLength - The length of the document.
Returns:
the score returned by the implemented weighting model.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow