We’ve just released a Soundex class which enables you to get an output string from an input string that represents how the input string sounds. This enables you to find string and words that sound alike.
As an example “Ralph” and “Rolf” and “Rolph” have the same soundex output. This class might be very handy when doing a phonetic lookup on a search string, when you don’t know the exact spelling of a word or when you’re interested in getting results ‘near’ your search query.
You can find more information on the soundex algorithm here on wikipedia
The usage is very simple:
//outputs the soundex string "r4l0" var output: String = Soundex.create("rolf");
There’s lots of other useful little tools in the utils package, so be sure to check them out
0 Responses to “Soundex algorithm for indexing strings by sound in Utils package”
Leave a Reply