问题
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