Changeset 12994


Ignore:
Timestamp:
2006-10-04T14:06:47+13:00 (18 years ago)
Author:
kjdon
Message:

moved all the STEM methods and hash defines from mg_files.h into stemmer.h

Location:
trunk/gsdl/src/mgpp/text
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/IndexData.h

    r12886 r12994  
    2828#include "FragLevelConvert.h"
    2929#include "Weights.h"
    30 #include "mg_files.h"
     30#include "stemmer.h"
    3131
    3232class IndexData {
  • trunk/gsdl/src/mgpp/text/mg_files.h

    r12881 r12994  
    5050#define MAGIC_WGHT_APPROX   GEN_MAGIC('M','G','w', 0 )
    5151#define MAGIC_PARAGRAPH     GEN_MAGIC('M','G','P', 0 )
    52 /* [RPAP - Jan 97: Stem Index Change] */
    53 /* [JFG - Mar 06: Accent folding patch] */
    54 enum stemMethods {
    55     STEM_None       =   0,
    56     STEM_CaseFolding    =   0x1,
    57     STEM_Stemming       =   0x2,
    58     STEM_AccentFolding  =   0x4,
    59 };
    60 
    61 /* This is for the QueryParser */
    62 #define CHAR_FLAG_STEM_CaseFold    'i'  // ignore case
    63 #define CHAR_FLAG_STEM_NoCaseFold  'c'  // case sensitive
    64 #define CHAR_FLAG_STEM_Stemming    's'  // stem words
    65 #define CHAR_FLAG_STEM_NoStemming  'u'  // do not stem words
    66 #define CHAR_FLAG_STEM_AccentFold  'f'  // accent fold
    67 #define CHAR_FLAG_STEM_NoAccentFold  'a'    // do no accent folding
    68 #define CHAR_FLAG_STEM_Validator  "icsufa"  // all of the above
    69 
    70 
    71 #define STEM_MIN 1
    72 #define STEM_MAX (STEM_CaseFolding | STEM_Stemming | STEM_AccentFolding)
    73 #define STEM_PARTIAL_MATCH  (STEM_MAX+1)
    74 #define STEM_INVALID        (STEM_MAX+2)
    75 #define MAGIC_STEM_GEN(x)       GEN_MAGIC('M', 'G', 's', x)
     52#define MAGIC_STEM_GEN(x)   GEN_MAGIC('M', 'G', 's', x)
    7653#define IS_MAGIC(a) ((((u_long)(a)) & 0xffff0000) == MAGIC_XXXX)
    7754
  • trunk/gsdl/src/mgpp/text/stemmer.cpp

    r12915 r12994  
    2222#include "sysfuncs.h"
    2323#include "stemmer.h"
    24 #include "mg_files.h"
    2524#include "lovinstem.h"
    2625#include "simplefrenchstem.h"
  • trunk/gsdl/src/mgpp/text/stemmer.h

    r12879 r12994  
    2424
    2525#include "sysfuncs.h"
     26
     27/* [RPAP - Jan 97: Stem Index Change] */
     28/* [JFG - Mar 06: Accent folding patch] */
     29enum stemMethods {
     30    STEM_None       =   0,
     31    STEM_CaseFolding    =   0x1,
     32    STEM_Stemming       =   0x2,
     33    STEM_AccentFolding  =   0x4,
     34};
     35
     36/* This is for the QueryParser */
     37#define CHAR_FLAG_STEM_CaseFold    'i'  // ignore case
     38#define CHAR_FLAG_STEM_NoCaseFold  'c'  // case sensitive
     39#define CHAR_FLAG_STEM_Stemming    's'  // stem words
     40#define CHAR_FLAG_STEM_NoStemming  'u'  // do not stem words
     41#define CHAR_FLAG_STEM_AccentFold  'f'  // accent fold
     42#define CHAR_FLAG_STEM_NoAccentFold  'a'    // do no accent folding
     43#define CHAR_FLAG_STEM_Validator  "icsufa"  // all of the above
     44
     45
     46#define STEM_MIN 1
     47#define STEM_MAX (STEM_CaseFolding | STEM_Stemming | STEM_AccentFolding)
     48#define STEM_PARTIAL_MATCH  (STEM_MAX+1)
     49#define STEM_INVALID        (STEM_MAX+2)
    2650
    2751#define STEMMER_MASK 3
Note: See TracChangeset for help on using the changeset viewer.