Skip to content

What's the difference between the distance and similarity functions? #111

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

You must be logged in to vote

I never really got around to making the C++ documentation nice 😅

Your interpretation is correct about what these are:

  • distance -> what you would regularly call Levenshtein distance, which is a score between 0 and max, where max for the uniform Levenshtein distance is max(len1, len2)
  • similarity -> the inversed version, so a score between max and 0 where max is the optimum
  • normalized_distance / normalized_similarity -> normalized version of the versions above to a range from 0.0-1.0 or 1.0-0.0 respectively

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stijnfrishert
Comment options

Answer selected by stijnfrishert
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