public abstract class Normalisation extends Object implements Serializable, Cloneable
| Modifier and Type | Field and Description | 
|---|---|
| protected double | averageDocumentLengthThe average document length in the collection. | 
| protected Idf | idfThe class used for computing the logorithm values. | 
| protected double | NtThe document frequency of the term. | 
| protected double | numberOfDocumentsThe number of documents in the whole collection. | 
| protected double | numberOfTokensThe number of tokens in the whole collection. | 
| protected double | parameterThe free parameter of the normalisation method. | 
| protected double | termFrequencyThe frequency of the query term in the whole collection. | 
| Constructor and Description | 
|---|
| Normalisation()The default constructor. | 
| Normalisation(double value)The constructor that specifies the parameter value. | 
| Modifier and Type | Method and Description | 
|---|---|
| Normalisation | clone()Clone this weighting model | 
| abstract String | getInfo()This method provides the contract for getting the name of the 
 implemented frequency normalisation method. | 
| double | getParameter()Returns the hyper-parameter value. | 
| abstract double | normalise(double tf,
         double docLength,
         double _termFrequency)This method provides the contract for implementing the frequency 
 normalisation formula. | 
| void | setAverageDocumentLength(double value)Set the average document length in the collection. | 
| void | setDocumentFrequency(double nt) | 
| void | setNumberOfDocuments(double _numberOfDocuments) | 
| void | setNumberOfTokens(double value)Set the number of tokens in the collection. | 
| void | setParameter(double value)Specify the free parameter of the implemented frequency normalisation method. | 
protected double averageDocumentLength
protected Idf idf
protected double termFrequency
protected double parameter
protected double numberOfTokens
protected double Nt
protected double numberOfDocuments
public Normalisation()
public Normalisation(double value)
value - The specified value of the free parameter of the implemented 
 frequency normalisation method.public Normalisation clone()
public void setAverageDocumentLength(double value)
value - The average document length in the collection.public void setNumberOfTokens(double value)
value - The number of tokens in the collection.public void setParameter(double value)
value - The specified value of the frequency normalisation parameter.public double getParameter()
public abstract String getInfo()
public abstract double normalise(double tf,
               double docLength,
               double _termFrequency)
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.public void setDocumentFrequency(double nt)
nt - the document frequency to setpublic void setNumberOfDocuments(double _numberOfDocuments)
_numberOfDocuments - the numberOfDocuments to setTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow