public abstract class BasicModel extends Object implements Serializable, Cloneable
DFRWeightingModel, 
Serialized Form| Modifier and Type | Field and Description | 
|---|---|
| protected Idf | iThe class used for computing the idf values. | 
| protected double | numberOfDocumentsThe number of documents in the whole collection. | 
| protected double | numberOfTokensThe number of tokens in the whole collection | 
| Constructor and Description | 
|---|
| BasicModel()A default constructor that initialises the idf i attribute | 
| Modifier and Type | Method and Description | 
|---|---|
| BasicModel | clone()Clone this weighting model | 
| abstract String | getInfo()Returns the name of the model. | 
| abstract double | score(double tf,
     double documentFrequency,
     double termFrequency,
     double keyFrequency,
     double documentLength)This method provides the contract for implementing weighting models. | 
| void | setNumberOfDocuments(double numOfDocs)Sets the number of documents in the collection. | 
| void | setNumberOfTokens(double numTokens)Set the number of tokens in the collection. | 
| double | stirlingPower(double n,
             double m)This method provides the contract for implementing the 
 Stirling formula for the power series. | 
protected Idf i
protected double numberOfDocuments
protected double numberOfTokens
public BasicModel()
public BasicModel clone()
public abstract String getInfo()
public void setNumberOfDocuments(double numOfDocs)
numOfDocs - the number of documents in the collection.public void setNumberOfTokens(double numTokens)
numTokens - double The number of tokens in the collection.public abstract double score(double tf,
           double documentFrequency,
           double termFrequency,
           double keyFrequency,
           double documentLength)
tf - The term frequency in the documentdocumentFrequency - The document frequency of the termtermFrequency - The term frequency of the term in the collectionkeyFrequency - The normalised query term frequency.documentLength - The length of the document.public double stirlingPower(double n,
                   double m)
n - The parameter of the Stirling formula.m - The parameter of the Stirling formula.Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow