Article Preview
Buy Now
| Print: | |
| PDF: |
Feature
Soundex and Metaphone
Algorithms for matching words based on sound
Issue: 2.6 (July/August 2004)
Author: Thomas Reed
Author Bio: Thomas Reed has been programming as a hobbyist for more than 20 years, and fell in love with the Mac in 1984.
Article Description: No description available.
Article Length (in bytes): 7,128
Starting Page Number: 34
RBD Number: 2616
Resource File(s):
2616.sit Updated: Thursday, July 15, 2004 at 11:59 AM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
"I overheard Marty saying I 'have the ethics of Cthulhu' last night. I wonder who that is? Well, I'll just look in my electronic dictionary. Let's see... C-U-T-H-O-O-L-O-O. Hmm, no matches. Maybe I spelled it wrong. K-U-T-H-O-O-L-O-O. No? C-U-T-H-U-L-O-O. Ahh, I give up. It must just be the name of some famous Indian philosopher or something. I'll have to be sure to tell him thanks."
Poor Curt. He's about to make a fool of himself, all because he doesn't know how to spell a word. If only he could have found a reference to Cthulhu, he would have discovered his friend was comparing him to an evil monster-deity from H. P. Lovecraft's imagination. His embarrassment would be averted if only his electronic dictionary used an algorithm that grouped similar sounds when searching for words! Perhaps he could even turn the tables on his acquaintance and inform him that, according to Lovecraft, the name would be more aptly pronounced "Khlul'-hloo".
Soundex is an algorithm that allows for the matching of words based on how they sound rather than how they are spelled. It is an extremely old algorithm, as such things go, with the first patent on the Soundex technique dating back to 1918. As such, it is also a fairly limited algorithm. It only takes into consideration US English spellings and pronunciations, and is of no use whatsoever with non-ASCII characters. However, it has seen quite wide use, and remains of interest even today.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







