Class: Picky::Generators::Similarity::Metaphone
- Inherits:
-
Phonetic
- Object
- Picky::Generators::Strategy
- Phonetic
- Picky::Generators::Similarity::Metaphone
- Defined in:
- lib/picky/generators/similarity/metaphone.rb
Overview
It’s actually a combination of metaphone and Levenshtein.
It uses the metaphone to get similar words and ranks them using the levenshtein.
Instance Attribute Summary
Attributes inherited from Phonetic
Instance Method Summary collapse
-
#encode(str_or_sym) ⇒ Object
Encodes the given string/symbol.
Methods inherited from Phonetic
#check_gem, #initialize, #prioritize
Methods inherited from Picky::Generators::Strategy
Constructor Details
This class inherits a constructor from Picky::Generators::Similarity::Phonetic
Instance Method Details
#encode(str_or_sym) ⇒ Object
Encodes the given string/symbol.
Returns a symbol.
21 22 23 |
# File 'lib/picky/generators/similarity/metaphone.rb', line 21 def encode str_or_sym str_or_sym. end |