The current implementation of the SoundexSimplifier has a maximum soundex size because the implementation is rather naive. Implementation should be fixed to be less naive.
// Drop first letter code and remove zeros
wordStr = wordStr.substring(1).replaceAll("0", "");
// FIXME: This will not work for all soundex lenghts
wordStr += "000000000000000000"; /* pad with zeros on right */
// Add first letter of word and size to taste
wordStr = firstLetter + "-" + wordStr.substring(0, length - 2);
return wordStr;
The current implementation of the SoundexSimplifier has a maximum soundex size because the implementation is rather naive. Implementation should be fixed to be less naive.