in reply to removing stopwords

It would seem you are going about this the hard way. Instead of breaking the sentences down into words you could combine the stopwords and make a regex.

Then you just use s/// to replace occurences of the stop words with nothing or a marker of some sort.

use strict; use warnings; my $text = "Hello world how are you doing?"; my @stopwords = ("hello","how"); my $regex = join('\b|\b', @stopwords); $text =~ s/$regex/*BAD*/igs; print $text;

___________
Eric Hodges

Replies are listed 'Best First'.
Re^2: removing stopwords
by zulqernain (Novice) on Jun 01, 2005 at 22:45 UTC
    i tried it but it makes the program very slow becuse the text file size very big and teh number of stopword are about 350