Free2Code

Warning: Illegal offset type in /home/free2code/vhosts/free2code.net/httpdocs/jtdb/drivers/mysql/mysql.php on line 305
 
Time: 2008-11-21, 01:00am
Stopwoed Removal
Subject: Stopwoed Removal  ·  Posted: 2005-02-18, 05:36am
Rank: Unregistered
Hey, i'm new to the ol perl programming, but anyway. I'm trying to write code for stopword removal. i have this, but its not quite right.
Code:
  1. open (IN,"<stopwords.txt");
  2. open (IN2,"<DOC001.txt");
  3. @words = <IN>;
  4. close (IN)
  5. @doc = <IN2>;
  6. close (IN2);
  7. foreach $stopword (@words){
  8.         chomp ($stopword);
  9.         $h {$stopword}= 1;
  10. }
  11. while (<IN>{
  12.         $stopword = $_;
  13.         chomp ($stopword);
  14.         print $word . "\n";
  15.         }
  16. }
  17. if (@doc  =~/^(@words)$/){
  18.         $stopword =~ s/@words/@doc/g;
  19. }


i have to do Stemming as well, but i have no clue as to haw to do that. so if you have any hints there it would be much appreciated.


 
  Reply to this ·  Post link ·  Top
Subject: Re: Stopwoed Removal  ·  Posted: 2005-02-24, 03:07am
Rank: Unregistered
anyone. Please
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons