Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Detecting typos
Rauf Sarwar wrote:
> CE wrote:
>
[major snip]
> Maybe you should have incorporated SOUNDEX as originally suggested by
> Sybrand. Soundex will not pick up any gross spelling mistakes but if it
> sounds similar then it will pick it up. In your example above,
> 'CHARLIE' does not sound similar to 'CHALRIE' so soundex will not pick
> it up.
>
> SQL> select 1 from dual
> 2 where soundex('CHARLIE') = soundex('CHARLI');
>
> 1
> ----------
> 1
>
> SQL> select 1 from dual
> 2 where soundex('CHARLIE') = soundex('CHARLIW');
>
> 1
> ----------
> 1
>
> SQL> select 1 from dual
> 2 where soundex('CHARLIE') = soundex('CHARL');
>
> 1
> ----------
> 1
>
> SQL> select 1 from dual
> 2 where soundex('CHARLIE') = soundex('CHALRIE');
> 1
> ----------
>
> SQL>
>
> Regards
> /Rauf
>
Well, soundex only checks for a limited set of
characters, returning fixed values for the first
four (after discarding vowels, H, Y and W).
So, it's only logical that soundex('CHARLIE')
is different from soundex('CHALRIE'), as in fact
CLR is compared to CRL.
See
http://www.csc.fi/cschelp/sovellukset/stat/sas/sasdoc/sashtml/lgref/z0245948.htm
for an explanation of soundex
Nice to see a 1918 algorithm for U.S. census records since 1880 is still used and discussed :).
-- Regards, Frank van BortelReceived on Fri Jan 07 2005 - 07:30:52 CST