|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.matching.models.queryexpansion.QueryExpansionModel
public abstract class QueryExpansionModel
This class should be extended by the classes used for weighting temrs and documents.
Properties:
Field Summary | |
---|---|
boolean |
PARAMETER_FREE
Boolean variable indicates whether to apply the parameter free query expansion. |
double |
ROCCHIO_BETA
Rocchio's beta for query expansion. |
Constructor Summary | |
---|---|
QueryExpansionModel()
A default constructor for the class that initialises the idf attribute. |
Method Summary | |
---|---|
abstract java.lang.String |
getInfo()
Returns the name of the model. |
void |
initialise()
Initialises the Rocchio's beta for query expansion. |
abstract double |
parameterFreeNormaliser()
This method provides the contract for computing the normaliser of parameter-free query expansion. |
abstract double |
parameterFreeNormaliser(double maxTermFrequency,
double collectionLength,
double totalDocumentLength)
This method provides the contract for computing the normaliser of parameter-free query expansion. |
abstract double |
score(double withinDocumentFrequency,
double termFrequency)
This method provides the contract for implementing query expansion models. |
abstract double |
score(double withinDocumentFrequency,
double termFrequency,
double totalDocumentLength,
double collectionLength,
double averageDocumentLength)
This method provides the contract for implementing query expansion models. |
void |
setAverageDocumentLength(double averageDocumentLength)
Set the average document length. |
void |
setCollectionLength(double collectionLength)
Set the collection length. |
void |
setDocumentFrequency(double documentFrequency)
Set the document frequency. |
void |
setMaxTermFrequency(double maxTermFrequency)
This method sets the maximum of the term frequency values of query terms. |
void |
setNumberOfDocuments(long numberOfDocuments)
|
void |
setTotalDocumentLength(double totalDocumentLength)
Set the total document length. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double ROCCHIO_BETA
public boolean PARAMETER_FREE
Constructor Detail |
---|
public QueryExpansionModel()
Method Detail |
---|
public void initialise()
public void setNumberOfDocuments(long numberOfDocuments)
numberOfDocuments
- the numberOfDocuments to setpublic abstract java.lang.String getInfo()
public void setAverageDocumentLength(double averageDocumentLength)
averageDocumentLength
- double The average document length.public void setCollectionLength(double collectionLength)
collectionLength
- double The number of tokens in the collection.public void setDocumentFrequency(double documentFrequency)
documentFrequency
- double The document frequency of a term.public void setTotalDocumentLength(double totalDocumentLength)
totalDocumentLength
- double The total document length.public void setMaxTermFrequency(double maxTermFrequency)
maxTermFrequency
- public abstract double parameterFreeNormaliser()
public abstract double parameterFreeNormaliser(double maxTermFrequency, double collectionLength, double totalDocumentLength)
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 abstract double score(double withinDocumentFrequency, double termFrequency)
withinDocumentFrequency
- double The term
frequency in the X top-retrieved documents.termFrequency
- double The term frequency in the collection.
public abstract double score(double withinDocumentFrequency, double termFrequency, double totalDocumentLength, double collectionLength, double averageDocumentLength)
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 IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |