Issue using Stanford CoreNLP parsing models

ⅰ亾dé卋堺 提交于 2020-01-13 05:21:43

问题


I cannot find the Stanford parsing models for German and French: there is no "germanPCFG.ser.gz" or "frenchFactored.ser.gz" in the jar (stanford-corenlp-3.2.0-models.jar) - only english. Have searched through posttagger jar too.

Same issue encountered at : How to use Stanford CoreNLP with a Non-English parse model?


回答1:


You can find them in the download for the Stanford Parser. Look in the models.jar file.




回答2:


With Maven you can use

<dependency>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
</dependency>

<dependency>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
  <classifier>models</classifier>         <!-- English models -->
</dependency>

<dependency>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
  <classifier>models-german</classifier>  <!-- German models -->
</dependency>

<dependency>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
  <classifier>models-spanish</classifier>
</dependency>

<dependency>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
  <classifier>models-chinese</classifier>
</dependency>

Maven will download the jar file for the german models to your home directory:
~/.m2/repository/edu/stanford/nlp/stanford-corenlp/3.5.2/stanford-corenlp-3.5.2-models-german.jar



来源:https://stackoverflow.com/questions/20194164/issue-using-stanford-corenlp-parsing-models

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!