Soundex最初用于美国移民信息统计,因为在20世纪初期美国还有许多文盲。不能正确的规范的拼写他么的姓氏。
例如smith 和 smyth 发音是相同的。但是如果计算机并不知道,这样不便于检索。
Soundex算法就是将相近发音的字母归为一类。例如 D 和 T 归为同一个发音组,因为其发音近似。下面就是Soundex 发音组表格。
Soundex代码 | 语音组 |
0 | A,E,I,O,U,W,H,Y |
1 | B,F,P,V |
2 | C,G,J,K,Q,S,X,Z |
3 | D,T |
4 | L |
5 | M,N |
6 | R |
根据英语发音可以将算法归纳如下
1. 代码固定长度为4位,不足4位后面补0