CPAN to the rescue...
From Lingua::StopWords:
use Lingua::StopWords qw( getStopWords ); my $stopwords = getStopWords('en'); my @words = qw( i am the walrus goo goo g'joob ); # prints "walrus goo goo g'joob" print join ' ', grep { !$stopwords->{$_} } @words;
From Lingua::EN::StopWords:
use Lingua::EN::StopWords qw(%StopWords); my @words = ...; # Print non-stopwords in @words print join " ", grep { !$StopWords{$_} } @words;
In reply to Re: Removing Stopwords from a String
by bobf
in thread Removing Stopwords from a String
by mr.nick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |