org.terrier.matching.models.normalisation
Class NormalisationStatic
java.lang.Object
org.terrier.matching.models.normalisation.Normalisation
org.terrier.matching.models.normalisation.NormalisationStatic
- All Implemented Interfaces:
- java.io.Serializable
public class NormalisationStatic
- extends Normalisation
This class implements a Normalisation method that forces all
term frequencies to the value of the parameter. If field retrieval
is enabled, then the parameter is multiplied by the field weight.
- Author:
- Craig Macdonald
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
methodName
The name of the normalisation method . |
Method Summary |
java.lang.String |
getInfo()
Get the name of the normalisation method. |
double |
normalise(double tf,
double docLength,
double termFrequency)
Returns a static term frequency. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
methodName
protected final java.lang.String methodName
- The name of the normalisation method .
- See Also:
- Constant Field Values
NormalisationStatic
public NormalisationStatic()
getInfo
public java.lang.String getInfo()
- Get the name of the normalisation method.
- Specified by:
getInfo
in class Normalisation
- Returns:
- Return the name of the normalisation method.
normalise
public double normalise(double tf,
double docLength,
double termFrequency)
- Returns a static term frequency.
i.e. tf = (tf > 0) ? parameter : 0
- Specified by:
normalise
in class Normalisation
- 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.
Terrier 3.5. Copyright © 2004-2011 University of Glasgow