Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can Stanford corenlp be used for Sentiment Analysis? #32

Open
adishankar710 opened this issue Sep 27, 2015 · 2 comments
Open

How can Stanford corenlp be used for Sentiment Analysis? #32

adishankar710 opened this issue Sep 27, 2015 · 2 comments

Comments

@adishankar710
Copy link

Hi I am planning to use python wrapper for corenlp for sentiment analysis in my lectures. Can someone please point me to some right documentation? It is a bit urgent. Thanks in advance

@cuzzo
Copy link

cuzzo commented Feb 21, 2016

Hey @adishankar710 ,

I'm wondering the same thing. Were you ever able to get it working?

Thanks!

@AlexFine
Copy link

Here's an example:

from pycorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('http://localhost:9000')
sentence = nlp.annotate("I'm so happy that CoreNLP has sentiment", properties={
    'annotators': 'sentiment',
    'outputFormat': 'json',
    'timeout': 1000,
})

for s in sentence["sentences"]:
    print(s['sentimentDistribution'])
    print(s["sentiment"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants