Changeset 26137
- Timestamp:
- 2012-08-30T12:45:08+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mgpp/text/Terms.cpp
r25147 r26137 213 213 // if the stem method specified is not a valid one (i.e. there was no appropriate stem index, then we set it to 0) 214 214 // unless we have partial matching, in which case we are not doing stem indexes anyway. 215 if (!(stemMethod & STEM_PARTIAL_MATCH) && indexData.stemFile[stemMethod-1] == NULL) { 216 cerr << "Stem index for method "<<stemMethod<< " was not built, so not doing stemming\n"; 217 stemMethod = 0; 215 216 if (!(stemMethod & STEM_PARTIAL_MATCH)) { 217 218 if(stemMethod > STEM_MAX) { 219 cerr << "Stem method "<<stemMethod<< " is greater than maximum allowed ("<<STEM_MAX<<"). Not doing stemming\n"; 220 stemMethod=0; 221 } 222 else if (stemMethod > 0 && indexData.stemFile[stemMethod-1] == NULL) { 223 cerr << "Stem index for method "<<stemMethod<< " was not built, so not doing stemming\n"; 224 stemMethod = 0; 225 } 218 226 } 219 227 /* [JFG - Mar 06: Accent folding patch] */ … … 247 255 mg_u_long stemmerNum = 0; 248 256 249 /* [JFG - Mar 06: Accent folding patch] */250 if(stemMethod > STEM_MAX) {251 return;252 //TODO: throw an error here253 }254 257 255 258 stemmerNum = indexData.sih[stemMethod-1].stemmer_num;
Note:
See TracChangeset
for help on using the changeset viewer.