Dear Richard,
> If you agree to license your modified version in the same way
> as the original version was, then send your modified version to me, and
> I'll incorporate your changes into the version on
> the website.
>
> Thanks,
> Richard Boulton
>
The attachment is my modified version. I just think the StringBuffer is the
right thing to use here in java. It makes the code looks more organized
and easy-understandable. Actually, at first, I was confused why char array
was used here.
And I found a small bug in the method "public String stem(String s)",
it is just a very small bug. The orginal code is
public String stem(String s)
{
NewPorterStemmer stemmer = new NewPorterStemmer();
return stemmer.toString();
}
It should be
public String stem(String s)
{
NewPorterStemmer stemmer = new NewPorterStemmer();
stemmer.add(s);
stemmer.stem();
return stemmer.toString();
}
Actually, I got the original stemmer code from my friend, he said he
downloaded it from Martin's website. However, when I checked the latest
release of stemmer in his website. I didn't see this method. I think this
method is very useful. Would you please add it into the stemmer?
Thanks!
Jin
This archive was generated by hypermail 2.1.3 : Thu Sep 20 2007 - 12:02:44 BST