fuzzywuzzy icon indicating copy to clipboard operation
fuzzywuzzy copied to clipboard

process.extractOne does not match fuzz.ratio

Open Pedro-Saad opened this issue 3 years ago • 1 comments

Using the process.extractOne and fuzz.ratio give different results in this case:

from fuzzywuzzy import fuzz
from fuzzywuzzy import process

stringToMatch = 'Florinia-SP'
possibleResults = ['São Bernado do Campo-SP', 'Florínea-SP']
print(fuzz.ratio(stringToMatch,possibleResults[0]))
print(fuzz.ratio(stringToMatch,possibleResults[1]))
print(process.extract(stringToMatch,possibleResults))

While the individual fuzz.ratio give correct results (41 for the lowest score and 82 for the highest score), the process.extract gives 86 for both of them.

teste.zip

Pedro-Saad avatar Oct 31 '20 02:10 Pedro-Saad