package Dict::EngStem; use strict; use Search::OpenFTS::Dict::PorterEng; use vars qw(@ISA $VERSION); @ISA = qw(Search::OpenFTS::Dict::PorterEng); $VERSION = '0.01'; sub is_stoplexem { my ( $self, $word ) = @_; return 1 if ( length($word) <= 1 ); # consider 1-character words as stop # return 1 if ( $word =~ /^[0-9\/]/ ); # rejects words beginning from dig|/ return $self->SUPER::is_stoplexem($word); } 1; __END__ =head1 NAME Dict::EngStem - Dictionary for english words =head1 SYNOPSIS use Dict::EngStem; my $dict = Dict::EngStem->new; my @list_of_lemm_id = $dict->lemmsid ($word); my $stop = $dict->is_stoplexem( $lemm ); =head1 DESCRIPTION This module is designed to work with OpenFTS. It inherits all methods from Search::OpenFTS::Dict::PorterEng and overrides method S. In addition to list of stopwords defined in Search::OpenFTS::Dict::PorterEng it rejects single character words. =head1 EXAMPLE See script init.pl =head1 AUTHOR Oleg Bartunov, oleg@sai.msu.su =head1 SEE ALSO perldoc Dict::IntegerDict - dictionary for integers perldoc Dict::DecimalDict - dictionary for decimals perldoc Dict::Search::OpenFTS::Dict::PorterEng - Porter's stemmer =cut