lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Snowball filter - Error instantiating stemmer for a language
Date Thu, 04 Sep 2014 18:08:19 GMT

Odd ... the class org/tartarus/snowball/ext/CatalanStemmer.class should 
exist in the same jar as SnowballPorterFilterFactory, can you please 
confirm that you see it there?

$ jar tf lucene-analyzers-common-4.6-SNAPSHOT.jar | grep CatalanStemmer
org/tartarus/snowball/ext/CatalanStemmer.class


The only explanation i can think of is that maybe you manually copied some 
of the java or class files directly into your project instead of using hte 
jars?

if not: can you describe a bit more about your project and how you are 
running this code?  what does the classpath look like exactly?


: Date: Thu, 4 Sep 2014 03:25:21 -0700 (PDT)
: From: atawfik <contact.txlabs@gmail.com>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: Snowball filter - Error instantiating stemmer for a language
: 
: 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-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
: 
: 

-Hoss
http://www.lucidworks.com/

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


Mime
View raw message