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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants