This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Map<String, Double> levenshtein(String value, List<String> otherValues, boolean caseSensitive) { | |
Map<String, Double> result = new HashMap<>(); | |
char[] sourceArr = value.toCharArray(); | |
int soureArrLength = sourceArr.length; | |
if(soureArrLength == 0) return result; | |
for (String otherValue : otherValues) { | |
char[] targetVal = otherValue.toCharArray(); | |
int targetValLength = targetVal.length; | |
if (targetValLength == 0) { |