r - Error in Parts of Speech Tagging using openNLP -


i have ubuntu quantal 12.10 server 64-bit instance. using opennlp pos tagging of sentences.

i using pos tagging using opennlp “parallel lapply setup”. running fine in rstudio environment. in ubuntu environment showing following error.

error in do.call(c, clusterapply(cl, x = splitlist(x, length(cl)), fun = lapply,   :   second argument must list 

any suggestion problem i’m facing?

this code using:

tagpos <-  function(x, ...) {      s <- as.string(x)      word_token_annotator <- maxent_word_token_annotator()      a2 <- annotation(1l, "sentence", 1l, nchar(s))      a2 <- annotate(s, word_token_annotator, a2)      a3 <- annotate(s, pta, a2)      a3w <- a3[a3$type == "word"]      postags <- unlist(lapply(a3w$features, `[[`, "pos"))      postagged <- paste(sprintf("%s/%s", s[a3w], postags), collapse = " ")      list(postagged = postagged, postags = postags)    }      cl <- makecluster(mc <- getoption("cl.cores", detectcores()/2))    clusterevalq(cl, {      library(opennlp)      library(nlp)      pta <- maxent_pos_tag_annotator()    }) 

this setup using:

  • created cloud instance "ubuntu quantal 12.10 server 64-bit instance"

  • installed lamp server in instance

  • after installed r. default r version 2.15.0

  • upgraded r version r 3.0.1


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -