I am trying to use some filters from the snowball package. However, when I
run the following code:

Map<String,String> args = new HashMap<>();
TokenStream tokenStream = new StandardTokenizer(Version.LUCENE_46, new
StringReader("Some text"));
args.put("luceneMatchVersion", "4.6");
args.put("language", "Catalan");
SnowballPorterFilterFactory factory = new SnowballPorterFilterFactory(args);
TokenFilter filter = factory.create(tokenStream);

I got the following error:

Exception in thread "main" java.lang.RuntimeException: Error instantiating
stemmer for language Catalanfrom class null
        at
org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory.create(SnowballPorterFilterFactory.java:79)
        at analysis.AutoLanguageAnalyizer.main(AutoLanguageAnalyizer.java:205)
Caused by: java.lang.NullPointerException
        at
org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory.create(SnowballPorterFilterFactory.java:77)
        ... 1 more


Any idea on how to resolve this.

Thanks in advance.

Regards
Ameer



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Snowball-filter-Error-instantiating-stemmer-for-a-language-tp4156882.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to