Political Tweet Sentiment & Framing

NLP & Text Representation 2018 Exploratory Applied NLP

Overview

This project explored political communication on Twitter through an applied NLP pipeline for lexical analysis, sentiment profiling and emotion-based framing.

The work combined tweet collection, text preprocessing, word-frequency analysis, n-gram extraction, sentiment analysis and emotion lexicon matching to compare communication patterns across political actors and time periods.

The project should be read as an exploratory text-analytics prototype, not as a modern transformer-based sentiment system.

Problem

Political messages are not only informative; they also frame issues through specific vocabularies, emotional tones and repeated expressions.

The goal was to build a reproducible workflow for extracting these patterns from Twitter data and comparing political discourse through interpretable textual indicators.

Example 1 — Lexical and N-Gram Analysis

The pipeline tokenized tweet text, removed punctuation and stopwords, and computed frequent words, bigrams and trigrams.

tweet text
    ↓
tokenization
    ↓
cleaning and stopword removal
    ↓
word frequencies, bigrams and trigrams

This was used to identify recurrent terms and expressions associated with specific political actors or thematic periods.

Example 2 — Sentiment and Emotion Profiling

The project also used sentiment and emotion lexicons to summarize the emotional profile of political communication.

In particular, the workflow explored polarity scores and NRC-style emotion categories such as anger, fear, trust, joy and anticipation.

These outputs were used as descriptive indicators, not as definitive measures of political intent.

Technologies and Methods Used

Implemented Elements

Evaluation Status

The project produced descriptive NLP indicators rather than a supervised classification model.

The outputs are therefore useful for exploration and comparison, but they should not be interpreted as externally validated sentiment labels.

Methodological Note

Lexicon-based sentiment analysis is interpretable and useful for exploratory work, but it has important limitations.

It may fail with irony, sarcasm, negation, political slang, multilingual content and context-dependent meaning. For this reason, the results should be treated as descriptive signals rather than as ground-truth psychological or political measures.

Modern Extension

A modern version of this project would preserve the interpretable descriptive layer while adding contextual language models and stronger evaluation.

Resources

Technical report in preparation.

Code available upon request.

Technical Context