Package org.apache.lucene.search.similarities

# Class LMSimilarity.DefaultCollectionModel

java.lang.Object
org.apache.lucene.search.similarities.LMSimilarity.DefaultCollectionModel

All Implemented Interfaces:
  `LMSimilarity.CollectionModel`

Enclosing class:
  `LMSimilarity`

public static class LMSimilarity.DefaultCollectionModel extends Object implements LMSimilarity.CollectionModel
Models `p(w|C)` as the number of occurrences of the term in the collection, divided by the total number of tokens `+ 1`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultCollectionModel()`
  Sole constructor: parameter-free

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `computeProbability(BasicStats stats)`
  Computes the probability `p(w|C)` according to the language model strategy for the current term.
  `String`
  `getName()`
  The name of the collection model strategy.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultCollectionModel

    public DefaultCollectionModel()
    Sole constructor: parameter-free

- ## Method Details

  - ### computeProbability

    public double computeProbability(BasicStats stats)
    Description copied from interface: `LMSimilarity.CollectionModel`
    Computes the probability `p(w|C)` according to the language model strategy for the current term.
    Specified by:
      `computeProbability` in interface `LMSimilarity.CollectionModel`

  - ### getName

    public String getName()
    Description copied from interface: `LMSimilarity.CollectionModel`
    The name of the collection model strategy.
    Specified by:
      `getName` in interface `LMSimilarity.CollectionModel`