Terrier IR Platform
2.2.1

uk.ac.gla.terrier.matching.models.normalisation
Class NormalisationB

java.lang.Object
  extended by uk.ac.gla.terrier.matching.models.normalisation.Normalisation
      extended by uk.ac.gla.terrier.matching.models.normalisation.NormalisationB
All Implemented Interfaces:
java.io.Serializable

public class NormalisationB
extends Normalisation

This class implements BM25's normalisation method.

Version:
$Revision: 1.9 $
Author:
Ben He
See Also:
Serialized Form

Constructor Summary
NormalisationB()
          The default constructor.
 
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 uk.ac.gla.terrier.matching.models.normalisation.Normalisation
disableFieldRetrieval, enableFieldRetrieval, getFieldWeight, getParameter, setAverageDocumentLength, setDocumentFrequency, setFieldWeight, setNumberOfDocuments, setNumberOfTokens, setParameter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalisationB

public NormalisationB()
The default constructor. The hyper-parameter value is set to 0.75 by default.

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 IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow