Sentiment Analysis is the most common text classification tool that analyses an incoming message and tells whether the underlying sentiment is positive, negative our neutral.
How does sentiment Analysis work? Basic sentiment analysis of text documents follows a straightforward process:
- Break each text document down into its component parts (sentences, phrases, tokens and parts of speech)
- Identify each sentiment-bearing phrase and component
- Assign a sentiment score to each phrase and component (-1 to +1)
- Optional: Combine scores for multi-layered sentiment analysis
We will be implementing logistic regression for sentiment analysis on tweets. Given a tweet, you will decide if it has a positive sentiment or a negative one. Specifically we will cover:
- Learn how to extract features for logistic regression given some text
- Implement logistic regression from scratch
- Apply logistic regression on a natural language processing task
- Test using your logistic regression
- Perform error analysis
We will be implementing Naive Bayes for sentiment analysis on tweets. Given a tweet, you will decide if it has a positive sentiment or a negative one. Specifically we will cover:
- Training a naive bayes model on a sentiment analysis task
- Test using our model
- Compute ratios of positive words to negative words
- Do some error analysis
- Predict on your own tweet
- We will use the ratio of probabilities between positive and negative sentiments and this approach gives us simpler formulas for these 2-way classification tasks.