public class BM25 extends WeightingModel
averageDocumentLength, c, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, rq, termFrequency
Constructor and Description |
---|
BM25()
A default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getInfo()
Returns the name of the model.
|
double |
getParameter()
Returns the b parameter to the BM25 ranking formula as set by setParameter()
|
double |
score(double tf,
double docLength)
Uses BM25 to compute a weight for a term in a document.
|
double |
score(double tf,
double docLength,
double n_t,
double F_t,
double keyFrequency)
Deprecated.
|
void |
setParameter(double _b)
Sets the b parameter to BM25 ranking formula
|
clone, getOverflowed, prepare, score, setCollectionStatistics, setEntryStatistics, setKeyFrequency, setRequest
public final String getInfo()
getInfo
in interface Model
getInfo
in class WeightingModel
public double score(double tf, double docLength)
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's length@Deprecated public double score(double tf, double docLength, double n_t, double F_t, double keyFrequency)
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's lengthn_t
- The document frequency of the termF_t
- 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