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 -
Method Summary
Modifier and TypeMethodDescriptiondoublecomputeProbability(BasicStats stats) Computes the probabilityp(w|C)according to the language model strategy for the current term.getName()The name of the collection model strategy.
-
Constructor Details
-
DefaultCollectionModel
public DefaultCollectionModel()Sole constructor: parameter-free
-
-
Method Details
-
computeProbability
Description copied from interface:LMSimilarity.CollectionModelComputes the probabilityp(w|C)according to the language model strategy for the current term.- Specified by:
computeProbabilityin interfaceLMSimilarity.CollectionModel
-
getName
Description copied from interface:LMSimilarity.CollectionModelThe name of the collection model strategy.- Specified by:
getNamein interfaceLMSimilarity.CollectionModel
-