Sha256: 1503ed1d31ba4af28aac9c83937db71111c3f71d644a132cf64085a4764e40be

Contents?: true

Size: 526 Bytes

Versions: 15

Compression:

Stored size: 526 Bytes

Contents

# encoding: utf-8
#
module Internals

  module Generators

    module Similarity

      # It's actually a combination of soundex
      # and Levenshtein.
      #
      # It uses the soundex to get similar words
      # and ranks them using the levenshtein.
      #
      class Soundex < Phonetic

        # Encodes the given symbol.
        #
        # Returns a symbol.
        #
        def encoded sym
          code = Text::Soundex.soundex sym.to_s
          code.to_sym if code
        end

      end

    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
picky-2.5.2 lib/picky/internals/generators/similarity/soundex.rb
picky-2.5.1 lib/picky/internals/generators/similarity/soundex.rb
picky-2.5.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.4.3 lib/picky/internals/generators/similarity/soundex.rb
picky-2.4.2 lib/picky/internals/generators/similarity/soundex.rb
picky-2.4.1 lib/picky/internals/generators/similarity/soundex.rb
picky-2.4.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.3.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.2.1 lib/picky/internals/generators/similarity/soundex.rb
picky-2.2.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.1.2 lib/picky/internals/generators/similarity/soundex.rb
picky-2.1.1 lib/picky/internals/generators/similarity/soundex.rb
picky-2.1.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.0.0 lib/picky/internals/generators/similarity/soundex.rb
picky-2.0.0.pre3 lib/picky/internals/generators/similarity/soundex.rb