0

一旦 coreNLP 服务器启动,我只想调用 openIE 模块。我从shell试过这个:

$ java -mx4g -cp "$HOME/corenlp/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer &
$ java -cp "$CORE/*" -Xmx1g edu.stanford.nlp.pipeline.StanfordCoreNLPClient edu.stanford.nlp.naturalli.OpenIE -file inputfile.txt

几秒钟后,日志冻结,没有任何反应。有人能帮助我吗?

4

1 回答 1

1

使用 StanfordCoreNLPClient 无法做到这一点,您需要运行管道。您可以在此处找到使用客户端的完整说明:

http://stanfordnlp.github.io/CoreNLP/corenlp-server.html

例如:

java -Xmx4g edu.stanford.nlp.pipeline.StanfordCoreNLPClient -cp "*" -annotators tokenize,ssplit,pos,lemma,ner,depparse,natlog,openie -file input.txt  -backends localhost:9000 

请注意,OpenIE 提取器需要它之前的管道中的所有内容,因此运行这部分管道不需要额外的成本:tokenize,ssplit,pos,lemma,ner,depparse,natlog

于 2017-03-07T03:11:01.377 回答