public class SingleFieldModel extends WeightingModel
averageDocumentLength, c, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfTokens, numberOfUniqueTerms, rq, termFrequency
Constructor and Description |
---|
SingleFieldModel(String[] parameters) |
Modifier and Type | Method and Description |
---|---|
SingleFieldModel |
clone()
Clone this weighting model
|
String |
getInfo()
Returns the name of the model.
|
void |
prepare()
prepare
|
double |
score(double tf,
double docLength)
This method provides the contract for implementing weighting models.
|
double |
score(double tf,
double docLength,
double n_t,
double F_t,
double keyFrequency)
This method provides the contract for implementing weighting models.
|
double |
score(Posting _p)
Returns score
|
void |
setCollectionStatistics(CollectionStatistics _cs)
Sets collection statistics
|
void |
setEntryStatistics(EntryStatistics _es)
Sets entry statistics.
|
void |
setParameter(double c)
Sets the c value
|
getOverflowed, getParameter, setKeyFrequency, setRequest
public SingleFieldModel clone()
WeightingModel
clone
in class WeightingModel
public void prepare()
WeightingModel
prepare
in class WeightingModel
public double score(Posting _p)
WeightingModel
score
in class WeightingModel
public void setCollectionStatistics(CollectionStatistics _cs)
WeightingModel
setCollectionStatistics
in class WeightingModel
public void setEntryStatistics(EntryStatistics _es)
WeightingModel
setEntryStatistics
in class WeightingModel
public String getInfo()
WeightingModel
getInfo
in interface Model
getInfo
in class WeightingModel
public double score(double tf, double docLength)
WeightingModel
score
in class WeightingModel
tf
- The term frequency in the documentdocLength
- the document's lengthpublic double score(double tf, double docLength, double n_t, double F_t, double keyFrequency)
WeightingModel
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 c)
WeightingModel
setParameter
in interface Model
setParameter
in class WeightingModel
c
- the term frequency normalisation parameter value.Terrier 4.0. Copyright © 2004-2014 University of Glasgow