Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`LMSimilarity.DefaultCollectionModel()` Sole constructor: parameter-free

Method Summary
`float` | `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 Detail

### LMSimilarity.DefaultCollectionModel

    public LMSimilarity.DefaultCollectionModel()

  Sole constructor: parameter-free

Method Detail

### computeProbability

    public float 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`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.