Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

process.extractOne does not match fuzz.ratio #288

Open
@Pedro-Saad

Description

@Pedro-Saad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions