Rate this page:

levenshtein_distance

Copy URL
levenshtein_distance(str1: 

string

,
str2:

string

):

number

Count the number of deletions, insertions, or substitutions required to transform str1 into str2. The number shows a measure of the similarity between two strings. It is also known as edit distance.

Parameters

  • str1:

    string

    First string

  • str2:

    string

    Second string

Returns

  • type:

    number