So, we've been tasked with creating a soundex function which will spit out 7-characters. I've found plenty of information thus far to set something up. But, my work is being compared against the soundex( ) function in Oracle, as well as some available on websites here & there. I'm fine with that.
The following is giving me trouble though: "AB Frame Tech Inc"
If I have my function return the soundex equivalent of this (truncated to 4 characters), I get "A165", while Oracle gets "A116". Several websites are also returning "A116". But, if you remove a space, and make the name "ABFrame Tech Inc", then everything is returning "A165". If you're familiar with the process of converting a string to it's soundex equivalent, spaces are ignored. So the fact that it's not being ignored is stumping me, and causing my function to be untrusted. Can someone let me know where the gap in my understanding is?
This is how I am calculating the outcome:
1) remove all non-alpha characters and uppercase: "ABFRAMETECHINC"
2) convert non-vowels to their numerix equivalent, remove all H's and W's: A116A5E3E2I52
3) remove all duplicate characters that are immediately adjacent: A16A5E3E2I52
4) remove all vowels except for the first character: A165[3252]
I am confused, so I'd really appreciate your help.
--=Chuck