Target-based stance detection for understanding migration polarisation on Reddit
This open-source proof-of-concept (PoC) explores how online communities frame migration during the wars in Ukraine and Gaza. Instead of generic sentiment analysis, it zooms in on targets (actors, groups, events) and how people take a stance toward them — supportive, critical, or neutral (aka ABSA).
Built with LLM-powered stance analysis (Gemini API) and interactive Dash visualisations, the project is a step toward understanding how polarising narratives around migration emerge and spread online.
This project compares discussions on r/ukraine and r/IsraelPalestine (May–July 2025).
Traditional sentiment analysis failed here: discussions rarely used the word migration directly. Instead, debates revolved around who migration is about (e.g., Ukrainian refugees, Hamas, pseudo-pacifism) and how they were framed.
👉 How do Reddit communities frame migration-related conflicts, and what drives user engagement when direct entity-based sentiment is not the main indicator of stance?
-
Data Collection
- 100 posts (50 per subreddit)
- Keywords related to migration
- Period: May–July 2025
-
LLM-powered Stance Analysis (Gemini 2.0 Flash)
Extracted per post:- 🎯 Target (Hamas, Ukrainian refugees, pseudo-pacifism, etc.)
- 📌 Stance (Supportive, Critical, Neutral)
- 🔥 Intensity (1–5 scale)
This PoC comes with an interactive Dashboard:
- ☁️ Word Clouds — Most discussed targets by stance (supportive vs critical)
- 🔥 Polarisation Index — Heatmaps of stance intensity across subreddits
- ⏳ Temporal Trends — Evolution of stances over time
- 📈 Engagement Analysis — Linking stance & intensity to user engagement (upvotes, comments)
python dashboard.py
pip install -r requirements.txt