// returns all the pairs, but best matches first // second part of pair is similarity score (0-100) static LPair mostRelativelySimilarLevenICPairs(LS words) { new Map map; for (LS l : allSubsetsOfSize_iterator(2, words)) map.put(listToPair(l), levenSimilarityIntIC(first(l), second(l))); ret pairsSortedByBDesc(mapToPairs(map)); }