All I want to do is find the sentiment (positive/negative/neutral) of any given string. On researching I came across Stanford NLP. But sadly its in Java. Any ideas on how ca
stanford-corenlp is a really good wrapper on top of the stanfordcore-nlp to use it in python.
wget http://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip
# Simple usage
from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('/Users/name/stanford-corenlp-full-2018-10-05')
sentence = 'Guangdong University of Foreign Studies is located in Guangzhou.'
print('Tokenize:', nlp.word_tokenize(sentence))
print('Part of Speech:', nlp.pos_tag(sentence))
print('Named Entities:', nlp.ner(sentence))
print('Constituency Parsing:', nlp.parse(sentence))
print('Dependency Parsing:', nlp.dependency_parse(sentence))
nlp.close() # Do not forget to close! The backend server will consume a lot memory.
More info