Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Plucene::Analysis::PorterStemFilter

Name Plucene::Analysis::PorterStemFilter
Version
Located at /usr/share/perl5
File /usr/share/perl5/Plucene/Analysis/PorterStemFilter.pm
Is Core No
Search CPAN for this module Plucene::Analysis::PorterStemFilter
Documentation Plucene::Analysis::PorterStemFilter
Module Details Plucene::Analysis::PorterStemFilter

NAME

Plucene::Analysis::PorterStemFilter - Porter stemming on the token stream


SYNOPSIS

        # isa Plucene::Analysis:::TokenFilter

        my $token = $porter_stem_filter->next;


DESCRIPTION

This class transforms the token stream as per the Porter stemming algorithm.

Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!

The Porter Stemmer implements Porter Algorithm for normalization of English words by stripping their extensions and is used to generalize the searches. For example, the Porter algorithm maps both 'search' and 'searching' (as well as 'searchnessing') to 'search' such that a query for 'search' will also match documents that contains the word 'searching'.

Note that the Porter algorithm is specific to the English language and may give unpredictable results for other languages. Also, make sure to use the same analyzer during the indexing and the searching.

You can find more information on the Porter algorithm at www.tartarus.org/~martin/PorterStemmer.

A nice online demonstration of the Porter algorithm is available at www.scs.carleton.ca/~dquesnel/java/stuff/PorterApplet.html.


METHODS

next

        my $token = $porter_stem_filter->next;

Returns the next input token, after being stemmed.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026