How to get sentiment via stanford corenlp interact

2019-08-08 16:35发布

Interactive shell with all annotators including sentimentI 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条回答
做个烂人
2楼-- · 2019-08-08 17:04

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

查看更多
登录 后发表回答