I'm trying to create an Italian text classifier with Weka using Weka's StringToWordVector
to create the features.
The classifier works fine, but I set a stemmer as an option of the filter and it doesn't work. This is my code:
SnowballStemmer sb=new SnowballStemmer();
snowball.setStemmer("italian");
StringToWordVector str2Words = new StringToWordVector();
String[] options_wordVector = { /*other options*/};
str2Words.setOptions(options_wordVector);
str2Words.setStemmer(sb);
When I start debugging in the console log appears
Stemmer 'italian' unknown!
I tried sb.stem(string)
too, but the same message appears and the result string is the starting one.
How can I make it work?