Skip Menu |

This queue is for tickets about the Lingua-Stem-Snowball CPAN distribution.

Report information
The Basics
Id: 13900
Status: resolved
Priority: 0/
Queue: Lingua-Stem-Snowball

People
Owner: Nobody in particular
Requestors: marvin [...] rectangular.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.92
Fixed in: (no value)



Subject: Cease stripping of empty array elements
Regarding Lingua::Stem::Snowball version 0.92... If the arrayref you feed to the English stemmer starts/ends with either undef values or empty strings, the return array will have fewer elements than the source array. This makes mapping from source to output more involved. It would be preferable if the blank elements did not get stripped. #!/usr/bin/perl use strict; use warnings; use Lingua::Stem::Snowball; my $stemmer = Lingua::Stem::Snowball->new( lang => 'en' ); my @stemmable = ('', undef, 'foo', 'bar', '' ); my @stemmed = $stemmer->stem(\@stemmable); print "@stemmed\n"; print "Source elements: " . scalar @stemmable . "\n"; print "Stemmed elements: " . scalar @stemmed . "\n";