Changeset 2136 for swish-e

Show
Ignore:
Timestamp:
04/22/08 09:45:56 (2 months ago)
Author:
karpet
Message:

remove deprecated stemming features since 2.6 is a minor release bump. See trac #9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • swish-e/branches/2.6/perl/API.pm

    r2025 r2136  
    550550there's no need to specify the index file name. 
    551551 
    552  
    553  
    554 =item $stemmed_word = $swish-E<gt>stem_word( $word ); 
    555  
    556 *Deprecated* 
    557  
    558 Returns the stemmed version of the passed in word. 
    559  
    560 Deprecated because only stems using the original Porter Stemmer 
    561 and uses a shared memory location in the SW_HANDLE object to store the stemmed 
    562 word.  See below for other stemming options. 
    563  
    564  
    565552=item $fuzzy_word = $swish-E<gt>Fuzzify( $indexname, $word ); 
    566553 
  • swish-e/branches/2.6/perl/API.xs

    r1774 r2136  
    425425         } 
    426426 
    427  
    428  
    429 char * 
    430 SwishStemWord(handle, word) 
    431      SW_HANDLE handle 
    432      char *word 
    433  
    434  
    435  
    436  
    437427# ************************************************************** 
    438428#  
  • swish-e/branches/2.6/src/stemmer.c

    r1950 r2136  
    135135    { FUZZY_STEMMING_FI,        "Stemming_fi",      Stem_snowball, finnish_ISO_8859_1_create_env, finnish_ISO_8859_1_close_env, finnish_ISO_8859_1_stem }, 
    136136    { FUZZY_STEMMING_RO,        "Stemming_ro",          Stem_snowball, romanian_ISO_8859_2_create_env, romanian_ISO_8859_2_close_env, romanian_ISO_8859_2_stem }, 
    137     { FUZZY_STEMMING_HU,        "Stemming_hu",          Stem_snowball, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem }, 
    138     /* these next two are deprecated and are identical to Stemming_en1 */ 
    139     { FUZZY_STEMMING_EN1,       "Stemming_en",      Stem_snowball, porter_ISO_8859_1_create_env, porter_ISO_8859_1_close_env, porter_ISO_8859_1_stem }, 
    140     { FUZZY_STEMMING_EN1,       "Stem",             Stem_snowball, porter_ISO_8859_1_create_env, porter_ISO_8859_1_close_env, porter_ISO_8859_1_stem } 
     137    { FUZZY_STEMMING_HU,        "Stemming_hu",          Stem_snowball, hungarian_ISO_8859_1_create_env, hungarian_ISO_8859_1_close_env, hungarian_ISO_8859_1_stem } 
    141138 
    142139 
     
    278275        if ( 0 == strcasecmp(fuzzy_opts[i].name, param ) ) 
    279276        { 
    280             if ( fuzzy_opts[i].name == "Stem" || fuzzy_opts[i].name == "Stemming_en" ) 
    281             { 
    282                 fprintf(stderr, "*************\n"); 
    283                 fprintf(stderr, "  Old stemmer '%s' is no longer supported -- using Stemming_en1 instead.\n", fuzzy_opts[i].name); 
    284                 fprintf(stderr, "  Please update your config file.\n*************\n"); 
    285             } 
    286              
    287277            return create_fuzzy_struct( fi, &fuzzy_opts[i] ); 
    288278        } 
     
    412402 
    413403 
    414  
    415 /************************************************************************* 
    416 * SwishStemWord -- utility function to stem a word 
    417 * 
    418 * This stores the stemmed word locally so it can be freed 
    419 # *Depreciated* because this only calls the original stemmer. 
    420 * 
    421 **************************************************************************/ 
    422  
    423 char *SwishStemWord( SWISH *sw, char *word ) 
    424 { 
    425     FUZZY_OBJECT *fo = NULL; 
    426     FUZZY_WORD *fw = NULL; 
    427  
    428     if ( sw->stemmed_word ) 
    429     { 
    430         efree( sw->stemmed_word ); 
    431         sw->stemmed_word = NULL; 
    432     } 
    433  
    434     fo = set_fuzzy_mode( fo, "Stem" ); 
    435     if ( !fo ) 
    436         return sw->stemmed_word; 
    437  
    438     fw = fuzzy_convert( fo, word ); 
    439     sw->stemmed_word = estrdup( fw->string_list[0] ); 
    440     fuzzy_free_word( fw ); 
    441  
    442     free_fuzzy_mode( fo ); 
    443     return sw->stemmed_word; 
    444  
    445 } 
    446  
    447404/************************************************************************ 
    448405* SwishFuzzyWord -- utility function to stem a word based on the current result