test-soundex.rkt
#lang racket/base
;; For legal info, see file "info.rkt".

(require (planet neil/overeasy:1:=0)
         "main.rkt")

(with-test-section
 #:id 'test-soundex
 
 (test (soundex/p "Allricht") '("A462"))
 (test (soundex/p "Ashcraft") '("A261"))
 (test (soundex/p "Auerbach") '("A612"))
 (test (soundex/p "BALDRICK") '("B436"))
 (test (soundex/p "BATEMAN") '("B355"))
 (test (soundex/p "BLACKADDER") '("B423"))
 (test (soundex/p "Cook") '("C200"))
 (test (soundex/p "DEAN") '("D500" "A500"))
 (test (soundex/p "DeSmet") '("D253" "S530" "M300"))
 (test (soundex/p "Devanter") '("D153" "V536"))
 (test (soundex/p "Eberhard") '("E166"))
 (test (soundex/p "Ellery") '("E460"))
 (test (soundex/p "Engebrethson") '("E521"))
 (test (soundex/p "Euler") '("E460"))
 (test (soundex/p "FRIEDLANDER") '("F634"))
 (test (soundex/p "Gauss") '("G200"))
 (test (soundex/p "Ghosh") '("G200"))
 (test (soundex/p "Gutierrez") '("G362"))
 (test (soundex/p "HOLMES") '("H452"))
 (test (soundex/p "Hanselmann") '("H524"))
 (test (soundex/p "Heilbronn") '("H416"))
 (test (soundex/p "Heimbach") '("H512"))
 (test (soundex/p "Henzelmann") '("H524"))
 (test (soundex/p "Hilbert") '("H416"))
 (test (soundex/p "Hildebrand") '("H431"))
 (test (soundex/p "JOHNSON") '("J525"))
 (test (soundex/p "Jackson") '("J250"))
 (test (soundex/p "Jansen") '("J525"))
 (test (soundex/p "Janzen") '("J525"))
 (test (soundex/p "Johanson") '("J525"))
 (test (soundex/p "Johnson") '("J525"))
 (test (soundex/p "Kant") '("K530"))
 (test (soundex/p "Kavanagh") '("K152"))
 (test (soundex/p "Knuth") '("K530"))
 (test (soundex/p "Ladd") '("L300" "D000"))
 (test (soundex/p "Lee") '("L000"))
 (test (soundex/p "Leigh") '("L200" "I200"))
 (test (soundex/p "Lind") '("L530"))
 (test (soundex/p "Lissajous") '("L222"))
 (test (soundex/p "Lloyd") '("L300"))
 (test (soundex/p "Lukaschowsky") '("L222"))
 (test (soundex/p "Lukasiewicz") '("L222"))
 (test (soundex/p "METSEKER") '("M322"))
 (test (soundex/p "METSKER") '("M326"))
 (test (soundex/p "MEYER") '("M600"))
 (test (soundex/p "MUSTERMANN") '("M236"))
 (test (soundex/p "McDonnell") '("M235"))
 (test (soundex/p "McGee") '("M200"))
 (test (soundex/p "Michael") '("M240"))
 (test (soundex/p "Miller") '("M460"))
 (test (soundex/p "Moskovitz") '("M213"))
 (test (soundex/p "Moskowitz") '("M232"))
 (test (soundex/p "O'Brien") '("O165"))
 (test (soundex/p "Opnian") '("O155"))
 (test (soundex/p "Oppenheimer") '("O155"))
 (test (soundex/p "PALMER") '("P456"))
 (test (soundex/p "Peters") '("P362"))
 (test (soundex/p "Peterson") '("P362"))
 (test (soundex/p "Pfister") '("P236"))
 (test (soundex/p "RANDLE") '("R534"))
 (test (soundex/p "Riedemanas") '("R355"))
 (test (soundex/p "SINGLETON") '("S524"))
 (test (soundex/p "SMITHSON") '("S532"))
 (test (soundex/p "Smith") '("S530"))
 (test (soundex/p "Swhgler") '("S460"))
 (test (soundex/p "Tymczak") '("T522"))
 (test (soundex/p "Uhrbach") '("U612"))
 (test (soundex/p "VanDeusen") '("V532" "D250"))
 (test (soundex/p "VanSmith") '("V525" "S530"))
 (test (soundex/p "WINEDALE") '("W534"))
 (test (soundex/p "WOLFE") '("W410"))
 (test (soundex/p "Washington") '("W252"))
 (test (soundex/p "Wu") '("W000"))
 (test (soundex/p "Zita") '("Z300"))
 (test (soundex/p "Zitzmeinn") '("Z325"))
 (test (soundex/p "vanDevanter") '("V531" "D153"))
 (test (soundex/p "vanvanvan") '("V515"))

 ;; TODO: Test old-style Soundex too.  One difference is "Ashcraft".
 ;;
 ;; TODO: Apparently there's some kind of Soundex implementation in SLIB.
 ;;       Monte-Carlo test against that?

 )