/ Check-in [6333b42d]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the phonetic-hash routine in spellfix1: Even if the first character of a word is deemed to be "silent", do not apply the special handling intended for the first character of each word to the second.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | spellfix-matchlen
Files: files | file ages | folders
SHA1: 6333b42dd292e8e567c3fce1c371d6f58021af88
User & Date: dan 2012-07-16 14:52:49
Context
2012-07-16
22:16
Fix compiler warnings about unused code in spellfix. Fix the editDist3Core() routine to return the matchlen in characters instead of bytes. Closed-Leaf check-in: f96d4e7b user: drh tags: spellfix-matchlen
14:52
Fix a bug in the phonetic-hash routine in spellfix1: Even if the first character of a word is deemed to be "silent", do not apply the special handling intended for the first character of each word to the second. check-in: 6333b42d user: dan tags: spellfix-matchlen
10:25
Merge trunk changes. check-in: 90df64ab user: dan tags: spellfix-matchlen
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_spellfix.c.

   475    475         if( i+2<nIn ){
   476    476           if( c=='t' && zIn[i+1]=='c' && zIn[i+2]=='h' ) continue;
   477    477         }
   478    478       }
   479    479       c = aClass[c&0x7f];
   480    480       if( c==CCLASS_SPACE ) continue;
   481    481       if( c==CCLASS_OTHER && cPrev!=CCLASS_DIGIT ) continue;
          482  +    aClass = midClass;
   482    483       if( c==CCLASS_VOWEL && (cPrevX==CCLASS_R || cPrevX==CCLASS_L) ){
   483    484          continue; /* No vowels beside L or R */ 
   484    485       }
   485    486       if( (c==CCLASS_R || c==CCLASS_L) && cPrevX==CCLASS_VOWEL ){
   486    487          nOut--;   /* No vowels beside L or R */
   487    488       }
   488    489       cPrev = c;
   489    490       if( c==CCLASS_SILENT ) continue;
   490    491       cPrevX = c;
   491         -    if( c==CCLASS_SPACE ) continue;
   492         -    aClass = midClass;
   493    492       c = className[c];
   494    493       if( c!=zOut[nOut-1] ) zOut[nOut++] = c;
   495    494     }
   496    495     zOut[nOut] = 0;
   497    496     return zOut;
   498    497   }
   499    498