Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sqlite for soundex() and soundslike(), support the spellfix1 phon…
…etic hash as an option.
- Loading branch information
Showing
8 changed files
with
112 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
run tests: | ||
test('soundex.1', $god, 'think soundex(a)', 'A000'); | ||
test('soundex.2', $god, 'think soundex(0)', '#-1 FUNCTION \(SOUNDEX\) REQUIRES A SINGLE WORD ARGUMENT'); | ||
test('soundex.3', $god, 'think soundex(fred)', 'F630'); | ||
test('soundex.4', $god, 'think soundex(phred)', 'F630'); | ||
test('soundex.5', $god, 'think soundex(afford)', 'A163'); | ||
|
||
test('soundslike.1', $god, 'think soundslike(robin, robbyn)', '1'); | ||
test('soundslike.2', $god, 'think soundslike(robin, roebuck)', '0'); | ||
test('soundslike.3', $god, 'think soundslike(frick, frack)', 1); | ||
test('soundslike.4', $god, 'think soundslike(glacier, glazier)', 1); | ||
test('soundslike.5', $god, 'think soundslike(rutabega, rototiller)', 0); | ||
test('soundex.2', $god, 'think soundex(fred)', 'F630'); | ||
test('soundex.3', $god, 'think soundex(phred, soundex)', 'F630'); | ||
test('soundex.4', $god, 'think soundex(afford)', 'A163'); | ||
|
||
test('soundex.5', $god, 'think soundex(fred, phone)', '^BRD$'); | ||
test('soundex.6', $god, 'think soundex(phred, phone)', '^BRD$'); | ||
test('soundex.7', $god, 'think soundex(afford, phone)', '^ABRD$'); | ||
|
||
test('soundex.8', $god, 'think soundex(foo, bad hash)', '^#-1'); | ||
|
||
test('soundslike.1', $god, 'think soundslike(robin, robbyn)', '^1'); | ||
test('soundslike.2', $god, 'think soundslike(robin, roebuck)', '^0'); | ||
test('soundslike.3', $god, 'think soundslike(frick, frack)', '^1'); | ||
test('soundslike.4', $god, 'think soundslike(glacier, glazier)', '^1'); | ||
test('soundslike.5', $god, 'think soundslike(rutabega, rototiller, soundex)', '^0'); | ||
|
||
test('soundslike.6', $god, 'think soundslike(robin, robbyn, phone)', '^1'); | ||
test('soundslike.7', $god, 'think soundslike(robin, roebuck, phone)', '^0'); | ||
test('soundslike.8', $god, 'think soundslike(frick, frack, phone)', '^1'); | ||
test('soundslike.9', $god, 'think soundslike(glacier, glazier, phone)', '^1'); | ||
test('soundslike.10', $god, 'think soundslike(rutabega, rototiller, phone)', '^0'); | ||
|
||
test('soundslike.11', $god, 'think soundslike(foo, bar, bad hash)', '^#-1'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters