Package org.terrier.matching.models
Class IFB2
- java.lang.Object
-
- org.terrier.matching.models.WeightingModel
-
- org.terrier.matching.models.DFRNorm2BaseModel
-
- org.terrier.matching.models.IFB2
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Model
public class IFB2 extends DFRNorm2BaseModel
This class implements the IFB2 weighting model. To control the weight of the c length normalisation parameter, set the dfr.c control in the SearchRequest object.- Author:
- Gianni Amati, Ben He, Vassilis Plachouras
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.terrier.matching.models.DFRNorm2BaseModel
c
-
Fields inherited from class org.terrier.matching.models.WeightingModel
averageDocumentLength, cs, documentFrequency, es, i, keyFrequency, numberOfDocuments, numberOfPointers, numberOfPostings, numberOfTokens, numberOfUniqueTerms, rq, termFrequency
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getInfo()
Returns the name of the model.double
score(double tf, double docLength)
Uses IFB2 to compute a weight for a term in a document.-
Methods inherited from class org.terrier.matching.models.DFRNorm2BaseModel
getParameter, prepare, setParameter
-
Methods inherited from class org.terrier.matching.models.WeightingModel
clone, getOverflowed, score, setCollectionStatistics, setEntryStatistics, setKeyFrequency, setRequest
-
-
-
-
Method Detail
-
getInfo
public final java.lang.String getInfo()
Returns the name of the model.- Specified by:
getInfo
in interfaceModel
- Specified by:
getInfo
in classWeightingModel
- Returns:
- the name of the model
-
score
public final double score(double tf, double docLength)
Uses IFB2 to compute a weight for a term in a document.- Specified by:
score
in classWeightingModel
- Parameters:
tf
- The term frequency in the documentdocLength
- the document's length- Returns:
- the score assigned to a document with the given tf and docLength, and other preset parameters
-
-