1KinoSearch1::Analysis::USsteorpaCloinzterri(b3u)ted PerlKiDnoocSuemaernctha1t:i:oAnnalysis::Stopalizer(3)
2
3
4
6 KinoSearch1::Analysis::Stopalizer - suppress a "stoplist" of common
7 words
8
10 my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
11 language => 'fr',
12 );
13 my $polyanalyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
14 analyzers => [ $lc_normalizer, $tokenizer, $stopalizer, $stemmer ],
15 );
16
18 A "stoplist" is collection of "stopwords": words which are common
19 enough to be of little value when determining search results. For
20 example, so many documents in English contain "the", "if", and "maybe"
21 that it may improve both performance and relevance to block them.
22
23 # before
24 @token_texts = ('i', 'am', 'the', 'walrus');
25
26 # after
27 @token_texts = ('', '', '', 'walrus');
28
30 new
31 my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
32 language => 'de',
33 );
34
35 # or...
36 my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
37 stoplist => \%stoplist,
38 );
39
40 new() takes two possible parameters, "language" and "stoplist". If
41 "stoplist" is supplied, it will be used, overriding the behavior
42 indicated by the value of "language".
43
44 • stoplist - must be a hashref, with stopwords as the keys of the
45 hash and values set to 1.
46
47 • language - must be the ISO code for a language. Loads a default
48 stoplist supplied by Lingua::StopWords.
49
51 Lingua::StopWords
52
54 Copyright 2005-2010 Marvin Humphrey
55
57 See KinoSearch1 version 1.01.
58
59
60
61perl v5.32.1 2021-01-2K7inoSearch1::Analysis::Stopalizer(3)