Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.473 kB
# encoding: utf-8
#
module Generators
module Similarity
# It's actually a combination of metaphone
# and Levenshtein.
#
# It uses the metaphone to get similar words
# and ranks them using the levenshtein.
#
class Metaphone < Phonetic
# Encodes the given symbol.
#
# Returns a symbol.
#
def encoded sym
code = Text::Metaphone.metaphone sym.to_s
code.to_sym if code
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.