10

Is there any library for stemming in java!?

Maverick
  • 2,738
  • 24
  • 91
  • 157
  • 3
    Are we talking about: [Linguistic morphology stemming](http://en.wikipedia.org/wiki/Stemming)? – wkl Dec 14 '10 at 22:31

3 Answers3

4

You might want to look at Apache Lucene. It is generally written to do other things, but it does some stemming as part of its indexing process.

mindas
  • 26,463
  • 15
  • 97
  • 154
4

There is an implementation of Porter's stemmer available on his website. The code is not very Java-ish, but it does what it's supposed to, plus it's only a single class.

Thomas
  • 17,016
  • 4
  • 46
  • 70
  • 1
    @mad_programmer: at the end of the class file, there's a `main` method that demonstrates the use of the class. – Thomas Dec 15 '10 at 22:23
2

Updated Answer: Porter recommends a later version of what is available on his website. That is Snowball: http://snowball.tartarus.org/ It is essentially a code generator that can generate a Java or C stemmer based on a stemmer specification.

necromancer
  • 23,916
  • 22
  • 68
  • 115