Sentiment analysis with NLTK python for sentences using sample data or webservice?

后端 未结 2 747
傲寒
傲寒 2021-02-04 04:41

I am embarking upon a NLP project for sentiment analysis.

I have successfully installed NLTK for python (seems like a great piece of software for this). However,I am hav

2条回答
  •  长情又很酷
    2021-02-04 05:06

    The movie review data has already been marked by humans as being positive or negative (the person who made the review gave the movie a rating which is used to determine polarity). These gold standard labels allow you to train a classifier, which you could then use for other movie reviews. You could train a classifier in NLTK with that data, but applying the results to election tweets might be less accurate than randomly guessing positive or negative. Alternatively, you can go through and label a few thousand tweets yourself as positive or negative and use this as your training set.

    For a description of using Naive Bayes for sentiment analysis with NLTK: http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/

    Then in that code, instead of using the movie corpus, use your own data to calculate word counts (in the word_feats method).

提交回复
热议问题