Commits

Matt Chaput  committed cf5a83c

Fixed mistyped formula in BM25 function. Many, many thanks to BB user leifos for this.
Fixes issue #209.

  • Participants
  • Parent commits 3df999f
  • Branches cleanup2.4

Comments (0)

Files changed (1)

File src/whoosh/scoring.py

     # avgfl - average field length across documents in collection
     # B, K1 - free paramters
 
-    return idf * ((tf * (K1 + 1)) / (tf + K1 * (1 - B + B * (fl / avgfl))))
+    return idf * ((tf * (K1 + 1)) / (tf + K1 * ((1 - B) + B * fl / avgfl)))
 
 
 class BM25F(WeightingModel):