In this chapter, we turn to the problem of sentiment analysis. Sentiment analysis is an umbrella term for a number of techniques to figure out how a speaker feels about a certain topic or piece of content.
A vanilla case study of sentiment analysis is polarity. Given a document or text string (for instance, a Tweet, a review, or a comment on a social network), the aim is to determine whether the author feels good, bad, or neutral about the item or topic in question.
At first look, this problem might seem trivial: A lookup table with positive and negative words, and simply counting the word frequencies should do, right? Not so fast. Here are a few examples of why this is tricky:
- Their decadent desserts made me hate myself
- You should try this place if you love cold food
- Disliking cake is not really my thing
What can we see in...