class Bundler::SimilarityDetector
def similar_words(word, limit = 3)
def similar_words(word, limit = 3) words_by_similarity = @corpus.map {|w| SimilarityScore.new(w, levenshtein_distance(word, w)) } words_by_similarity.select {|s| s.distance <= limit }.sort_by(&:distance).map(&:string) end