stopanalyzer.pm

来自「Plucene-1.25.tar.gz PERL版本的lucene」· PM 代码 · 共 53 行

PM
53
字号
package Plucene::Analysis::StopAnalyzer;=head1 NAME Plucene::Analysis::StopAnalyzer - the stop-word analyzer=head1 SYNOPSIS	my Plucene::Analysis::StopFilter $sf 		= Plucene::Analysis::StopAnalyzer->new(@args);=head1 DESCRIPTIONFilters LetterTokenizer with LowerCaseFilter and StopFilter.=head1 METHODS=cutuse strict;use warnings;use Plucene::Analysis::LowerCaseTokenizer;use Plucene::Analysis::StopFilter;use base 'Plucene::Analysis::Analyzer';my @stopwords = (	"a",     "and",  "are",   "as",    "at",   "be",   "but",  "by",	"for",   "if",   "in",    "into",  "is",   "it",   "no",   "not",	"of",    "on",   "or",    "s",     "such", "t",    "that", "the",	"their", "then", "there", "these", "they", "this", "to",   "was",	"will",  "with");=head2 tokenstream	my Plucene::Analysis::StopFilter $sf 		= Plucene::Analysis::StopAnalyzer->new(@args);Filters LowerCaseTokenizer with StopFilter.=cutsub tokenstream {	my $self = shift;	return Plucene::Analysis::StopFilter->new({			input    => Plucene::Analysis::LowerCaseTokenizer->new(@_),			stoplist => \@stopwords		});}1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?