Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.extract broken in fuzzywuzzy=0.13 #314

Open
spirit1317 opened this issue May 9, 2021 · 3 comments
Open

process.extract broken in fuzzywuzzy=0.13 #314

spirit1317 opened this issue May 9, 2021 · 3 comments

Comments

@spirit1317
Copy link

spirit1317 commented May 9, 2021

From version 0.13 onward, theres a mismatch between process.extract(scorer=fuzz.ratio) scores and fuzz.ratio.

#fuzzywuzzy==0.12
from fuzzywuzzy import process, fuzz

process.extract('OdCeny', ['producent'], scorer=fuzz.ratio)
fuzz.ratio('producent', 'OdCeny')

prints:

[('producent', 40)]
40

But

#fuzzywuzzy==0.13
from fuzzywuzzy import process, fuzz

process.extract('OdCeny', ['producent'], scorer=fuzz.ratio)
fuzz.ratio('producent', 'OdCeny')
#

prints:

[('producent', 67)]
40

Please let me know if this is a feature or bug.

@spirit1317
Copy link
Author

Also, if you change the order it will give a different score:

process.extract('OdCeny', ['producent'], scorer=fuzz.ratio)
#[('OdCeny', 40)]

process.extract('producent', ['OdCeny'], scorer=fuzz.ratio)
#[('OdCeny', 67)]

@Azrael1
Copy link

Azrael1 commented May 13, 2021

#288 (comment) @spirit1317 see this comment

@maxbachmann
Copy link

Use:

process.extract('producent', ['OdCeny'], scorer=fuzz.ratio, processor=None)
#[('OdCeny', 40)]

to get the same results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants