NAME

KinoSearch::Analysis::Stopalizer - Suppress a "stoplist" of common words.

SYNOPSIS

    my $stopalizer = KinoSearch::Analysis::Stopalizer->new(
        language => 'fr',
    );
    my $polyanalyzer = KinoSearch::Analysis::PolyAnalyzer->new(
        analyzers => [ $lc_normalizer, $tokenizer, $stopalizer, $stemmer ],
    );

This class uses Lingua::StopWords for its default stoplists, so it supports the same set of languages.

DESCRIPTION

A "stoplist" is collection of "stopwords": words which are common enough to be of little value when determining search results. For example, so many documents in English contain "the", "if", and "maybe" that it may improve both performance and relevance to block them.

Before filtering stopwords:

    ( "i", "am", "the", "walrus" ) 
    
After filtering stopwords:

    ( "walrus" );

CONSTRUCTOR

new( [labeled params] )

    my $stopalizer = KinoSearch::Analysis::Stopalizer->new(
        language => 'de',
    );
    
    # or...
    my $stopalizer = KinoSearch::Analysis::Stopalizer->new(
        stoplist => \%stoplist,
    );
  • stoplist - A hash with stopwords as the keys.
  • language - The ISO code for a supported language.

INHERITANCE

KinoSearch::Analysis::Stopalizer isa KinoSearch::Analysis::Analyzer isa KinoSearch::Obj.

COPYRIGHT

Copyright 2005-2008 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.20.

Copyright © 2004-2008 Marvin Humphrey