Methods

Files

Class/Module Index [+]

Quicksearch

Text::Metaphone

Public Instance Methods

metaphone(str, options={}) click to toggle source

Returns the Metaphone representation of a string. If the string contains multiple words, each word in turn is converted into its Metaphone representation. Note that only the letters A-Z are supported, so any language-specific processing should be done beforehand.

If the :buggy option is set, alternate 'buggy' rules are used.

# File lib/text/metaphone.rb, line 79
def metaphone(str, options={})
  return str.strip.split(/\s+/).map { |w| metaphone_word(w, options) }.join(' ')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.