I was working on a text-analysis project in R and needed a stemmer. I found a JAR-file of a java compilation of a snowball stemmer. Documentation:
http://lucene.apache.org/core/3_0_3/api/contrib-snowball/
Download link (bottom link):
http://www.java2s.com/Code/JarDownload/snowball/
Now, as far as I could tell, this R code should make a new stemmer object:
library(rJava)
.jinit("D:\\myUser\\Documents\\snowball.jar")
stemmer <- .jnew("org.tartarus.snowball.ext.EnglishStemmer")
However the final line of code gives the following error:
Error in .jnew("org.tartarus.snowball.ext.EnglishStemmer") :
java.lang.ClassNotFoundException
After spending quite a lot of time on this (among others, reading the following post for help: https://darrenjw.wordpress.com/2011/01/01/calling-java-code-from-r/), I got stuck because I am not sure what the exact problem is. As far as I can tell, it could be in order of likelyhood:
1. a mistake in my code
2. an issues with dependancies
3. the JAR file is corrupted somehow
Can anyone give me some pointers on where the problem might lie?
Edit: answered, see comments. The class names in this specific jar-file are lowercase.