|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.matching.models.normalisation.Normalisation
public abstract class Normalisation
This class provides a contract for implementing frequency normalisation methods. Properties
| Constructor Summary | |
|---|---|
Normalisation()
The default constructor. |
|
Normalisation(double value)
The constructor that specifies the parameter value. |
|
| Method Summary | |
|---|---|
void |
disableFieldRetrieval()
|
void |
enableFieldRetrieval()
|
double |
getFieldWeight()
Returns the weight of the field for field retrieval. |
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 |
setFieldWeight(double value)
This method sets the weight of a field. |
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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 setFieldWeight(double value)
value - The weight of the field.public void enableFieldRetrieval()
public void disableFieldRetrieval()
public void setParameter(double value)
value - The specified value of the frequency normalisation parameter.public double getFieldWeight()
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
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||