org.terrier.matching
Interface Model

All Known Implementing Classes:
BB2, BM25, BM25F, DFI0, DFR_BM25, DFRee, DFRWeightingModel, DirichletLM, DLH, DLH13, DPH, Hiemstra_LM, IFB2, In_expB2, In_expC2, InB2, InL2, Js_KLs, LemurTF_IDF, LGD, MDL2, ML2, PerFieldNormWeightingModel, PL2, PL2F, RequiredTermModifier, TermInFieldModifier, TF_IDF, WeightingModel, XSqrA_M

public interface Model

This interface encapsulates all the common functionality between standard IR models (including DFR models, TF/IDF, BM25 etc), and Language Modelling models (Terrier includes PonteCroft Language Modelling model).

Author:
Craig Macdonald
See Also:
WeightingModel

Method Summary
 java.lang.String getInfo()
          Returns a model dependant string, such that runs can be identified from TREC results.
 double getParameter()
          Returns the current value of the parameter set using setParameter() method.
 void setAverageDocumentLength(double n)
          Set the average document length in the collection.
 void setNumberOfDocuments(double n)
          Set the number of documents in the collection.
 void setNumberOfPointers(double n)
          Set the number of pointers in the collection.
 void setNumberOfTokens(double n)
          Set the number of tokens in the whole collection.
 void setNumberOfUniqueTerms(double n)
          Set the number of unique terms in the collection.
 void setParameter(double param)
          Many models require 1 parameter to be set - this is often dependant on the corpus and the model, so should be set for each Terrier instance.
 

Method Detail

getInfo

java.lang.String getInfo()
Returns a model dependant string, such that runs can be identified from TREC results. Example PL2c2.1 would imply PL2 model, with the c parameter set to 2.1.

Returns:
The string description of the current instantiation of the weighting model.

setParameter

void setParameter(double param)
Many models require 1 parameter to be set - this is often dependant on the corpus and the model, so should be set for each Terrier instance.

Parameters:
param - double the parameter value.

setNumberOfUniqueTerms

void setNumberOfUniqueTerms(double n)
Set the number of unique terms in the collection.

Parameters:
n - double The number of unique terms in the collection.

setNumberOfTokens

void setNumberOfTokens(double n)
Set the number of tokens in the whole collection.

Parameters:
n - The number of tokens in the whole collection.

setAverageDocumentLength

void setAverageDocumentLength(double n)
Set the average document length in the collection.

Parameters:
n - The average document length in the collection.

setNumberOfDocuments

void setNumberOfDocuments(double n)
Set the number of documents in the collection.

Parameters:
n - The number of documents in the collection.

setNumberOfPointers

void setNumberOfPointers(double n)
Set the number of pointers in the collection.

Parameters:
n - The number of pointers in the collection.

getParameter

double getParameter()
Returns the current value of the parameter set using setParameter() method.



Terrier 3.5. Copyright © 2004-2011 University of Glasgow