Show / Hide Table of Contents

    Class LMDirichletSimilarity

    Bayesian smoothing using Dirichlet priors. From Chengxiang Zhai and John Lafferty. 2001. A study of smoothing methods for language models applied to Ad Hoc information retrieval. In Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval (SIGIR '01). ACM, New York, NY, USA, 334-342.

    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.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Similarity
    SimilarityBase
    LMSimilarity
    LMDirichletSimilarity
    Inherited Members
    LMSimilarity.m_collectionModel
    LMSimilarity.NewStats(String, Single)
    LMSimilarity.FillBasicStats(BasicStats, CollectionStatistics, TermStatistics)
    LMSimilarity.ToString()
    SimilarityBase.DiscountOverlaps
    SimilarityBase.ComputeWeight(Single, CollectionStatistics, TermStatistics[])
    SimilarityBase.Explain(BasicStats, Int32, Explanation, Single)
    SimilarityBase.GetSimScorer(Similarity.SimWeight, AtomicReaderContext)
    SimilarityBase.ComputeNorm(FieldInvertState)
    SimilarityBase.DecodeNormValue(Byte)
    SimilarityBase.EncodeNormValue(Single, Single)
    SimilarityBase.Log2(Double)
    Similarity.Coord(Int32, Int32)
    Similarity.QueryNorm(Single)
    Namespace: Lucene.Net.Search.Similarities
    Assembly: Lucene.Net.dll
    Syntax
    public class LMDirichletSimilarity : LMSimilarity

    Constructors

    | Improve this Doc View Source

    LMDirichletSimilarity()

    Instantiates the similarity with the default μ value of 2000.

    Declaration
    public LMDirichletSimilarity()
    | Improve this Doc View Source

    LMDirichletSimilarity(LMSimilarity.ICollectionModel)

    Instantiates the similarity with the default μ value of 2000.

    Declaration
    public LMDirichletSimilarity(LMSimilarity.ICollectionModel collectionModel)
    Parameters
    Type Name Description
    LMSimilarity.ICollectionModel collectionModel
    | Improve this Doc View Source

    LMDirichletSimilarity(LMSimilarity.ICollectionModel, Single)

    Instantiates the similarity with the provided μ parameter.

    Declaration
    public LMDirichletSimilarity(LMSimilarity.ICollectionModel collectionModel, float mu)
    Parameters
    Type Name Description
    LMSimilarity.ICollectionModel collectionModel
    System.Single mu
    | Improve this Doc View Source

    LMDirichletSimilarity(Single)

    Instantiates the similarity with the provided μ parameter.

    Declaration
    public LMDirichletSimilarity(float mu)
    Parameters
    Type Name Description
    System.Single mu

    Properties

    | Improve this Doc View Source

    Mu

    Returns the μ parameter.

    Declaration
    public virtual float Mu { get; }
    Property Value
    Type Description
    System.Single

    Methods

    | Improve this Doc View Source

    Explain(Explanation, BasicStats, Int32, Single, Single)

    Declaration
    protected override void Explain(Explanation expl, BasicStats stats, int doc, float freq, float docLen)
    Parameters
    Type Name Description
    Explanation expl
    BasicStats stats
    System.Int32 doc
    System.Single freq
    System.Single docLen
    Overrides
    LMSimilarity.Explain(Explanation, BasicStats, Int32, Single, Single)
    | Improve this Doc View Source

    GetName()

    Declaration
    public override string GetName()
    Returns
    Type Description
    System.String
    Overrides
    LMSimilarity.GetName()
    | Improve this Doc View Source

    Score(BasicStats, Single, Single)

    Declaration
    public override float Score(BasicStats stats, float freq, float docLen)
    Parameters
    Type Name Description
    BasicStats stats
    System.Single freq
    System.Single docLen
    Returns
    Type Description
    System.Single
    Overrides
    SimilarityBase.Score(BasicStats, Single, Single)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)