home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 7972 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.9 KB

  1. Path: sparky!uunet!uunet.ca!ecicrl!clewis
  2. From: clewis@ferret.ocunix.on.ca (Chris Lewis)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: SOUNDEX pattern matching
  5. Keywords: soundex, perl
  6. Message-ID: <4167@ecicrl.ocunix.on.ca>
  7. Date: 24 Jan 93 02:04:07 GMT
  8. References: <1jfjejINNm1q@fernwood.mpk.ca.us> <1452@ares.edsr.eds.com> <1993Jan23.025720.1005@Happy-Man.com>
  9. Organization: Elegant Communications Inc., Ottawa, Canada
  10. Lines: 49
  11.  
  12. In article <1993Jan23.025720.1005@Happy-Man.com> Irving_Wolfe@Happy-Man.com writes:
  13. >Before we get too far re-posting soundex code, let me ask another 
  14. >question:  I tried using this thing and found it pretty useless.  
  15. >What's it good for?  I tried to use it to find names, and it was 
  16. >just awful at it!  Is anyone at all using this for anything real
  17. >today, or is it a clever idea that didn't quite work?
  18.  
  19. Oh, it works alright.
  20.  
  21. It's very useful for finding names where you're not quite sure
  22. of the spelling.  Which makes it very good in telephone book style
  23. applications.  Surprisingly, it works reasonably well even with
  24. names that aren't of English origin, as long as the "correct" spelling
  25. conforms reasonably well with English phonetics.  It's even good at
  26. finding unpronounceable slavic names.  For example, something as
  27. minimal as "mutsi" is sufficient for finding something like Miedzinski
  28. (pronounced "mudZINZka") if you do the searching correctly.
  29.  
  30. If you found that it was just awful at it, I think you're not
  31. using it right.
  32.  
  33. Users of soundex soon learn little tricks on how to find things even
  34. easier.  Like misspelling parts of the name that they're sure of
  35. to search for in slightly different ways, or intentionally shortening
  36. it to make the "hit set" bigger.
  37.  
  38. It's used by very large corporations for name lookup, and works well.
  39. I should know, I implemented it when I wrote the telephone lookup program
  40. used internally by one of the largest corporations in this country.
  41. It's one of its best features if I do say so myself ;-)
  42.  
  43. What is important is what additional heuristics you use.  My program,
  44. by default, would show you exact matches if there were any.  If not,
  45. it displays soundex matches.  It's important to recognize when the
  46. soundex code has been padded - if it is, you may also want to
  47. match where the first non-zero characters in the soundex code
  48. do.  Ie: a search code of A100 matches all A1xx.
  49.  
  50. I also note that the perl implementation calculates an 8 digit soundex code.
  51. The precision that you will use will often restrict the size of the
  52. soundex matches.  In a corporation with something like 5,000 names,
  53. four digit soundex works well.  With 20,000 names, you may want
  54. to go to 5.  8 seems a trifle big for most applications.  Using long
  55. soundex codes just tends to shorten your possible hits with long names,
  56. and long names are where you need the widest tolerance.
  57. -- 
  58. Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
  59. Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
  60. Ferret list: ferret-request@ferret.ocunix.on.ca
  61.