Changeset 12885
- Timestamp:
- 2006-09-28T10:56:12+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/mgpp/text/mgpp_stem_idx.cpp
r9611 r12885 80 80 81 81 // stem the word 82 stemmer (stemMethod, stemmerNum, mgWord);82 mgpp_stemmer (stemMethod, stemmerNum, mgWord); 83 83 84 84 // convert the result back to a UCArray … … 101 101 int stemmerNum, 102 102 unsigned long entriesPerBlock) { 103 104 /* [JFG - Mar 06: Accent folding patch] */ 103 105 // Create appropriate stem index file 104 106 FILE *stemDictFile = NULL; 105 if (stemMethod == 1) { 106 stemDictFile = create_file (filename, INVF_DICT_BLOCKED_1_SUFFIX, 107 "wb", MAGIC_STEM_1, MG_ABORT); 108 } else if (stemMethod == 2) { 109 stemDictFile = create_file (filename, INVF_DICT_BLOCKED_2_SUFFIX, 110 "wb", MAGIC_STEM_2, MG_ABORT); 111 } else if (stemMethod == 3) { 112 stemDictFile = create_file (filename, INVF_DICT_BLOCKED_3_SUFFIX, 113 "wb", MAGIC_STEM_3, MG_ABORT); 114 } else { 107 if (stemMethod >= STEM_MIN && stemMethod <= STEM_MAX) { 108 char *suffix = make_suffix (INVF_DICT_BLOCKED_SUFFIX_PAT, stemMethod, NULL); 109 stemDictFile = create_file (filename, suffix, 110 "wb", MAGIC_STEM_GEN(stemMethod + '0'), MG_ABORT); 111 } 112 else { 115 113 FatalError (1, "Unknown stem method %d", stemMethod); 116 114 } … … 213 211 break; 214 212 case 'a': 215 stemmerNum = stemmernumber ((unsigned char *) optarg);213 stemmerNum = mgpp_stemmernumber ((unsigned char *) optarg); 216 214 break; 217 215 case 'h': … … 224 222 } 225 223 226 if (stemMethod < 1 || stemMethod > 3) 227 FatalError (1, "Stem method must be 1, 2 or 3"); 224 /* [JFG - Mar 06: Accent folding patch] */ 225 if (stemMethod < STEM_MIN || stemMethod > STEM_MAX) 226 FatalError (1, "Stem method must be between %d and %d", STEM_MIN, STEM_MAX); 228 227 229 228 // read in the dictionary and create the in memory dictionary
Note:
See TracChangeset
for help on using the changeset viewer.