rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics
https://rapidfuzz.github.io/RapidFuzz/
MIT License
2.61k stars 116 forks source link

fuzz_py.token_set_ratio and fuzz.token_set_ratio have different results #353

Closed BeanWei closed 9 months ago

BeanWei commented 9 months ago
>>> fuzz_py.token_set_ratio("js", "vue js")
80.0
>>> fuzz.token_set_ratio("js", "vue js")
100.0
maxbachmann commented 9 months ago

Thanks for reporting. This is a bug in the pure python fallback implementation of token_set_ratio. I fixed it in https://github.com/maxbachmann/RapidFuzz/commit/9993c17aebbb82b021e1e4b90369ca32ece7e1bc