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

rapidfuzz doesn't behave exactly like fuzzywuzzy #27

Closed
mtshrmn opened this issue Apr 24, 2020 · 1 comment
Closed

rapidfuzz doesn't behave exactly like fuzzywuzzy #27

mtshrmn opened this issue Apr 24, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mtshrmn
Copy link
Contributor

mtshrmn commented Apr 24, 2020

From what I can see, rapidfuzz doesn't work with all iterables.
Here's a piece of code to demonstrate it:

from fuzzywuzzy import process as fuzzywuzzy # version 0.18.0
from rapidfuzz import process as rapidfuzz # version 0.7.7

d = {"cow": "",	"sheep": ""}

# works in fuzzywuzzy:
fw = fuzzywuzzy.extractOne("cow", d.keys())
print(fw)
# ('cow', 100)

# doesn't work in rapidfuzz:
rf = rapidfuzz.extractOne("cow", d.keys())
print(rf)
# None

NOTE: there is an easy fix - converting the iterable to a list. But doing so is undesired as it would slow the algorithm down.

@maxbachmann maxbachmann added the bug Something isn't working label Apr 24, 2020
@maxbachmann
Copy link
Member

This is fixed in v0.7.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants