5.1.3. Sentiment Analysis
Sentiment analysis determines the emotional tone of text. Imagine having to read 10,000 product reviews and categorize each as positive, negative, or neutral—sentiment analysis does this automatically at scale. It answers: "How do people feel about this?"
Key characteristics:
- Input: Text (reviews, social media posts, feedback, comments)
- Output: Sentiment label (positive/negative/neutral/mixed) with confidence scores
- Can analyze at document level OR sentence level for granular insights
Confidence scores: The output includes probability scores for each sentiment. For example: positive: 0.85, neutral: 0.10, negative: 0.05. This helps you understand certainty and handle edge cases.
Opinion Mining (aspect-based sentiment) goes deeper by identifying WHAT is being praised or criticized:
- Input: "The hotel room was clean but the staff was rude"
- Output:
- Aspect: "room" → positive (clean)
- Aspect: "staff" → negative (rude)
This is critical for understanding the full picture—overall sentiment might be "mixed," but opinion mining reveals specifically what needs improvement.
Common scenarios:
- Analyzing product reviews to identify strengths and weaknesses
- Monitoring social media brand sentiment in real-time
- Measuring customer satisfaction from support interactions
- Tracking sentiment trends over time
- Prioritizing negative feedback for immediate response
What sentiment analysis does NOT do:
- Identify what topics are discussed (that's key phrase extraction)
- Detect sarcasm reliably (this remains challenging for AI)
- Understand context-dependent sentiment (e.g., "This movie was sick!" as positive)
⚠️ Exam Tip: Opinion mining provides ASPECT-LEVEL sentiment, linking sentiment to specific targets. Basic sentiment analysis only provides DOCUMENT-LEVEL or SENTENCE-LEVEL sentiment without identifying what the sentiment is about.