Improving search result using Levenshtein distance in Java
问题 I have following working Java code for searching for a word against a list of words and it works perfectly and as expected: public class Levenshtein { private int[][] wordMartix; public Set similarExists(String searchWord) { int maxDistance = searchWord.length(); int curDistance; int sumCurMax; String checkWord; // preventing double words on returning list Set<String> fuzzyWordList = new HashSet<>(); for (Object wordList : Searcher.wordList) { checkWord = String.valueOf(wordList); curDistance