Terrier IR Platform
1.1.1

uk.ac.gla.terrier.matching.models.basicmodel
Class Br

java.lang.Object
  extended by uk.ac.gla.terrier.matching.models.basicmodel.BasicModel
      extended by uk.ac.gla.terrier.matching.models.basicmodel.Br
All Implemented Interfaces:
java.io.Serializable

public class Br
extends BasicModel

This class implements the Bernoulli model of randomness

Version:
$Revision: 1.3 $
Author:
Gianni Amati, Ben He, Vassilis Plachouras, modified by Craig Macdonald for Bernoulli
See Also:
Serialized Form

Constructor Summary
Br()
          A default constructor.
 
Method Summary
 java.lang.String getInfo()
          Returns the name of the model.
 double score(double tf, double documentFrequency, double termFrequency, double keyFrequency)
          This method provides the contract for implementing weighting models.
 double score(double tf, double documentFrequency, double termFrequency, double keyFrequency, double documentLength)
           
 
Methods inherited from class uk.ac.gla.terrier.matching.models.basicmodel.BasicModel
setNumberOfDocuments, setNumberOfTokens, stirlingPower
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Br

public Br()
A default constructor.

Method Detail

getInfo

public java.lang.String getInfo()
Returns the name of the model.

Specified by:
getInfo in class BasicModel
Returns:
the name of the model

score

public double score(double tf,
                    double documentFrequency,
                    double termFrequency,
                    double keyFrequency)
This method provides the contract for implementing weighting models.

Specified by:
score in class BasicModel
Parameters:
tf - The term frequency in the document
documentFrequency - The document frequency of the term
termFrequency - the term frequency in the collection
keyFrequency - The normalised query term frequency.
Returns:
the score returned by the implemented weighting model.

score

public double score(double tf,
                    double documentFrequency,
                    double termFrequency,
                    double keyFrequency,
                    double documentLength)

Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow