Fransızca metinler için Stanford CoreNLP kullanmaya çalışıyorum. POS etiketleme ve ayrıştırma işleri iyi çalışıyor, ancak yapılandırmamla birlikte çıktı bağımlılıkları hiç mantıklı değil. Ben Fransız modellerle CoreNLP 3.6 kullanıyorumCoreNLP ile Fransızca için bağımlılık ayrıştırma
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
here bulundu:
Yetkim french.conf içeren
java -mx1g -cp "~/stanford-corenlp/stanford-corenlp-full-2015-12-09/*"
edu.stanford.nlp.pipeline.StanfordCoreNLP -props french.conf
-file /tmp/file.txt -outputFormat text
olduğunu. Günlük bu saygı ile iyi görünüyor:
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/french/french.tagger ... done [0,2 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator depparse
Loading depparse model file: edu/stanford/nlp/models/parser/nndep/UD_French.gz ...
PreComputed 100000, Elapsed Time: 1.43 (s)
Initializing dependency parser done [3,4 sec].
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator parse
[main] INFO edu.stanford.nlp.parser.common.ParserGrammar - Loading parser from serialized file edu/stanford/nlp/models/lexparser/frenchFactored.ser.gz ...
done [3,0 sec].
ama burada
root(ROOT-0, chat-2)
det(chat-2, Le-1)
case(souris-5, mange-3)
det(souris-5, la-4)
nmod:mange(chat-2, souris-5)
punct(chat-2, .-6)
(aynı tam yapıyla, kedi fareyi yiyor
) "Le uyuz la souris chat" ile sonucudur Sadece saçmalık olan ; ve bu olağanüstü değil, birçok cümleyi test ettim ve her zaman bu tür bir çıktı elde ettim. Bu yüzden kötü bir yapılandırma dosyası kullandığımı düşünüyorum.
Herhangi bir yardım için teşekkür ederiz!
Bir çözüm buldunuz mu? @jpl – zwlayer