Analysed the sentiments of tweets made by a Twitter handle and developed a code in R step by step and analysed the practical implementations of sentiment analysis. Analysing each post and understanding the sentiment associated with that post helps us find out which are the key topics or themes which resonate well with the audience.
- Extracting tweets using Twitter application
- Cleaning the tweets for further analysis
- Getting sentiment score for each tweet
- Segregating positive and negative tweets
- First installed the relevant packages that is needed to extract tweets from Twitter, we need package ‘twitteR’.
- ‘Syuzhet’ package will be used for sentiment analysis.
- While ‘tm’ and ‘SnowballC’ packages are used for text mining and analysis.
- Invoked Twitter API using the app created and using the keys and access tokens got through the app.