
Bm25LSimilarity
- Namespace
- Rowles.LeanCorpus.Search.Scoring
- Assembly
- Rowles.LeanCorpus.dll
BM25L scoring model. Extends BM25 with a delta that is modulated by tf/(1+tf), providing a more nuanced lower-bound correction than the constant delta in BM25+.
Score = idf * (normalised_tf + delta * tf / (1 + tf)).
Default: k1=1.2, b=0.75, delta=0.5.
public sealed class Bm25LSimilarity : ISimilarity
- Inheritance
-
Bm25LSimilarity
- Implements
Bm25LSimilarity(float, float, float)
Initialises a new instance with the specified BM25L parameters.
Instance
Gets the shared singleton instance with default parameters (k1=1.2, b=0.75, delta=0.5).
RequiresCollectionStatistics
Whether this similarity requires collection-level statistics (total term frequency and total terms in collection) for scoring.
PrecomputeFactors(int, int, float)
Precomputes factors constant for a given term across all documents.
Score(int, int, float, int, int)
Computes the score for a single term occurrence in a document.
ScorePrecomputed(float, float, int, int)
Scores using precomputed factors for hot-path scoring.