Changeset 819 for trunk


Ignore:
Timestamp:
1999-12-11T04:02:41+13:00 (24 years ago)
Author:
cs025
Message:

Omission of stemmer number in parameters to stemmer and parser corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/mg/src/text/bool_parser.y

    r439 r819  
    4949static bool_tree_node *tree_base = NULL;
    5050static TermList **term_list;
     51static int stemmer_num;
    5152static int stem_method;
    5253/* [RPAP - Jan 97: Stem Index Change] */
     
    7778 
    7879 
    79 term:     TERM  { $$ = CreateBoolTermNode(term_list, $1, 1, word_num, count, doc_count, invf_ptr, invf_len); }
     80term:     TERM  { $$ = CreateBoolTermNode(term_list, $1, 1, word_num, count, doc_count, invf_ptr, invf_len, stemmer_num); }
    8081        | '(' or ')' { $$ = $2; }
    8182        | '*' { $$ = CreateBoolTreeNode(N_all, NULL, NULL); }
     
    139140    buf_ptr++;
    140141 
    141       if (INAWORD(*buf_ptr))
     142      if (inaword(buf_ptr, end))
    142143    {
    143144      static char word[MAXSTEMLEN + 1]; /* [RJM 07/98: Memory Leak] */
     
    168169
    169170      bcopy ((char *) word, (char *) sWord, *word + 1);
    170       stemmer (stem_to_apply, sWord);
     171      stemmer (stem_to_apply, stemmer_num, sWord);
    171172
    172173      if (stem_to_apply == 0 || !indexed || p__sd == NULL)
     
    290291bool_tree_node *
    291292ParseBool(char *query_line, int query_len,
    292           TermList **the_term_list, int the_stem_method, int *res,
     293          TermList **the_term_list, int the_stemmer_num, int the_stem_method, int *res,
    293294      stemmed_dict * the_sd, int is_indexed,   /* [RPAP - Jan 97: Stem Index Change] */
    294295      QueryTermList **the_query_term_list)  /* [RPAP - Feb 97: Term Frequency] */
     
    296297  /* global variables to be accessed by bison/yacc created parser */
    297298  term_list = the_term_list;
     299  stemmer_num = the_stemmer_num;
    298300  stem_method = the_stem_method;
    299301  ch_buf = query_line;
Note: See TracChangeset for help on using the changeset viewer.