Missing "tf" in the numerator of the BM25 weighting function
BM25.java with corrections
Attaching patch version instead of new file.
Francois, as you additionally have changed the 2-param method, can you verify correctness by reporting MAPs on a test collection? Also, can you verify the correctness of the 5-param method in the same way?
On wt10g with a b set to 0.2505, the MAP doesn't change for the 2-param method (0.2111 in both cases - I know that http://terrier.org/docs/v3.5/trec_examples.html indicates 0.2104).
For the 5-param method, the MAP decreases from 0.2161 to 0.2111 but the formula is "wrong" since tf is added twice in the denominator of the TF-based term.
Idem on disks 4&5 with a MAP of 0.2502.
ant test passes successfully.
Committed for 4.1 (2 param method only). Thanks!