我想使用Stanford Parser 3.7.0版(最后一个)解析使用Universal Dependencies的法语文本。
这是我的命令:
"java -mx2100m -cp stanford-parser.jar:stanford-french-corenlp-2016-10-31-models.jar edu.stanford.nlp.parser.lexparser.LexicalizedParser -MAX_ITEMS 5000000 -encoding utf-8 -outputFormat conll2007 -outputFormatOptions includePunctuationDependencies -sentences newline frenchFactored.ser.gz "+startinDir+"/"+fic+" > "+startinDir+"/Parses_FR/"+fic_name
我使用了最新的可用型号https://nlp.stanford.edu/software/lex-parser.shtml#Download
但是我的输出不包含任何功能,而POS不是UD的
1 La _ D D _ 2 NULL _ _
2 pluie _ N N _ 3 NULL _ _
3 bat _ V V _ 0 root _ _
4 les _ D D _ 5 NULL _ _
5 carreaux _ N N _ 3 NULL _ _
我也在尝试使用CoreNLP的解析器工具,这是我的命令行:
java -mx1g -cp stanford-corenlp-3.7.0.jar:stanford-french-corenlp-2016-10-31-models.jar edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-french.properties -annotators tokenize,ssplit,pos,depparse -file /Users/Rafael/Desktop/LANGAGES/CORPUS/Sentences_FR/3aube_schtrouFR30.txt -outputFormat sortie.txt
我的属性文件包含以下行:
annotators = tokenize,ssplit,pos,parse
tokenize.language = fr
parse.model = edu / stanford / nlp / models / lexparser / frenchFactored.ser.gz
pos.model = edu / stanford / nlp / models / pos-tagger / french / french.tagger
depparse.model = edu / stanford / nlp / models / parser / nndep / UD_French.gz depparse.language = french
我收到以下错误消息
引起:java.io.IOException:无法打开" edu / stanford / nlp / models / pos-tagger / french / french.tagger"作为类路径,文件名或URL
我该如何解决?