如何解析多语言的句子? [英] How to parse sentence that is multilingual?
本文介绍了如何解析多语言的句子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我使用斯坦福解析器解析如下句子时:Jirí Hubac 的剧本是一颗宝石."安德烈·特平的引人入胜的性格研究."
When I use Stanford Parser to parse sentences like: "Jirí Hubac 's script is a gem ." "Absorbing character study by André Turpin ."
它引发内部错误.
如何处理句子是多语种的情况?
How to deal with such situation that the sentence is multilingual?
推荐答案
使用此处提供的完整斯坦福 CoreNLP 工具包:
Using the full Stanford CoreNLP toolkit available here:
http://stanfordnlp.github.io/CoreNLP/
我运行了这个命令:
java -Xmx6g -cp "stanford-corenlp-full-2015-12-09/*" edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse -file example.txt -outputFormat text
解析你的例句没有问题,输出可以在文件中找到:example.txt.out
It had no problem parsing your example sentence and the output can be found in the file: example.txt.out
能否请您提供您发出的命令以及尝试运行这句话时遇到的错误?
Could you please provide the command you issued and the error you got when trying to run on this sentence?
这篇关于如何解析多语言的句子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文