Search code examples
javapreprocessortruncatestemming

Transform words into their basic form in Java


What is a good library to use in Java to transform words into their basic form? That is, if we have "go" "going" and "gone" on the input, I need to receive 3 times "go" on the output.


Solution

  • Check out the Porter Stemmer. It is licensed under BSD, so you should have no (legal) issues with using it. Here is a link to the source.