Dear Forum, when I try to use SnowballStemmer() I get the following error message: "Could not initialize the GenericPropertiesCreator. This exception was produced: java.lang.NullPointerException" It seems to have something to do with either Snowball or RWeka, however I can't figure out, what to do myself. If you could spend 5 minutes of your valuable time, to help me or give me a hint where to look for, it would be very much appreciated. Thank you very much. -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-Snowball-RWeka-tp3402126p3402126.html Sent from the R help mailing list archive at Nabble.com.
----------------------------------------> Date: Thu, 24 Mar 2011 03:35:31 -0700 > From: kontakt at alexanderbachmann.de > To: r-help at r-project.org > Subject: [R] Problem with Snowball & RWeka > > Dear Forum, > > when I try to use SnowballStemmer() I get the following error message: > > "Could not initialize the GenericPropertiesCreator. This exception was > produced: java.lang.NullPointerException" > > It seems to have something to do with either Snowball or RWeka, however I > can't figure out, what to do myself. If you could spend 5 minutes of your > valuable time, to help me or give me a hint where to look for, it would be > very much appreciated. > > Thank you very much. >If you only want answers from people who have encountered this exact problem before then that's great but you are more likely to get a useful response if you include reproducible code and some data to produce the error you have seen. Sometimes I investigate these things because they involve a package or objective I wanted to look at anyway. It could be that the? only problem is that the OP missed something in documentation or had typo etc. In this case, to pursue it from the perspective of debuggin the code, you probably want to find some way to get a stack trace and then find out which java variable was null and relate it back to how you invoked it. This likely points to a missing object in your call or maybe the installation lacked a dependency as this occured during init, but hard to speculate with what you have provided. You could try reinstalling and check for errors.
Greetings to all, I have a similar issue with Snowball. I am runing R version 2.12.1 (2010-12-16) on windows 7 Here is my script : ---- library(tm) custom.xml <- system.file("texts", "custom.xml", package = "tm") print(readLines(custom.xml), quote = FALSE) myXMLReader <- readXML( spec = list( Language = list("node", "/document/language"), DateTimeStamp = list("node", "/document/date"), Origin = list("node", "/document/source"), Description = list("node", "/document/subject"), Type = list("node", "/document/country"), Heading = list("node", "/document/title"), Content = list("node", "/document/contenu"), Author = list("node", "/document/author")), doc = PlainTextDocument()) mySource <- function(x, encoding = "UTF-8") XMLSource(x, function(tree) XML::xmlRoot(tree)$children, myXMLReader, encoding) corpusmf <- Corpus(mySource(custom.xml)) meta(corpusmf[[1]]) meta(corpusmf[[2]]) corpusmf <- tm_map(corpusmf, stripWhitespace) corpusmf <- tm_map(corpusmf, removeNumbers) corpusmf <- tm_map(corpusmf, removePunctuation) corpusmf <- tm_map(corpusmf,stemDocument) matrix <- TermDocumentMatrix(corpusmf,control=list(weighting =weightBin )) print(matrix) ----- stemDocument returns an error message : Stemmer 'porter' unknown! Stemmer 'english' unknown! Stemmer 'porter' unknown! Stemmer 'english' unknown! I tried to invoke library(Snowball) before, but it's the same. I found a clue on Weka website http://weka.wikispaces.com/The+snowball+stemmers+don%27t+work,+what+am+I+doing+wrong%3F but I don't understand what I should do with this archives I would be grateful if someone could help on this; Kind regards, -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-Snowball-RWeka-tp3402126p3569089.html Sent from the R help mailing list archive at Nabble.com.