Class In
- java.lang.Object
-
- org.terrier.matching.models.basicmodel.BasicModel
-
- org.terrier.matching.models.basicmodel.In
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class In extends BasicModel
This class implements the In basic model for randomness.- Author:
- Ben He
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
modelName
The name of the model.protected double
numberOfDocuments
The number of documents in the whole collection.-
Fields inherited from class org.terrier.matching.models.basicmodel.BasicModel
i, numberOfTokens
-
-
Constructor Summary
Constructors Constructor Description In()
A default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
clone, setNumberOfDocuments, setNumberOfTokens, stirlingPower
-
-
-
-
Method Detail
-
getInfo
public java.lang.String getInfo()
Returns the name of the model.- Specified by:
getInfo
in classBasicModel
- 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 classBasicModel
- Parameters:
tf
- The term frequency in the documentdocumentFrequency
- The document frequency of the termtermFrequency
- the term frequency in the collectiondocumentLength
- The length of the document.keyFrequency
- The normalised query term frequency.- Returns:
- the score returned by the implemented weighting model.
-
-