fuzz.ratio using levenstein distance? #208
-
How to calculate fuzz.ratio using levenstein distance? The current implementation uses only Indel distance. |
Beta Was this translation helpful? Give feedback.
Answered by
maxbachmann
Apr 13, 2022
Replies: 1 comment 5 replies
-
You can use the Levenshtein module: from rapidfuzz.distance import Levenshtein
score = Levenshtein.normalized_similarity(s1, s2) which returns the normalized similarity as score between 0 and 1. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
shubhamscifi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the Levenshtein module:
which returns the normalized similarity as score between 0 and 1.