-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
@dorianbrown In the seminal paper for this package, the Okapi at TREC-3 paper, and most other places, BM25 is defined over query terms rather than tokens, which would indicate that repeated query tokens should not impact the score. However, that does not seem to be the case in the rank-bm25 library:
Line 117 in 329b794
| for q in query: |
This can be easily solved by the user by passing set(query)1 rather than query to the get_scores() method, but it seems as something that the user would expect to happen automatically. At the very least, we may want to document this.
1 Alternatively, list(dict.fromkeys(query)) for reproducible ordering, since floating point summation is not always associative.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels