HunEmBERT (Political Emotion & Sentiment)

Problem

Emotions and sentiment play a crucial role in communication, and particularly in political communication, but manually annotating large-scale corpora is prohibitively slow and costly. Traditional lexicon-based sentiment approaches fail to capture the nuanced, context-dependent expression of political emotions and value-laden arguments. A scalable, domain-adapted solution was needed to support both research and applied analysis in this area.

Solution

We developed a fine-tuned variant of the Hungarian BERT model adapted specifically for Hungarian political texts, which also served as a preliminary study for our later multilingual solutions. The model was trained for both sentiment detection and emotion classification, using techniques such as learning-rate scheduling, early stopping, and systematic error analysis, with particular attention to non-literal meanings, idioms, irony, and sarcasm. By combining domain adaptation with transformer fine-tuning, HunEmBERT achieves robust performance even in noisy, real-world data.

Outcome

The resulting model enables stable automatic recognition of emotions and value-laden arguments in Hungarian political discourse. It provides a reliable foundation for analyzing affective dimensions of political texts at scale, with applications ranging from academic research to media and policy analysis.
Results have been validated in peer-reviewed publications, and the model has since been applied in various practical settings, highlighting its relevance beyond academic evaluation.

Related publications

Confusion matrix of HunEmBERT predictions
HunEmBERT achieves stable results across multiple emotion classes.
HunEmBERT fine-tuning architecture
Fine-tuning pipeline of HunEmBERT for sentiment and emotion detection.

← Back to Projects