Example usage for org.apache.lucene.analysis WordlistLoader getSnowballWordSet

List of usage examples for org.apache.lucene.analysis WordlistLoader getSnowballWordSet

Introduction

In this page you can find the example usage for org.apache.lucene.analysis WordlistLoader getSnowballWordSet.

Prototype

public static CharArraySet getSnowballWordSet(Reader reader, CharArraySet result) throws IOException 

Source Link

Document

Reads stopwords from a stopword list in Snowball format.

Usage

From source file:org.culturegraph.mf.cluster.job.text.MyGermanAnalyzer.java

License:Apache License

public MyGermanAnalyzer() throws IOException {
    super();/*from   www  . jav  a 2s.c  o m*/
    stopwords = WordlistLoader.getSnowballWordSet(
            IOUtils.getDecodingReader(SnowballFilter.class, "german_stop.txt", IOUtils.CHARSET_UTF_8),
            Version.LUCENE_36);
    stoptypes.add("<NUM>");
    stoptypes.add("<EMAIL>");
}