| Plucene-Plugin-Analyzer-SnowballAnalyzer documentation | Contained in the Plucene-Plugin-Analyzer-SnowballAnalyzer distribution. |
Plucene::Plugin::Analyzer::SnowballFilter - Snowball stemming on the token stream
# isa Plucene::Analysis:::TokenFilter my $token = $porter_stem_filter->next;
This class transforms the token stream as per the Snowball stemming algorithm.
You can find more information on the Snowball algorithm at http://snwoball.tartarus.org/.
my $token = $porter_stem_filter->next;
Returns the next input token, after being stemmed.
| Plucene-Plugin-Analyzer-SnowballAnalyzer documentation | Contained in the Plucene-Plugin-Analyzer-SnowballAnalyzer distribution. |
package Plucene::Plugin::Analyzer::SnowballFilter;
use strict; use warnings; use Lingua::Stem::Snowball; use base 'Plucene::Analysis::TokenFilter';
sub next { my $self = shift; my $t = $self->input->next or return; my @r; push @r, Lingua::Stem::Snowball::stem($Plucene::Plugin::Analyzer::SnowballAnalyzer::LANG, $t->text); $t->text(@r); return $t; } 1;