Sha256: 919cf7faec91ab40d0d303c4762f25b6f58ef5c4c6ec3c5ee60743151d186361

Contents?: true

Size: 499 Bytes

Versions: 21

Compression:

Stored size: 499 Bytes

Contents

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
          str_or_sym.metaphone
        end

      end

    end

  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
picky-3.6.0 lib/picky/generators/similarity/metaphone.rb