Overview
News sentiment—the emotional tone of articles—reveals how outlets frame stories and what mood they convey to readers. Tagtaly uses the TextBlob library to measure sentiment polarity on a -1.0 to +1.0 scale. This document explains how sentiment analysis works, its limitations, and how to interpret sentiment scores.
What is Sentiment?
Sentiment reflects the emotional tone of text. A positive sentiment means the text sounds optimistic or favorable. A negative sentiment means it sounds pessimistic, critical, or unfavorable. Neutral sentiment means the text is factual without emotional language.
- -1.0: Extremely negative, catastrophic tone
- -0.5 to -0.1: Negative, critical tone
- -0.1 to +0.1: Neutral, factual tone
- +0.1 to +0.5: Positive, optimistic tone
- +0.5 to +1.0: Extremely positive, celebratory tone
How TextBlob Works
The Algorithm
TextBlob is a Python library that analyzes text using pre-trained sentiment models. It works by:
- Breaking text into words and phrases
- Comparing each word against a sentiment lexicon (dictionary of pre-scored words)
- Aggregating scores to produce an overall polarity
- Returning a score between -1.0 (negative) and +1.0 (positive)
Code Example
Sentiment Interpretation
What Sentiment Means for News
Sentiment scores reveal editorial framing. Two outlets covering the same event may frame it differently:
Outlet A: "Government unveils innovative new healthcare plan" → Sentiment: +0.6 (positive)
Outlet B: "Government imposes controversial healthcare cuts" → Sentiment: -0.7 (negative)
Same event, opposite sentiment. Tagtaly detects these differences.
Sentiment by Topic
Different topics naturally have different average sentiments:
| Topic | Typical Sentiment Range | Reason |
|---|---|---|
| Entertainment | +0.3 to +0.7 | Celebratory, upbeat content |
| Finance | -0.2 to +0.2 | Mixed news, neutral reporting |
| Crime & Justice | -0.4 to -0.1 | Negative events |
| Politics | -0.3 to +0.3 | Polarized perspectives |
Limitations of Sentiment Analysis
Sarcasm & Irony
TextBlob struggles with sarcasm. "What a brilliant decision" written sarcastically scores as positive, when the author meant negative. This affects ~5% of articles.
Context Ignorance
Sentiment is calculated from text alone. The headline "Stock market falls 10%" scores negative, but this might be positive for investors who were bearish.
Negation Handling
Complex negations confuse the algorithm. "The plan is not good" correctly scores negative, but "The lack of opposition means the plan succeeds" may misinterpret "opposition" as negative.
Domain-Specific Language
News language has conventions that TextBlob doesn't understand. A headline "Bank crisis deepens" scores very negative, but financial analysts might see it as "expected correction."
Real-World Examples
Headline: "Incredible discovery of new medicine saves thousands"
Sentiment: +0.8 (Positive) Correct
Headline: "Great job ignoring climate warnings for decades"
Sentiment: +0.5 (Positive) Wrong (actually sarcastic/negative)
Headline: "Pandemic recovery shows resilience despite economic challenges"
Sentiment: -0.1 (Neutral) Reasonable, but misses the hopeful recovery angle
Using Sentiment Data
Story Angle Detection
Sentiment helps identify unique angles. If a politics story has unusually positive sentiment, it might signal unexpected good news in a normally negative category.
Outlet Bias
Comparing sentiment across outlets for the same topic reveals editorial bias. If Outlet A consistently scores higher sentiment than Outlet B for the same topics, Outlet A likely has a more positive frame.
Trend Monitoring
Tracking sentiment over time reveals public mood. If sentiment on "economy" articles drops significantly, it signals pessimism regardless of hard economic data.
Questions?
For questions about sentiment analysis, contact admin@tagtaly.com.