use of org.apache.lucene.analysis.en.EnglishMinimalStemFilter in project nutch by apache.
the class LuceneAnalyzerUtil method createComponents.
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer source = new ClassicTokenizer();
TokenStream filter = new LowerCaseFilter(source);
if (stopSet != null) {
filter = new StopFilter(filter, stopSet);
}
switch(stemFilterType) {
case PORTERSTEM_FILTER:
filter = new PorterStemFilter(filter);
break;
case ENGLISHMINIMALSTEM_FILTER:
filter = new EnglishMinimalStemFilter(filter);
break;
default:
break;
}
return new TokenStreamComponents(source, filter);
}
Aggregations