Talk:Soundex: Difference between revisions

→‎Which Soundex?: The "Knuth algorithm" is not as well defined as you might imagine.
(→‎Task Improvement: added my 2¢ worth. -- ~~~~)
(→‎Which Soundex?: The "Knuth algorithm" is not as well defined as you might imagine.)
Line 20:
 
:There's an algorithm that's been floating around for years that's attributed to (DE?) Knuth, but that's not the original. Mind you, the original was not designed for use by computers either. In any case, go with the Knuth algorithm (Google can find implementations of it easily enough). –[[User:Dkf|Donal Fellows]] 12:12, 14 November 2009 (UTC)
 
::The problem with saying "go with the Knuth algorithm" is that it's not clear what that actually is. The Php soundex function and the Tcllib soundex package both claim to implement the Knuth algorithm and return A226 for Ashcraft. However, the Perl Text::Soundex module supports two functions: soundex (returning A226) and soundex_nara (returning A261), with the documentation claiming "the algorithm described by Knuth is the NARA algorithm" (i.e. A261).
 
::Now if you were to pop into a book store and actually have a look at a recent edition of Knuth's TAOCP, you'll see that his algorithm clearly describes the special case handling of H and W, so that would suggest that Perl is correct, and Php and Tcl are wrong. But it's not as simple as that. From what I've read, Knuth's definition actually changed between editions 2 and 3 of his book, so both are probably correct - they've just been referencing two different editions of the book!
 
::The bottom line is there is no standard soundex definition. Rerencing Wikipedia is pointless since it's constantly changing and referencing Knuth doesn't seem to be any better. It would have helped if this task actually included the algorithm (any algorithm) as part of the task definition, but it's far too late to fix that now. Just accept the fact that half the solutions are going to implement the H/W rule and half aren't. --[[User:J4 james|j4_james]] ([[User talk:J4 james|talk]]) 00:44, 23 October 2015 (UTC)
Anonymous user