Class NormalisationJN
- java.lang.Object
-
- org.terrier.matching.models.normalisation.Normalisation
-
- org.terrier.matching.models.normalisation.NormalisationJN
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class NormalisationJN extends Normalisation
This class implements the tf normalisation based on Jelinek-Mercer smoothing for language modelling where collection model is given by document frequency instead of term frequency.- Author:
- Ben He
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
methodName
The name of the normalisation method .-
Fields inherited from class org.terrier.matching.models.normalisation.Normalisation
averageDocumentLength, idf, Nt, numberOfDocuments, numberOfTokens, parameter, termFrequency
-
-
Constructor Summary
Constructors Constructor Description NormalisationJN()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getInfo()
Get the name of the normalisation method.double
normalise(double tf, double docLength, double termFrequency)
This method gets the normalised term frequency.-
Methods inherited from class org.terrier.matching.models.normalisation.Normalisation
clone, getParameter, setAverageDocumentLength, setDocumentFrequency, setNumberOfDocuments, setNumberOfTokens, setParameter
-
-
-
-
Field Detail
-
methodName
protected final java.lang.String methodName
The name of the normalisation method .- See Also:
- Constant Field Values
-
-
Method Detail
-
getInfo
public java.lang.String getInfo()
Get the name of the normalisation method.- Specified by:
getInfo
in classNormalisation
- Returns:
- Return the name of the normalisation method.
-
normalise
public double normalise(double tf, double docLength, double termFrequency)
This method gets the normalised term frequency.- Specified by:
normalise
in classNormalisation
- Parameters:
tf
- The frequency of the query term in the document.docLength
- The number of tokens in the document.termFrequency
- The frequency of the query term in the collection.- Returns:
- The normalised term frequency.
-
-