1
我想在CoreNLP中使用nndep进行依赖关系解析。所以输入是一个简单的德语句子和输出应该是这样的:斯坦福CoreNLP:nndep.DependencyParser与geman模型管道
case(Schulen-3, An-1)
amod(Schulen-3, Stuttgarter-2)
nmod(gegrüßt-13, Schulen-3)
aux(gegrüßt-13, darf-4)
case(MitschülerInnen-7, wegen-5)
amod(MitschülerInnen-7, muslimischer-6)
nmod(gegrüßt-13, MitschülerInnen-7)
neg(gegrüßt-13, nicht-8)
advmod(nicht-8, mehr-9)
case(Gott-12, mit-10)
amod(Gott-12, Grüß-11)
nmod(gegrüßt-13, Gott-12)
root(ROOT-0, gegrüßt-13)
auxpass(gegrüßt-13, werden-14)
punct(gegrüßt-13, .-15)
和该命令正在为一个单一的文件:
java -cp "*" -Xmx2g edu.stanford.nlp.parser.nndep.DependencyParser -model edu/stanford/nlp/models/parser/nndep/UD_German.gz -textFile /Users/.../input.txt
但我需要这个以60.000的文件。所以我需要nlp.pipeline。如果我执行以下命令,输出只是正常的解析树,但不是解析的依赖关系。
java -Xmx6g -cp "*:." -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -filelist /Users/.../filelist.txt -props StanfordCoreNLP-german.properties -outputFormat text -parse.originalDependencies
有人可以帮忙吗?