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 java.lang.Object implements LMSimilarity.CollectionModel
Modelsp(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
computeProbability(BasicStats stats)
Computes the probabilityp(w|C)
according to the language model strategy for the current term.java.lang.String
getName()
The name of the collection model strategy.
-
-
-
Method Detail
-
computeProbability
public float computeProbability(BasicStats stats)
Description copied from interface:LMSimilarity.CollectionModel
Computes the probabilityp(w|C)
according to the language model strategy for the current term.- Specified by:
computeProbability
in interfaceLMSimilarity.CollectionModel
-
getName
public java.lang.String getName()
Description copied from interface:LMSimilarity.CollectionModel
The name of the collection model strategy.- Specified by:
getName
in interfaceLMSimilarity.CollectionModel
-
-