stanfordnlp / CoreNLP

CoreNLP: A Java suite of core NLP tools for tokenization, sentence segmentation, NER, parsing, coreference, sentiment analysis, etc.
http://stanfordnlp.github.io/CoreNLP/
GNU General Public License v3.0
9.65k stars 2.7k forks source link

Sentiment Pipeline Score #920

Closed darav37 closed 4 years ago

darav37 commented 5 years ago

I read on the Stanford NLP website that the sentiment scores ran from 1-25 (most negative to most positive), does anyone know how I can access these scores and print them along with the sentiment itself for a given dataset?

J38 commented 5 years ago

To the best of my knowledge the training data has the 5 point scale, so our software won't generate scores in the 1-25 range. Where did you read scores ran from 1-25 ?

darav37 commented 5 years ago

@J38 https://nlp.stanford.edu/sentiment/treebank.html either way do you know how I could print out the 1-5 scores?

J38 commented 5 years ago

The scores are in the text and json output formats.

java -Xmx5g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,sentiment -file example.txt