public class Dl extends WeightingModel
averageDocumentLength, c, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, rq, termFrequency
Modifier and Type | Method and Description |
---|---|
String |
getInfo()
Returns the name of the model.
|
double |
getParameter()
Returns the b parameter to the ranking formula as set by setParameter()
|
double |
score(double tf,
double docLength)
This method provides the contract for implementing weighting models.
|
double |
score(double tf,
double docLength,
double documentFrequency,
double termFrequency,
double keyFrequency)
This method provides the contract for implementing weighting models.
|
void |
setParameter(double b)
Sets the b parameter to ranking formula
|
clone, getOverflowed, prepare, score, setCollectionStatistics, setEntryStatistics, setKeyFrequency, setRequest
public final String getInfo()
WeightingModel
getInfo
in interface Model
getInfo
in class WeightingModel
public final double score(double tf, double docLength)
WeightingModel
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's lengthpublic final double score(double tf, double docLength, double documentFrequency, double termFrequency, double keyFrequency)
WeightingModel
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's lengthdocumentFrequency
- The document frequency of the termtermFrequency
- the term frequency in the collectionkeyFrequency
- the term frequency in the querypublic void setParameter(double b)
setParameter
in interface Model
setParameter
in class WeightingModel
b
- the b parameter value to use.public double getParameter()
getParameter
in interface Model
getParameter
in class WeightingModel
Terrier 4.0. Copyright © 2004-2014 University of Glasgow