Decoding the Digital Pulse: Analyzing the 2018 Brazilian Election via YouTube
Analyzing the acceptance of the 2018 brazilian presidential election' main candidates based on YouTube comments
This paper presents a computational framework to analyze the public acceptance of the two main 2018 Brazilian presidential candidates, Jair Bolsonaro and Fernando Haddad, by processing 7.5 million YouTube comments. The authors employ a hybrid approach combining political positioning detection and sentiment analysis to correlate social media discourse with actual electoral outcomes.
TL;DR
Researchers from the Federal University of Viçosa leveraged 7.5 million YouTube comments to track the 2018 Brazilian presidential race. By combining a custom-weighted dictionary for political positioning with an enhanced SentiStrength sentiment engine, the study correctly identified the broad public trend that led to Jair Bolsonaro's victory over Fernando Haddad, highlighting a significant "acceptance gap" between the candidates.
Context: Why YouTube?
In the 2018 Brazilian election, YouTube became a primary battleground due to limited official TV airtime for certain candidates. Unlike Twitter, where hashtags make sentiment labeling easier, YouTube is a "wild west" of long-form discourse. This paper fills a critical gap by providing a methodology to extract structured political insights from this unstructured, informal Portuguese text.
The Challenge of "Neutral" Data
The authors identified a major hurdle: a comment found on a "Haddad" video might actually be a pro-Bolsonaro message (or vice versa). To solve this, they couldn't rely on simple keyword matching. They needed to detect Positioning (who is the comment about?) before Sentiment (is it positive or negative?).
Methodology: A Two-Pronged Approach
1. Political Positioning Detection
The team used a fusion of two techniques:
- Weighted Dictionaries: 10 volunteers helped rank terms (e.g., "#elenao", "mito", "13", "17") based on their relevance to a candidate.
- Cosine Similarity: Measuring how close the vector of a comment is to a "synthetic" text representing each candidate.

2. Sentiment Analysis (Enhanced SentiStrength)
The researchers didn't just use out-of-the-box tools. They expanded the SentiStrength Portuguese lexicon by over 100%, adding slang, political nicknames (like "bolsomito" or "malddad"), and plural/feminine variations to handle the nuances of Brazilian political internet culture.
Key Results: Mirrors of Reality
The results confirmed a stark divide in candidate acceptance.
- First Turn: Bolsonaro saw 38.8% positive sentiment vs. Haddad’s 19.8%.
- Second Turn: While sentiments became more polarized (and negative for both), Bolsonaro's net acceptance remained significantly higher.

Interestingly, when the authors factored in Comment Likes (as a proxy for aggregate agreement), the acceptance lead for Bolsonaro became even more pronounced, suggesting that pro-Bolsonaro sentiments had a higher "virality" or agreement rate among the user base.
Deep Insight: The Power of Lexicon Adaptation
The most valuable technical takeaway is the performance jump from the "Original" to the "Final" lexicon. The F1-score rose from 66.9% to 77.8% just by adding domain-specific political terms. This underscores that in political NLP, context is king—standard sentiment dictionaries are often "blind" to the heavy emotional weight of political nicknames and memes.
Conclusion & Limitations
While the study successfully mirrored the election result, it highlights the fragility of dictionary-based systems: they require manual updates to stay relevant to changing slang. However, as an archival study of the 2018 election, it provides a vital blueprint for how multimedia platforms like YouTube function as a democratic (or anti-democratic) barometer in the Global South.
