public abstract class LMSimilarity extends SimilarityBase
LMSimilarity.LMStats, which defines a new statistic, the probability that
the collection language model generates the current term;LMSimilarity.CollectionModel, 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.| Modifier and Type | Class and Description |
|---|---|
static interface |
LMSimilarity.CollectionModel
A strategy for computing the collection language model.
|
static class |
LMSimilarity.DefaultCollectionModel
Models
p(w|C) as the number of occurrences of the term in the
collection, divided by the total number of tokens + 1. |
static class |
LMSimilarity.LMStats
Stores the collection distribution of the current term.
|
Similarity.SimScorer, Similarity.SimWeight| Constructor and Description |
|---|
LMSimilarity()
Creates a new instance with the default collection language model.
|
LMSimilarity(LMSimilarity.CollectionModel collectionModel)
Creates a new instance with the specified collection language model.
|
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getName()
Returns the name of the LM method.
|
String |
toString()
Returns the name of the LM method.
|
computeNorm, computeWeight, getDiscountOverlaps, log2, setDiscountOverlaps, simScorercoord, queryNormpublic LMSimilarity(LMSimilarity.CollectionModel collectionModel)
public LMSimilarity()
public abstract String getName()
Used in toString()
public String toString()
toString in class SimilarityBasegetName(),
LMSimilarity.CollectionModel.getName(),
LMSimilarity.DefaultCollectionModelCopyright © 2010 - 2020 Adobe. All Rights Reserved