📄 standardanalyzer.pm
字号:
package Plucene::Analysis::Standard::StandardAnalyzer;=head1 NAME Plucene::Analysis::Standard::StandardAnalyzer - standard analyzer=head1 SYNOPSIS my Plucene::Analysis::Stopfilter $sf = Plucene::Analysis::Standard::StandardAnalyzer->tokenstream(@args); =head1 DESCRIPTIONThe standard analyzer, built with a list of stop words.This list of stop words are: "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" =head1 METHODS=cutuse strict;use warnings;use base 'Plucene::Analysis::Analyzer';use Plucene::Analysis::Standard::StandardTokenizer;use Plucene::Analysis::StopFilter;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::Standard::StandardAnalyzer->tokenstream(@args);=cutsub tokenstream { my $class = shift; return Plucene::Analysis::StopFilter->new({ input => Plucene::Analysis::Standard::StandardTokenizer->new(@_), stoplist => \@stopwords });}1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -