04 Jul 2009 01:44:17 UTC
- Development release
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (13 / 3 / 1)
- KwaliteeBus factor: 0
- License: perl_5
- Activity24 month
- Download (611.03KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCREAMYG Marvin Humphreyand 1 contributors
- Marvin Humphrey <marvin at rectangular dot com>
- LICENSE, DISCLAIMER, BUGS, etc.
KinoSearch::Analysis::Stopalizer - Suppress a "stoplist" of common words.
my $stopalizer = KinoSearch::Analysis::Stopalizer->new( language => 'fr', ); my $polyanalyzer = KinoSearch::Analysis::PolyAnalyzer->new( analyzers => [ $case_folder, $tokenizer, $stopalizer, $stemmer ], );
This class uses Lingua::StopWords for its default stoplists, so it supports the same set of languages.
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" );
Stopalizer provides default stoplists for several languages, courtesy of the Snowball project (<http://snowball.tartarus.org>), or you may supply your own.
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.
Copyright 2005-2009 Marvin Humphrey
See KinoSearch version 0.30.