BM25Similarity
class BM25Similarity(k1: Float = 1.2f, b: Float = 0.75f, discountOverlaps: Boolean = true) : Similarity
BM25 Similarity. Introduced in Stephen E. Robertson, Steve Walker, Susan Jones, Micheline Hancock-Beaulieu, and Mike Gatford. Okapi at TREC-3. In Proceedings of the Third Text REtrieval Conference (TREC 1994). Gaithersburg, USA, November 1994.
Properties
Functions
Link copied to clipboard
Computes the normalization value for a field at index-time.
Link copied to clipboard
fun idfExplain(collectionStats: CollectionStatistics, termStats: Array<out TermStatistics>): Explanation
Computes a score factor for a phrase.
Computes a score factor for a simple term and returns an explanation for that score factor.
Link copied to clipboard
open override fun scorer(boost: Float, collectionStats: CollectionStatistics, vararg termStats: TermStatistics): Similarity.SimScorer
Compute any collection-level weight (e.g. IDF, average document length, etc) needed for scoring a query.