French dependency parsing using CoreNLP

对着背影说爱祢 提交于 2019-12-12 01:40:16

问题


I am following the example in this link. I have downloaded the french jar from here. When I call it as follows,

java -mx1g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-french.properties -annotators tokenize,ssplit,pos,depparse -file french.txt -outputFormat conllu

I always see it loads a english dep-parser model instead of french.

Loading depparse model file: edu/stanford/nlp/models/parser/nndep/english_UD.gz ... PreComputed 100000, Elapsed Time: 1.341 (s)

Is this a bug?


回答1:


Update -- I found that the default properties file does not specify a depparse model. So now I give it my own config file and now it works.

annotators = tokenize, ssplit, pos, depparse, parse

tokenize.language = fr

pos.model = edu/stanford/nlp/models/pos-tagger/french/french.tagger

parse.model = edu/stanford/nlp/models/lexparser/frenchFactored.ser.gz

depparse.model = edu/stanford/nlp/models/parser/nndep/UD_French.gz


来源:https://stackoverflow.com/questions/36223002/french-dependency-parsing-using-corenlp

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