How to calculate Levenshtein Distance matrix of strings in Python ?
str1 str2 str3 str4 ... strn
str1 0.8 0.4 0.6 0.1 ... 0.2
str2 0.4 0.7 0.5 0.1 ... 0.1
str3 0.6 0.5 0.6 0.1 ... 0.1
str4 0.1 0.1 0.1 0.5 ... 0.6
. . . . . ... .
. . . . . ... .
. . . . . ... .
strn 0.2 0.1 0.1 0.6 ... 0.7
Using the distance function, we can calculate distance between 2 words.
In my case, I have one list containing N
number of strings.
The desired result is to calculate the distance matrix and after that,do the clustering of words.