background preloader

Twitter sentiment analysis using Python and NLTK

Twitter sentiment analysis using Python and NLTK
This post describes the implementation of sentiment analysis of tweets using Python and the natural language toolkit NLTK. The post also describes the internals of NLTK related to this implementation. Background The purpose of the implementation is to be able to automatically classify a tweet as a positive or negative tweet sentiment wise. The classifier needs to be trained and to do that, we need a list of manually classified tweets. Positive tweets: I love this car.This view is amazing.I feel great this morning.I am so excited about the concert.He is my best friend. Negative tweets: I do not like this car.This view is horrible.I feel tired this morning.I am not looking forward to the concert.He is my enemy. In the full implementation, I use about 600 positive tweets and 600 negative tweets to train the classifier. Next is a test set so we can assess the exactitude of the trained classifier. Test tweets: Implementation The following list contains the positive tweets: Classifier Classify VoilĂ .

python-twitter - A python wrapper around the Twitter API GitHub is now the "source of truth" but I will always try to update to this project page. A Python wrapper around the Twitter API Author: The Python-Twitter Developers <python-twitter@googlegroups.com> Introduction This library provides a pure Python interface for the Twitter API. Twitter ( provides a service that allows people to connect via the web, IM, and SMS. Building From source: Install the dependencies: Download the latest python-twitter library from: Extract the source distribution and run: $ python setup.py build $ python setup.py install Testing With setuptools installed: $ python setup.py test Without setuptools installed: $ python twitter_test.py Getting the code View the trunk at: Documentation Using Todo

15 Fascinating Ways to Track Twitter Trends One of the great things about TwitterTwitter reviews is that it is a great place to track emerging trends. When major events or big stories occur, people tweet about it and it inevitably ends up at the top of Twitter Search as a top trend. But this only scratches the surface of tracking Twitter trends. There are a wide variety of web applications, Twitter accounts, and even iPhone apps that can help people do everything from track popular hashtags to graph out recent Twitter trends. Web-based Applications 1. 2. 3. 4. 5. 6. 7. Twitter Accounts 8. twithority: Twithority is an easy way to have the most recent Twitter trends tweeted to you. 9. 10. 11. gtrend: gtrend is short for "Google Trend." iPhone Apps 12. 13.

Related: