org.terrier.matching.models.normalisation
Class NormalisationP

java.lang.Object
  extended by org.terrier.matching.models.normalisation.Normalisation
      extended by org.terrier.matching.models.normalisation.NormalisationP
All Implemented Interfaces:
java.io.Serializable

public class NormalisationP
extends Normalisation

This class implements Term Frequency Normalisation via Pareto Distributions

Author:
Ben He
See Also:
Serialized Form

Field Summary
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
NormalisationP()
          The default constructor.
NormalisationP(double value)
          Constructor that also sets the parameter z (the power in the normalisation).
 
Method Summary
 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
getParameter, setAverageDocumentLength, setDocumentFrequency, setNumberOfDocuments, setNumberOfTokens, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodName

protected final java.lang.String methodName
The name of the normalisation method .

See Also:
Constant Field Values
Constructor Detail

NormalisationP

public NormalisationP()
The default constructor.


NormalisationP

public NormalisationP(double value)
Constructor that also sets the parameter z (the power in the normalisation).

Parameters:
value - The specified value for the parameter z.
Method Detail

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)
This method gets the normalised term frequency.

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