Implementation of the soundex algorithm