editDistance

public static int editDistance(String s1, String s2)(source)

Calculates the similarity (a number within 0 and 1) between two strings.

Return

the calculated similarity (a number within 0 and 1) between two strings.

Author

Ruben Deisenroth

Parameters

s1

the first string used for the calculation of the similarity

s2

the second string used for the calculation of the similarity

See also

<a href="http://rosettacode.org/wiki/Levenshtein_distance#Java">Levenshtein distance -

Java