Dependencies are null with the German Parser from Stanford CoreNLP

人盡茶涼 提交于 2019-12-08 07:20:50

问题


I tried to parse german sentences with the Stanford CoreNLP and the german models Version 3.6. On the website it says that Dependency Parsing is supported for german but when I parse a sentence the dependencies are always null.

I use the scala script within deepdive to run the NLP with the following properties:

val germanProps = new Properties()
germanProps.put("annotators", "tokenize, ssplit, pos, ner, parse")
germanProps.put("tokenize.language", "de")
germanProps.put("pos.model", "edu/stanford/nlp/models/pos-tagger/german/german-hgc.tagger")
germanProps.put("ner.model", "edu/stanford/nlp/models/ner/german.hgc_175m_600.crf.ser.gz")
germanProps.put("ner.applyNumericClassifiers", "false")
germanProps.put("ner.useSUTime", "false")
germanProps.put("parse.model", "edu/stanford/nlp/models/lexparser/germanFactored.ser.gz")

Is there a problem with my configuration or why does the german parser not work?


回答1:


You have to use the NN dependency parser to get German dependency parses.

The info is here:

http://nlp.stanford.edu/software/nndep.shtml

Also you'll need the German models jar available here:

http://stanfordnlp.github.io/CoreNLP/history.html



来源:https://stackoverflow.com/questions/35175963/dependencies-are-null-with-the-german-parser-from-stanford-corenlp

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