Class LMJelinekMercerSimilarity
Language model based on the Jelinek-Mercer smoothing method. 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 model has a single parameter, λ. According to said paper, the
optimal value depends on both the collection and the query. The optimal value
is around 0.1 for title queries and 0.7 for long queries.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Search.Similarities
Assembly: Lucene.Net.dll
Syntax
public class LMJelinekMercerSimilarity : LMSimilarity
Constructors
| Improve this Doc View SourceLMJelinekMercerSimilarity(LMSimilarity.ICollectionModel, Single)
Instantiates with the specified collectionModel and λ parameter.
Declaration
public LMJelinekMercerSimilarity(LMSimilarity.ICollectionModel collectionModel, float lambda)
Parameters
| Type | Name | Description |
|---|---|---|
| LMSimilarity.ICollectionModel | collectionModel | |
| System.Single | lambda |
LMJelinekMercerSimilarity(Single)
Instantiates with the specified λ parameter.
Declaration
public LMJelinekMercerSimilarity(float lambda)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | lambda |
Properties
| Improve this Doc View SourceLambda
Returns the λ parameter.
Declaration
public virtual float Lambda { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
| Improve this Doc View SourceExplain(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
| Improve this Doc View SourceGetName()
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
| Improve this Doc View SourceScore(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 |