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

fuzz.partial_ratio result is wrong #48

Open
changjiangbailang opened this issue Feb 6, 2023 · 2 comments
Open

fuzz.partial_ratio result is wrong #48

changjiangbailang opened this issue Feb 6, 2023 · 2 comments

Comments

@changjiangbailang
Copy link

Why the score is 0? I think it is 50

image

@maxbachmann
Copy link
Contributor

This is a known issue: seatgeek/fuzzywuzzy#79. The behavior changes in case you have python-Levenshtein installed.

  1. With python-Levenshtein it simply does not find any alignment in your case -> score 0
  2. without python-Levenshtein it finds the alignment "zzab" <-> "abcd" -> score 50
  3. with the updated version from replace python-Levenshtein with rapidfuzz #10 it finds the alignment "zzab" <-> "ab" -> score 67

@josegonzalez this is another case where the current implementation does not find the optimal alignment both with and without the use of python-Levenshtein.

@maxbachmann
Copy link
Contributor

@bigtoast this was fixed by #10

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

2 participants