Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Filtering out stop words

by Eily (Monsignor)
on Feb 25, 2020 at 14:04 UTC ( [id://11113404]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @words = get_words_to_check();
    
    my %hash = map { $_ => 1 } @words;
    ...
    
    my @good_words = grep { exists $hash{$_} } @words; # Keep the original
    + order
    my @good_words_2 = keys %hash; # Don't care about the original order
    
  2. or download this
    my $index = 0;
    LINE: while (my $line = <>)
    {
    ...
        last LINE if ++$index == @words;
      }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-29 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found