levenshtein_distance
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. Add the following line to your scenario code to use the function:
require(Modules.AI);
Parameters
str1:
string
First string
str2:
string
Second string
Returns
type:
number