Sha256: f2f80a194fec52fc81d2b19e371600aaa3c8e42ae0dd54ab948c421bd9c0b2fd
Contents?: true
Size: 604 Bytes
Versions: 4
Compression:
Stored size: 604 Bytes
Contents
module Picky # encoding: utf-8 # module Generators module Similarity # It's actually a combination of double metaphone # and Levenshtein. # # It uses the double metaphone to get similar words # and ranks them using the levenshtein. # class DoubleMetaphone < Phonetic # Encodes the given string/symbol. # # Returns a symbol. # def encoded str_or_sym codes = Text::Metaphone.double_metaphone str_or_sym.to_s codes.first.intern unless codes.empty? end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems