class String
Public Instance Methods
caverphone(options = {})
click to toggle source
Caverphone value of string @example
'Lashaunda'.caverphone # => 'LSNT11' 'Vidaurri'.caverphone # => 'FTR111'
# File lib/phonetic/core_ext/string/caverphone.rb, line 8 def caverphone(options = {}) Phonetic::Caverphone.encode(self, options) end
caverphone2(options = {})
click to toggle source
Caverphone 2 value of string @example
'Stevenson'.caverphone2 # => 'STFNSN1111' 'Peter'.caverphone2 # => 'PTA1111111'
# File lib/phonetic/core_ext/string/caverphone2.rb, line 8 def caverphone2(options = {}) Phonetic::Caverphone2.encode(self, options) end
dm_soundex(options = {})
click to toggle source
D-M Soundex values of string. @example
'Anja'.dm_soundex # => ['060000', '064000'] 'Schwarz'.dm_soundex # => ['474000', '479400'] 'Schtolteheim'.dm_soundex # => ['283560']
# File lib/phonetic/core_ext/string/dm_soundex.rb, line 9 def dm_soundex(options = {}) Phonetic::DMSoundex.encode(self, options) end
double_metaphone(options = { size: 4 })
click to toggle source
Double Metahpone code of string. @example
'czerny'.double_metaphone # => ['SRN', 'XRN'] 'dumb'.double_metaphone # => ['TM', 'TM'] 'edgar'.double_metaphone # => ['ATKR', 'ATKR'] # or use alias: 'czerny'.metaphone2 # => ['SRN', 'XRN'] 'dumb'.metaphone2 # => ['TM', 'TM'] 'edgar'.metaphone2 # => ['ATKR', 'ATKR']
# File lib/phonetic/core_ext/string/double_metaphone.rb, line 13 def double_metaphone(options = { size: 4 }) Phonetic::DoubleMetaphone.encode(self, options) end
Also aliased as: metaphone2
metaphone(options = { size: 4 })
click to toggle source
Metaphone value of string. @example
'Accola'.metaphone # => 'AKKL' 'Nikki'.metaphone # => 'NK' 'Wright'.metaphone #=> 'RT'
# File lib/phonetic/core_ext/string/metaphone.rb, line 9 def metaphone(options = { size: 4 }) Phonetic::Metaphone.encode(self, options) end
nysiis(options = { trim: true })
click to toggle source
NYSIIS value of string. @example
'Alexandra'.nysiis # => 'ALAXANDR' 'Aumont'.nysiis # => 'AANAD' 'Bonnie'.nysiis # => 'BANY'
# File lib/phonetic/core_ext/string/nysiis.rb, line 9 def nysiis(options = { trim: true }) Phonetic::NYSIIS.encode(self, options) end
refined_nysiis(options = { trim: true })
click to toggle source
Refined NYSIIS value of string. @example
'Aumont'.refined_nysiis # => 'ANAD' 'Phoenix'.refined_nysiis # => 'FANAC' 'Schmidt'.refined_nysiis # => 'SNAD'
# File lib/phonetic/core_ext/string/refined_nysiis.rb, line 9 def refined_nysiis(options = { trim: true }) Phonetic::RefinedNYSIIS.encode(self, options) end
refined_soundex(options = { trim: true })
click to toggle source
Refined Soundex value of string. @example
'Caren'.refined_soundex # => 'C30908' 'Hayers'.refined_soundex # => 'H093' 'Lambard'.refined_soundex # => 'L7081096'
# File lib/phonetic/core_ext/string/refined_soundex.rb, line 9 def refined_soundex(options = { trim: true }) Phonetic::RefinedSoundex.encode(self, options) end
soundex(options = { trim: true })
click to toggle source
Soundex value of string @example
'Ackerman'.soundex # => 'A265' 'ammonium'.soundex # => 'A500' 'implementation'.soundex # => 'I514'
# File lib/phonetic/core_ext/string/soundex.rb, line 9 def soundex(options = { trim: true }) Phonetic::Soundex.encode(self, options) end