简体   繁体   English

仅从corenlp服务器调用openie模块

[英]invoke only the openie module from corenlp server

I'd like to invoke only the openIE module once coreNLP server is up. 一旦coreNLP服务器启动,我只想调用openIE模块。 I tried this from 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

After a few seconds, logs get freeze and nothing happens. 几秒钟后,日志冻结,什么也没发生。 Can someone help me please? 有人能帮助我吗?

You can't do that with the StanfordCoreNLPClient, you need to run a pipeline. 使用StanfordCoreNLPClient无法做到这一点,您需要运行管道。 You can find full instructions for using the client here: 您可以在此处找到有关使用客户端的完整说明:

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

For example: 例如:

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

Note that the OpenIE extractor requires everything in the pipeline prior to it, so there is not an extra cost to running this part of the pipeline: tokenize,ssplit,pos,lemma,ner,depparse,natlog 请注意,OpenIE提取程序需要先于管道中的所有内容,因此运行管道的这一部分不会产生任何额外费用: tokenize,ssplit,pos,lemma,ner,depparse,natlog

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM