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
.
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 |
LMSimilarity.DefaultCollectionModel
public LMSimilarity.DefaultCollectionModel()
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
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.