如何通过斯坦福大学Corenlp交互式Shell来获得情感? [英] How to get sentiment via stanford corenlp interactive shell?

查看:155
本文介绍了如何通过斯坦福大学Corenlp交互式Shell来获得情感?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试从斯坦福大学corenlp 获取情感值,但在交互式外壳中,这种情感似乎是没有作为输出给出.

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.

在两种情况下,我都获得了交互式外壳.喜欢-NLP> 但是,没有情绪的迹象-正面或负面.

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

此外,如果我们使用sentimentPipeline而不是nlp.pipeline.它给人的感觉.我可以通过交互式外壳获得任何方式吗?或者,如果可以的话,我们可以通过pexpect使用sentimentPipeline吗?

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?

推荐答案

我使用的是Stanford corenlp的旧版本(3.4.1),但使用的是最新版本(3.5.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.

这篇关于如何通过斯坦福大学Corenlp交互式Shell来获得情感?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆