Class BasicModelD

java.lang.Object
org.apache.lucene.search.similarities.BasicModel
org.apache.lucene.search.similarities.BasicModelD

public class BasicModelD extends BasicModel
Implements the approximation of the binomial model with the divergence for DFR. The formula used in Lucene differs slightly from the one in the original paper: to avoid underflow for small values of N and F, N is increased by 1 and F is always increased by tfn+1.

WARNING: for terms that do not meet the expected random distribution (e.g. stopwords), this model may give poor performance, such as abnormally high scores for low tf values.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Sole constructor: parameter-free
  • Method Summary

    Modifier and Type
    Method
    Description
    final float
    score(BasicStats stats, float tfn)
    Returns the informative content score.
    Subclasses must override this method to return the code of the basic model formula.

    Methods inherited from class org.apache.lucene.search.similarities.BasicModel

    explain

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BasicModelD

      public BasicModelD()
      Sole constructor: parameter-free
  • Method Details

    • score

      public final float score(BasicStats stats, float tfn)
      Description copied from class: BasicModel
      Returns the informative content score.
      Specified by:
      score in class BasicModel
    • toString

      public String toString()
      Description copied from class: BasicModel
      Subclasses must override this method to return the code of the basic model formula. Refer to the original paper for the list.
      Specified by:
      toString in class BasicModel