Twitter Sentiment Analysis
I have long dreamt of exploring human behaviour with technology. Thanks to Artificial Intelligence this dream was turned into a reality- I developed an algorithm via which I could conduct Sentiment Analysis using the Twitter API to fetch tweets to act as a dataset. This code required me to read a number of journals and research papers such that the code is succinct and seamless. Following is the code: from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import twitter_credentials # Source document name # class TwitterStreamer(): def __init__(self): pass def stream_tweets(self, fetched_tweets_filename, hash_tag_list): listener = StdOutListener(fetched_tweets_filename) auth = OAuthHandler(twitter_credentials.CONSUMER_KEY,twitter_cr...