Skip to content

fuzz.ratio using levenstein distance? #208

Closed Answered by maxbachmann
shubhamscifi asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@shubhamscifi
Comment options

@maxbachmann
Comment options

@shubhamscifi
Comment options

@maxbachmann
Comment options

@shubhamscifi
Comment options

Answer selected by shubhamscifi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants