Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v3.5.4
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (24 sloc) 0.557 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 string/symbol.
#
# Returns a symbol.
#
def encoded str_or_sym
code = Text::Metaphone.metaphone str_or_sym.to_s
code.intern if code
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.