Re: [R] Problem with Snowball & RWeka

From: Jean-Pierre Müller <jean-pierre.mueller_at_unil.ch>
Date: Wed, 30 Mar 2011 09:21:20 +0200

Dear Forum,

I have also problems Snowball (macos, fresh install of rJava, RWeka, RWekajars, Snowball from http://cran.ch.r-project.org/bin/macosx/leopard/ ):

> library(Snowball)
> example(SnowballStemmer)

SnwblS> ## Test the supplied vocabulary for the default stemmer ('porter'): SnwblS> source <- readLines(system.file("words", "porter","voc.txt",

SnwblS+                                 package = "Snowball"))

SnwblS> result <- SnowballStemmer(source) Erreur dans .jnew(name) :
  java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line

Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?

> example(SnowballStemmer)

SnwblS> ## Test the supplied vocabulary for the default stemmer ('porter'): SnwblS> source <- readLines(system.file("words", "porter","voc.txt",

SnwblS+                                 package = "Snowball"))

SnwblS> result <- SnowballStemmer(source)

SnwblS> target <- readLines(system.file("words", "porter", "output.txt",

SnwblS+                                 package = "Snowball"))

SnwblS> ## Any differences?
SnwblS> any(result != target)
[1] TRUE
Stemmer 'porter' unknown!
> sessionInfo()

R version 2.12.1 (2010-12-16)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] fr_FR/fr_FR/fr_FR/C/fr_FR/fr_FR

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] Snowball_0.0-7

loaded via a namespace (and not attached): [1] grid_2.12.1 rJava_0.8-8 RWeka_0.4-3 RWekajars_3.7.3-1 tools_2.12.1

Any hints?

Thanks!

Le 24 mars 2011 à 12:31, Mike Marchywka a écrit :

>
>
> ----------------------------------------

>> 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.
>
>
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
-- 

Jean-Pierre Müller
SSP / Anthropole 4123 / UNIL / CH - 1015 Lausanne
Voice:+41 21 692 3116 / Fax:+41 21 692 3115

Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html
S'il vous plaît, évitez de m'envoyer des attachements au format Word ou PowerPoint.
 Voir http://www.gnu.org/philosophy/no-word-attachments.fr.html 

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 30 Mar 2011 - 07:27:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Mar 2011 - 07:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive