Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify dependency with classifier in Zeppelin

I am trying to play around with sentiment analysis on EMR with Zepplin and Stanford NLP.

I have added edu.stanford.nlp:stanford-corenlp:3.8.0, however, I cannot figure out how to add a dependency with a classifier.

I am getting this error edu.stanford.nlp.io.RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz" as class path, filename or URL.

It shows up because I need this package (in sbt format) libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0"classifier "models"

How can I specify this dependency in Zeppelin?

like image 631
vasion Avatar asked Oct 17 '22 08:10

vasion


1 Answers

To add the dependency to the language models, use the following format in the Dependencies section of the of the Spark Interpreter configuration (Interpreters -> Spark -> Edit -> Dependencies):

groupId:artifactId:packaging:classifier:version

In your case it should work with

edu.stanford.nlp:stanford-corenlp:jar:models:3.8.0

like image 180
Theus Avatar answered Oct 19 '22 22:10

Theus