Ruby function to find american Soundex of an word Based upon https://en.wikipedia.org/wiki/Soundex Usage Install by using this code $ gem install soundex Use it like this require 'soundex' Soundex.new "Madras" Soundex.new "Madharas"