how to perform stemming in java?

Hello, here i written a code for stemming a word in java.
For it you need a java library, you can download it from here, and load it to you lib folder.

Here is the code:

import org.tartarus.snowball.*;

public class EnglishStemmer_porterstemmer {

public static void main(String[] args) throws Exception{
//enter the word in the string.
 String a=”phones”;

Output: phone

See also:

2 thoughts on “how to perform stemming in java?”

Leave a Comment