斯坦福大学CoreNLP的德语解析器的依存关系为空 [英] Dependencies are null with the German Parser from Stanford CoreNLP
问题描述
我试图用Stanford CoreNLP和德语模型3.6版来解析德语句子. 在网站上说,德语支持依存关系解析,但是当我解析一个句子时,依存关系始终为空.
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.
我在deepdive中使用scala脚本来运行具有以下属性的NLP:
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?
推荐答案
您必须使用NN依赖项解析器来获取德语依赖项解析.
You have to use the NN dependency parser to get German dependency parses.
信息在这里:
http://nlp.stanford.edu/software/nndep.shtml
此外,您还需要在此处提供德国型号的罐子:
Also you'll need the German models jar available here:
http://stanfordnlp.github.io/CoreNLP/history.html
这篇关于斯坦福大学CoreNLP的德语解析器的依存关系为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!