Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does NLTK have any pre-trained classifiers for Sentiment Analysis

I was comparing NLTK and Stanford CoreNLP and found out that the latter one had an RNTN (Recursive Tensor Neural Network) implementation provided for Sentiment Analysis. The examples available online show that we do not need to train it as it has already been trained using large datasets like the Penn TreeBank

Does NLTK provide a similar kind of feature? The reason I am asking about it is because whatever implementations for NLTK I found online included training a particular classifer like Naive-Bayes or the MaxEnt.

P.S.: Is it just because Python is easy to use that NLTK is more popular? I am more comfortable in Java so should I opt for Stanford CoreNLP or switch to NLTK + python

like image 384
Shantanu Godbole Avatar asked May 12 '16 17:05

Shantanu Godbole


1 Answers

I found that NLTK already has many pre-processed features. For example, at the buttom of this page http://www.nltk.org/api/nltk.sentiment.html you will find a preprocessed sentiment analysis fitted for social media (look for "VADER"). If relevant, you can also check this: http://www.nltk.org/nltk_data/ It provides a full list of all datasets incorporated into NLTK, some via processed data (all kinds of lexicons like the famous WORDNET). I don't have any experience with Stanford's coreNLP, so I can't give any relevant comparison. Anyway, hope these help :)

like image 110
TsurG Avatar answered Sep 17 '22 18:09

TsurG