Changeset 13477 for trunk/mgpp/text/Queryer.cpp
- Timestamp:
- 2006-12-11T11:22:20+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mgpp/text/Queryer.cpp
r12321 r13477 50 50 << "\t.c0/.c1\t\tcasefolding off/on\n" 51 51 << "\t.s0/.s1\t\tstemming off/on\n" 52 #ifdef ENABLE_ACCENTFOLD 53 << "\t.a0/.a1\t\taccentfolding off/on\n" 54 #endif 52 55 << "\t.o0/.o1\t\tshort output off/on\n" 53 56 << "\t.m\t\tset maxnumeric (enter the number at the prompt)\n\n" … … 91 94 92 95 // init the text system 93 96 TextData textData; 94 97 if (!textData.LoadData (basePath, textfilename)) { 95 98 FatalError (1, "Couldn't load text information for \"%s\"", textfilename); … … 134 137 //SetCStr(level, ""); 135 138 136 int defaultStemMethod = 0; // uncasefolded, unstemmed 139 int defaultStemMethod = 0; // uncasefolded, unstemmed, unaccentfolded 137 140 int defaultBoolCombine = 0; // OR 138 141 bool shortOutput = false; … … 207 210 } 208 211 else if (queryArray[1] == 'c') { // casefolding - on/off 209 if (queryArray[2] == '1') defaultStemMethod |= 1;210 else if (queryArray[2] == '0') defaultStemMethod &= 0xe;212 if (queryArray[2] == '1') defaultStemMethod |= STEM_CaseFolding; 213 else if (queryArray[2] == '0') defaultStemMethod &= (~STEM_CaseFolding); 211 214 else { 212 215 cout << "Error: please enter .c0 (case sensitive) or .c1 (casefolded)\n"; … … 214 217 } 215 218 else if (queryArray[1] == 's') { // stemming - on/off 216 if (queryArray[2] == '1') defaultStemMethod |= 2;217 else if (queryArray[2] == '0') defaultStemMethod &= 0xd;219 if (queryArray[2] == '1') defaultStemMethod |= STEM_Stemming; 220 else if (queryArray[2] == '0') defaultStemMethod &= (~STEM_Stemming); 218 221 else { 219 222 cout << "Error: please enter .s0 (unstemmed) or .s1 (stemmed)\n"; 220 223 } 221 224 } 225 #ifdef ENABLE_ACCENTFOLD 226 else if (queryArray[1] == 'a') { // accentfolding - on/off 227 if (queryArray[2] == '1') defaultStemMethod |= STEM_AccentFolding; 228 else if (queryArray[2] == '0') defaultStemMethod &= (~STEM_AccentFolding); 229 else { 230 cout << "Error: please enter .a0 (accent sensitive) or .a1 (accentfolded)\n"; 231 } 232 } 233 #endif 222 234 else if (queryArray[1] == 'o') { // output - short/long 223 235 if (queryArray[2] == '1') shortOutput = true; … … 274 286 275 287 // clean up, everybody clean up 276 288 textData.UnloadData (); 277 289 indexData.UnloadData (); 278 290
Note:
See TracChangeset
for help on using the changeset viewer.