How to get sentiment via stanford corenlp interactive shell?

ⅰ亾dé卋堺 提交于 2019-12-13 18:47:19

问题


I have been trying to get the sentiment value from the stanford corenlp, but it seems in the interactive shell, the sentiment is not given as an output.

I have specified the annotators using the command given in the official website.

java -cp "*" -Xmx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref, sentiment

Also, when i tried for getting just the sentiment, then at first asked for other annotators, after providing i didn't give any output at all.

I am getting the interactive shell in both the cases. Like - NLP> But, there is no sign of sentiment - positive or negative.

Also, if we use the sentimentPipeline instead of nlp.pipeline. It gives the sentiment. Is there any way i can get via the interactive shell or if possible is there any way we can use sentimentPipeline with pexpect?


回答1:


I was using the older version of Stanford corenlp (3.4.1), but in the recent version (3.5.1), it gives the sentiment.



来源:https://stackoverflow.com/questions/31902722/how-to-get-sentiment-via-stanford-corenlp-interactive-shell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!