In the spellfix phonehash() function, add letter W into the same character

class as V.

FossilOrigin-Name: 7536101317c00fbb5bf555120feb55b9bc40e8ba
This commit is contained in:
drh 2012-08-31 14:55:05 +00:00
parent 19038f1b79
commit e0d058c6d8
4 changed files with 23 additions and 25 deletions

View File

@ -1,5 +1,5 @@
C Changes\sfor\sERROR_PATH_NOT_FOUND\sin\saddition\sto\sERROR_FILE_NOT_FOUND\sin\s\nwinAccess().
D 2012-08-31T12:31:18.969
C In\sthe\sspellfix\sphonehash()\sfunction,\sadd\sletter\sW\sinto\sthe\ssame\scharacter\nclass\sas\sV.
D 2012-08-31T14:55:05.521
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -221,7 +221,7 @@ F src/test_quota.h 8761e463b25e75ebc078bd67d70e39b9c817a0cb
F src/test_rtree.c aba603c949766c4193f1068b91c787f57274e0d9
F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0
F src/test_server.c 2f99eb2837dfa06a4aacf24af24c6affdf66a84f
F src/test_spellfix.c 0a5b5b27fc48b00f9e6fd6700f9535de538a964f
F src/test_spellfix.c 0f03970686403fe33fca1a74b0b60af42fb5929e
F src/test_stat.c d1569c7a4839f13e80187e2c26b2ab4da2d03935
F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae
@ -719,7 +719,7 @@ F test/speed3.test d32043614c08c53eafdc80f33191d5bd9b920523
F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715
F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa
F test/speed4p.test 0e51908951677de5a969b723e03a27a1c45db38b
F test/spellfix.test 4e339920585e7555660bd3b11cf338af82c656ae
F test/spellfix.test 2953e9da0e46dab5f83059ef6bfdebca66e13418
F test/sqllimits1.test b1aae27cc98eceb845e7f7adf918561256e31298
F test/stat.test 08e8185b3fd5b010c90d7ad82b9dd4ea1cbf14b0
F test/stmt.test 25d64e3dbf9a3ce89558667d7f39d966fe2a71b9
@ -1013,7 +1013,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
P d3cf6832a59fe4c5723761abb4c89614406b03db
R 3b56b1cf438f03ed04a187d25a245ed3
P 527340abff18aedbcb0f82ac1296a9f548e24ac4
R 12ea0046f8ada46a86a2cc753f34f9c0
U drh
Z 950f4ab8e7c8c7fcad5f5a96fb146fb0
Z 80f09e05bcc34157b6c058b371e0115a

View File

@ -1 +1 @@
527340abff18aedbcb0f82ac1296a9f548e24ac4
7536101317c00fbb5bf555120feb55b9bc40e8ba

View File

@ -30,18 +30,17 @@
**
** 0 '' Silent letters: H W
** 1 'A' Any vowel: A E I O U (Y)
** 2 'B' A bilabeal stop or fricative: B F P V
** 2 'B' A bilabeal stop or fricative: B F P V W
** 3 'C' Other fricatives or back stops: C G J K Q S X Z
** 4 'D' Alveolar stops: D T
** 5 'H' Letter H at the beginning of a word
** 6 'L' Glide: L
** 7 'R' Semivowel: R
** 8 'M' Nasals: M N
** 9 'W' Letter W at the beginning of a word
** 10 'Y' Letter Y at the beginning of a word.
** 11 '9' Digits: 0 1 2 3 4 5 6 7 8 9
** 12 ' ' White space
** 13 '?' Other.
** 9 'Y' Letter Y at the beginning of a word.
** 10 '9' Digits: 0 1 2 3 4 5 6 7 8 9
** 11 ' ' White space
** 12 '?' Other.
*/
#define CCLASS_SILENT 0
#define CCLASS_VOWEL 1
@ -52,11 +51,10 @@
#define CCLASS_L 6
#define CCLASS_R 7
#define CCLASS_M 8
#define CCLASS_W 9
#define CCLASS_Y 10
#define CCLASS_DIGIT 11
#define CCLASS_SPACE 12
#define CCLASS_OTHER 13
#define CCLASS_Y 9
#define CCLASS_DIGIT 10
#define CCLASS_SPACE 11
#define CCLASS_OTHER 12
/*
** The following table gives the character class for non-initial ASCII
@ -92,7 +90,7 @@ static const unsigned char midClass[] = {
/* N */ CCLASS_M, /* O */ CCLASS_VOWEL, /* P */ CCLASS_B,
/* Q */ CCLASS_C, /* R */ CCLASS_R, /* S */ CCLASS_C,
/* T */ CCLASS_D, /* U */ CCLASS_VOWEL, /* V */ CCLASS_B,
/* W */ CCLASS_SILENT, /* X */ CCLASS_C, /* Y */ CCLASS_VOWEL,
/* W */ CCLASS_B, /* X */ CCLASS_C, /* Y */ CCLASS_VOWEL,
/* Z */ CCLASS_C, /* [ */ CCLASS_OTHER, /* \ */ CCLASS_OTHER,
/* ] */ CCLASS_OTHER, /* ^ */ CCLASS_OTHER, /* _ */ CCLASS_OTHER,
/* ` */ CCLASS_OTHER, /* a */ CCLASS_VOWEL, /* b */ CCLASS_B,
@ -102,7 +100,7 @@ static const unsigned char midClass[] = {
/* l */ CCLASS_L, /* m */ CCLASS_M, /* n */ CCLASS_M,
/* o */ CCLASS_VOWEL, /* p */ CCLASS_B, /* q */ CCLASS_C,
/* r */ CCLASS_R, /* s */ CCLASS_C, /* t */ CCLASS_D,
/* u */ CCLASS_VOWEL, /* v */ CCLASS_B, /* w */ CCLASS_SILENT,
/* u */ CCLASS_VOWEL, /* v */ CCLASS_B, /* w */ CCLASS_B,
/* x */ CCLASS_C, /* y */ CCLASS_VOWEL, /* z */ CCLASS_C,
/* { */ CCLASS_OTHER, /* | */ CCLASS_OTHER, /* } */ CCLASS_OTHER,
/* ~ */ CCLASS_OTHER, /* */ CCLASS_OTHER,
@ -142,7 +140,7 @@ static const unsigned char initClass[] = {
/* N */ CCLASS_M, /* O */ CCLASS_VOWEL, /* P */ CCLASS_B,
/* Q */ CCLASS_C, /* R */ CCLASS_R, /* S */ CCLASS_C,
/* T */ CCLASS_D, /* U */ CCLASS_VOWEL, /* V */ CCLASS_B,
/* W */ CCLASS_W, /* X */ CCLASS_C, /* Y */ CCLASS_Y,
/* W */ CCLASS_B, /* X */ CCLASS_C, /* Y */ CCLASS_Y,
/* Z */ CCLASS_C, /* [ */ CCLASS_OTHER, /* \ */ CCLASS_OTHER,
/* ] */ CCLASS_OTHER, /* ^ */ CCLASS_OTHER, /* _ */ CCLASS_OTHER,
/* ` */ CCLASS_OTHER, /* a */ CCLASS_VOWEL, /* b */ CCLASS_B,
@ -152,7 +150,7 @@ static const unsigned char initClass[] = {
/* l */ CCLASS_L, /* m */ CCLASS_M, /* n */ CCLASS_M,
/* o */ CCLASS_VOWEL, /* p */ CCLASS_B, /* q */ CCLASS_C,
/* r */ CCLASS_R, /* s */ CCLASS_C, /* t */ CCLASS_D,
/* u */ CCLASS_VOWEL, /* v */ CCLASS_B, /* w */ CCLASS_W,
/* u */ CCLASS_VOWEL, /* v */ CCLASS_B, /* w */ CCLASS_B,
/* x */ CCLASS_C, /* y */ CCLASS_Y, /* z */ CCLASS_C,
/* { */ CCLASS_OTHER, /* | */ CCLASS_OTHER, /* } */ CCLASS_OTHER,
/* ~ */ CCLASS_OTHER, /* */ CCLASS_OTHER,
@ -163,7 +161,7 @@ static const unsigned char initClass[] = {
** character class. Note that initClass[] can be used to map the class
** symbol back into the class number.
*/
static const unsigned char className[] = ".ABCDHLRMWY9 ?";
static const unsigned char className[] = ".ABCDHLRMY9 ?";
/*
** Generate a "phonetic hash" from a string of ASCII characters

View File

@ -68,7 +68,7 @@ do_test 1.1 {
} {}
foreach {tn word res} {
1 raxpi* {rasping 5 rasped 5 raspberry 6 rasp 4 rasps 4}
1 raxpi* {rasping 5 rasped 5 ragweed 5 raspberry 6 rasp 4}
2 ril* {rail 4 railed 4 railer 4 railers 4 railing 4}
3 rilis* {realism 6 realist 6 realistic 6 realistically 6 realists 6}
4 reail* {real 3 realest 3 realign 3 realigned 3 realigning 3}