
Bm25PlusSimilarity
- Namespace
- Rowles.LeanCorpus.Search.Scoring
- Assembly
- Rowles.LeanCorpus.dll
BM25+ scoring model. Extends BM25 with a lower-bound delta constant to fix BM25's tendency to produce near-zero scores for very short documents.
Score = idf * (normalised_tf + delta).
Default: k1=1.2, b=0.75, delta=1.0.
public sealed class Bm25PlusSimilarity : ISimilarity
- Inheritance
-
Bm25PlusSimilarity
- Implements
Bm25PlusSimilarity(float, float, float)
Initialises a new instance with the specified BM25+ parameters.
Instance
Gets the shared singleton instance with default parameters (k1=1.2, b=0.75, delta=1.0).
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.