CoreNLP-Scala icon indicating copy to clipboard operation
CoreNLP-Scala copied to clipboard

SBT - French, Spanish, German models

Open Catadanna opened this issue 7 years ago • 3 comments

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 avatar Jan 31 '18 17:01 Catadanna

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"
)

Catadanna avatar Feb 02 '18 09:02 Catadanna

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.

gangeli avatar Feb 05 '18 19:02 gangeli

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.

Catadanna avatar Feb 05 '18 19:02 Catadanna