⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stopfilter.pm

📁 Plucene-1.25.tar.gz PERL版本的lucene
💻 PM
字号:
package Plucene::Analysis::StopFilter;=head1 NAME Plucene::Analysis::StopFilter - the stop filter=head1 SYNOPSIS	# isa Plucene::Analysis::TokenFilter	my $next = $stop_filter->next;=head1 DESCRIPTIONThis removes stop words from a token stream.Instances of the StopFilter class are tokens filters that removes from the indexed text words of your choice. Typically this is used to filter out common words ('the', 'a' 'if' etc) that increase the overhead but add no value during searches.=head1 METHODS=cutuse strict;use warnings;use base 'Plucene::Analysis::TokenFilter';=head2 next	my $next = $stop_filter->next;This returns the next input token whose term is not a stop word.=cutsub next {	my $self = shift;	$self->{stophash} ||= { map { $_ => 1 } @{ $self->{stoplist} } };	while (my $t = $self->input->next) {		next if exists $self->{stophash}->{ $t->text() };		return $t;	}	return;}1;

⌨️ 快捷键说明

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