Class LMSimilarity
Abstract superclass for language modeling Similarities. The following inner types are introduced:
- LMSimilarity.LMStats, which defines a new statistic, the probability that the collection language model generates the current term;
- LMSimilarity.ICollectionModel, which is a strategy interface for object that
compute the collection language model
p(w|C)
; - LMSimilarity.DefaultCollectionModel, an implementation of the former, that computes the term probability as the number of occurrences of the term in the collection, divided by the total number of tokens.
@lucene.experimental
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class LMSimilarity : SimilarityBase
Constructors
Name | Description |
---|---|
LMSimilarity() | Creates a new instance with the default collection language model. |
LMSimilarity(LMSimilarity.ICollectionModel) | Creates a new instance with the specified collection language model. |
Fields
Name | Description |
---|---|
m_collectionModel | The collection model. |
Methods
Name | Description |
---|---|
Explain(Explanation, BasicStats, Int32, Single, Single) | |
FillBasicStats(BasicStats, CollectionStatistics, TermStatistics) | Computes the collection probability of the current term in addition to the usual statistics. |
GetName() | Returns the name of the LM method. The values of the parameters should be included as well. Used in ToString() . |
NewStats(String, Single) | |
ToString() | Returns the name of the LM method. If a custom collection model strategy is used, its name is included as well. |