0

I am using fuzzywuzzy to do fuzzy matching and expect fuzz.ratio to work the same/yield the same results when it's used independently vs. when it is used as the 'scorer' parameter in the process module. However, it does not.

I have tried testing all other scorers using them independently as well as in process.extract, and the give the same results.

fuzz.ratio('So','SO)
>> 50

When using it in process module where on of the comparisons is the following:

...process.extract('So',['SO'])
>> 100
formicaman
  • 1,317
  • 3
  • 16
  • 32

1 Answers1

0

If you look at the source code here and here, it seems that process.extract() forces everything to lower case, while running fuzz.ratio() directly does not.

If you use the flag processor=None, you get the expected results.

process.extract('So', ['SO'], processor=None, scorer=fuzz.ratio)
>> [('SO', 50)]