-
Notifications
You must be signed in to change notification settings - Fork 876
Partial_Ratio not working #279
Comments
I'm having the same issue, I would also expect a score of 100 with the below function
I also tried without |
Possibly replace |
partial_ratio searches for the best alignment between two strings and the calculates the @aW3st you tried both with python-Levenshtein and without and both have wrong results for different reasons.
m = SequenceMatcher(None, shorter, longer, False) As a sidenote my library rapidfuzz provides the same string matching algorithm without this problem, so your example string returns a score of 100 as you expected |
Thanks Max, I'll give your library a shot! |
@maxbachmann Hi Max, I'm working with @aW3st on a project. We've swapped fuzzywuzzy for your library, and we're seeing great performance. Thanks! |
Having some weird issues using partial ratio. Here's the code:
without python-levenshtein this returns 33, with python levenshtein 67. My understanding of the method is that it should be 100, since there's a substring that's a perfect match. Any ideas?
(on python 3.8, btw)
The text was updated successfully, but these errors were encountered: