For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > October 2006 > Stemming words









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Stemming words
sr

2006-10-05, 6:56 pm

Hi all,

I am a beginner in perl. I am trying to write some code to stem words
in a given senstence. I have installed the module Lingua::Stem....donno
if it got installed??

when I run the below code, it prints out the Array(0x1834430) instaed
of root words.
Is there any bug in my code?? Please help me out with this...Thnaks


#!/usr/local/bin/perl -w
use Lingua::Stem;

my @words =("doing","done","cats"); # # input
words, prints fine
print "@words";
my $stemmer = Lingua::Stem->new({-locale => 'EN-US'});
$stemmer->stem_caching({ -level => 2 });
my @array = $stemmer->stem(@words);
print "@array"; ## print root words. prints ARRAY(0x1834430)
intstead of root words

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com