org.terrier.matching.models.basicmodel
Class DFR_BM
java.lang.Object
org.terrier.matching.models.basicmodel.BasicModel
org.terrier.matching.models.basicmodel.DFR_BM
- All Implemented Interfaces:
- java.io.Serializable
public class DFR_BM
- extends BasicModel
This class implements the DFR BM weighting model, which is an approximation of
BM25 in the DFR framework.
Feel free to combine the DFR_BM model with any frequency normalisation method.
However, it is NOT recommended to use DFR_BM with the first normalisation for
after effect. For example, to use the DFR_BM model with the normalisation 2,
add the following line in file etc/trec.models:
DFRWeightingModel(DFR_BM, , 2) Leave the space between the comas blank so
that the first normalisation is disabled.
- Author:
- Ben He
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
modelName
The name of the model. |
Constructor Summary |
DFR_BM()
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 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.
DFR_BM
public DFR_BM()
- 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 computes the score for the implemented weighting model.
- 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 collectionkeyFrequency
- 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