add-semi-colons
add-semi-colons

Reputation: 18810

R mallet error in jcall:java.lang.NoSuchMethodException: No suitable method for the given parameters

I am using mallet in R, It was working fine until I install devtools. After that I start getting following error which I never got.

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  : 
  java.lang.NoSuchMethodException: No suitable method for the given parameters

error get thrown:

documents <- mallet.read.dir("~/mytopicsfiles/")
mallet.instances <- mallet.import(documents$id, documents$text, "~/stopwords.txt", token.regexp ="\\p{L}[\\p{L}\\p{P}]+\\p{L}")

After searching in, I found someone has answered exact question and answer given in that question did't actually work. Since its not an accepted answer not sure if the answer is correct.

rjava .jcall issue

Upvotes: 1

Views: 951

Answers (1)

Jinju Kim
Jinju Kim

Reputation: 21

Did you find the answer? You should make documents$id and documents$text as character.

as.character(documents$id), as.character(documents$text)

Upvotes: 1

Related Questions