public class LMDirichletSimilarity extends LMSimilarity
The formula as defined the paper assigns a negative score to documents that
contain the term, but with fewer occurrences than predicted by the collection
language model. The Lucene implementation returns 0 for such
documents.
LMSimilarity.CollectionModel, LMSimilarity.DefaultCollectionModel, LMSimilarity.LMStatsSimilarity.SimScorer, Similarity.SimWeight| Constructor and Description |
|---|
LMDirichletSimilarity()
Instantiates the similarity with the default μ value of 2000.
|
LMDirichletSimilarity(float mu)
Instantiates the similarity with the provided μ parameter.
|
LMDirichletSimilarity(LMSimilarity.CollectionModel collectionModel)
Instantiates the similarity with the default μ value of 2000.
|
LMDirichletSimilarity(LMSimilarity.CollectionModel collectionModel,
float mu)
Instantiates the similarity with the provided μ parameter.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getMu()
Returns the μ parameter.
|
String |
getName()
Returns the name of the LM method.
|
toStringcomputeNorm, computeWeight, getDiscountOverlaps, log2, setDiscountOverlaps, simScorercoord, queryNormpublic LMDirichletSimilarity(LMSimilarity.CollectionModel collectionModel, float mu)
public LMDirichletSimilarity(float mu)
public LMDirichletSimilarity(LMSimilarity.CollectionModel collectionModel)
public LMDirichletSimilarity()
public float getMu()
public String getName()
LMSimilarityUsed in LMSimilarity.toString()
getName in class LMSimilarityCopyright © 2010 - 2020 Adobe. All Rights Reserved