|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.matching.models.normalisation.Normalisation
public abstract class Normalisation
This class provides a contract for implementing frequency normalisation methods. Properties
| Field Summary | |
|---|---|
protected double |
averageDocumentLength
The average document length in the collection. |
protected Idf |
idf
The class used for computing the logorithm values. |
protected double |
Nt
The document frequency of the term. |
protected double |
numberOfDocuments
The number of documents in the whole collection. |
protected double |
numberOfTokens
The number of tokens in the whole collection. |
protected double |
parameter
The free parameter of the normalisation method. |
protected double |
termFrequency
The frequency of the query term in the whole collection. |
| Constructor Summary | |
|---|---|
Normalisation()
The default constructor. |
|
Normalisation(double value)
The constructor that specifies the parameter value. |
|
| Method Summary | |
|---|---|
abstract java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double averageDocumentLength
protected Idf idf
protected double termFrequency
protected double parameter
protected double numberOfTokens
protected double Nt
protected double numberOfDocuments
| Constructor Detail |
|---|
public Normalisation()
public Normalisation(double value)
value - The specified value of the free parameter of the implemented
frequency normalisation method.| Method Detail |
|---|
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 java.lang.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 set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||