Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (24 sloc) 0.536 kb
module Picky
# 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
end
Jump to Line
Something went wrong with that request. Please try again.