| 
 | 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.WeightingModel
uk.ac.gla.terrier.matching.models.DFRWeightingModel
public class DFRWeightingModel
This class implements a modular DFR model. Components in the model
 are specified individually. Besides of the basic model, the other two
 components can be either specified or disabled.
| Constructor Summary | |
|---|---|
| DFRWeightingModel(java.lang.String[] components)The default constructor. | |
| Method Summary | |
|---|---|
|  java.lang.String | getInfo()Returns the name of the model. | 
|  double | getParameter()Return the parameter set by setParameter() | 
|  double | score(double tf,
      double docLength)Compute a weight for a term in a document. | 
|  double | score(double tf,
      double docLength,
      double documentFrequency,
      double termFrequency,
      double queryTermWeight)Compute a weight for a term in a document. | 
|  void | setAverageDocumentLength(double avgDocLength)Sets the average length of documents in the collection. | 
|  void | setDocumentFrequency(double docFreq)Sets the document frequency of the term in the collection. | 
|  void | setNumberOfDocuments(double numOfDocs)Sets the number of documents in the collection. | 
|  void | setNumberOfTokens(double value)Set the number of tokens in the collection. | 
|  void | setNumberOfUniqueTerms(double number)Set the number of unique terms in the collection. | 
|  void | setParameter(double value)Set the frequency normalisation parameter. | 
| Methods inherited from class uk.ac.gla.terrier.matching.models.WeightingModel | 
|---|
| clone, setKeyFrequency, setNumberOfPointers, setTermFrequency, stirlingPower | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DFRWeightingModel(java.lang.String[] components)
components - Corresponds to the names of the 3 DFR weighting models component
 names, as passed to initialise().| Method Detail | 
|---|
public void setAverageDocumentLength(double avgDocLength)
setAverageDocumentLength in interface ModelsetAverageDocumentLength in class WeightingModelavgDocLength - The documents' average length.public void setNumberOfDocuments(double numOfDocs)
setNumberOfDocuments in interface ModelsetNumberOfDocuments in class WeightingModelnumOfDocs - the number of documents in the collection.public void setNumberOfTokens(double value)
setNumberOfTokens in interface ModelsetNumberOfTokens in class WeightingModelvalue - The number of tokens in the collection.public void setNumberOfUniqueTerms(double number)
setNumberOfUniqueTerms in interface ModelsetNumberOfUniqueTerms in class WeightingModelnumber - double The number of unique terms in the collection.public void setParameter(double value)
setParameter in interface ModelsetParameter in class WeightingModelvalue - The given parameter value.public double getParameter()
getParameter in interface ModelgetParameter in class WeightingModelpublic final java.lang.String getInfo()
getInfo in interface ModelgetInfo in class WeightingModelpublic void setDocumentFrequency(double docFreq)
setDocumentFrequency in class WeightingModeldocFreq - the document frequency of the term in the collection.
public final double score(double tf,
                          double docLength)
score in class WeightingModeltf - The term frequency in the documentdocLength - the document's length
public final double score(double tf,
                          double docLength,
                          double documentFrequency,
                          double termFrequency,
                          double queryTermWeight)
score in class WeightingModeltf - The term frequency in the documentdocLength - the document's lengthdocumentFrequency - The document frequency of the termtermFrequency - the term frequency in the collectionqueryTermWeight - the term frequency in the query
| 
 | Terrier IR Platform 2.2.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||