org.terrier.matching.models.basicmodel
Class P
java.lang.Object
org.terrier.matching.models.basicmodel.BasicModel
org.terrier.matching.models.basicmodel.P
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- PL
public class P
- extends BasicModel
This class implements the P basic model for randomness.
- Author:
- Gianni Amati, Ben He, Vassilis Plachouras
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
modelName
The name of the model. |
Constructor Summary |
P()
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 provides the contract for implementing weighting models. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelName
protected java.lang.String modelName
- The name of the model.
P
public P()
- A default constructor.
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 provides the contract for implementing weighting models.
- Specified by:
score
in class BasicModel
- 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.
Terrier 3.5. Copyright © 2004-2011 University of Glasgow