public class KLCorrect extends QueryExpansionModel
averageDocumentLength, collectionLength, documentFrequency, EXPANSION_DOCUMENTS, EXPANSION_TERMS, idf, maxTermFrequency, numberOfDocuments, PARAMETER_FREE, ROCCHIO_BETA, totalDocumentLength
Constructor and Description |
---|
KLCorrect()
A default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getInfo()
Returns the name of the model.
|
double |
parameterFreeNormaliser()
This method provides the contract for computing the normaliser of
parameter-free query expansion.
|
double |
parameterFreeNormaliser(double maxTermFrequency,
double collectionLength,
double totalDocumentLength)
This method provides the contract for computing the normaliser of
parameter-free query expansion.
|
double |
score(double withinDocumentFrequency,
double termFrequency)
This method implements the query expansion model.
|
double |
score(double withinDocumentFrequency,
double termFrequency,
double totalDocumentLength,
double collectionLength,
double averageDocumentLength)
This method implements the query expansion model.
|
initialise, setAverageDocumentLength, setCollectionLength, setDocumentFrequency, setMaxTermFrequency, setNumberOfDocuments, setTotalDocumentLength
public final String getInfo()
getInfo
in class QueryExpansionModel
public final double parameterFreeNormaliser()
parameterFreeNormaliser
in class QueryExpansionModel
public final double parameterFreeNormaliser(double maxTermFrequency, double collectionLength, double totalDocumentLength)
parameterFreeNormaliser
in class QueryExpansionModel
maxTermFrequency
- The maximum of the in-collection term frequency of the terms in the pseudo relevance set.collectionLength
- The number of tokens in the collections.totalDocumentLength
- The sum of the length of the top-ranked documents.public final double score(double withinDocumentFrequency, double termFrequency)
score
in class QueryExpansionModel
withinDocumentFrequency
- double The term frequency in the X top-retrieved documents.termFrequency
- double The term frequency in the collection.public final double score(double withinDocumentFrequency, double termFrequency, double totalDocumentLength, double collectionLength, double averageDocumentLength)
score
in class QueryExpansionModel
withinDocumentFrequency
- double The term frequency in the X top-retrieved documents.termFrequency
- double The term frequency in the collection.totalDocumentLength
- double The sum of length of the X top-retrieved documents.collectionLength
- double The number of tokens in the whole collection.averageDocumentLength
- double The average document length in the collection.Terrier 4.0. Copyright © 2004-2014 University of Glasgow