Issue using Stanford CoreNLP parsing models

2019-01-29 02:25发布

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?

2条回答
何必那么认真
2楼-- · 2019-01-29 02:54

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

查看更多
小情绪 Triste *
3楼-- · 2019-01-29 03:08

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

查看更多
登录 后发表回答