gangeli / CoreNLP-Scala

A Scala wrapper for CoreNLP
40 stars 9 forks source link

SBT - French, Spanish, German models #7

Open Catadanna opened 6 years ago

Catadanna commented 6 years ago

Hallo,

How can I add dependencies for languages other than English? Your SBT code does not allow to download the models for other languages.

Catadanna commented 6 years ago

In fact it works, must search for a more recent version of stanford parser. I post the code (build.sbt) here, as it might be useful for others :

libraryDependencies ++= Seq(
"edu.stanford.nlp" % "stanford-parser" % "3.8.0",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models-french",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models-english",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models-spanish",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models-german"
)
gangeli commented 6 years ago

Does the Simple API work for your needs? There should be variants of Sentence and Document for all of the supported languages (e.g., GermanDocument) assuming you have the models downloaded, and the library there is far more mature than this wrapper.

Catadanna commented 6 years ago

Hallo, I did not use the Simple API, I had the other one available. OK, I should try the Simple API, if you say it is better. In fact, until now, I used this one, parsed & extracted the CoreNLP information in my own Scala objects.