Hostname: page-component-77f85d65b8-nc6n8 Total loading time: 0 Render date: 2026-03-26T12:49:06.887Z Has data issue: false hasContentIssue false

Creating and Comparing Dictionary, Word Embedding, and Transformer-Based Models to Measure Discrete Emotions in German Political Text

Published online by Cambridge University Press:  29 June 2022

Tobias Widmann*
Affiliation:
Department of Political Science, Aarhus University, Bartholins Allé 7, 8000 Aarhus, Denmark. Email: widmann@ps.au.dk
Maximilian Wich
Affiliation:
Department of Informatics, Technical University Munich, Boltzmannstraße 3, 85748 Garching, Germany. Email: maximilian.wich@tum.de
*
Corresponding author Tobias Widmann
Rights & Permissions [Opens in a new window]

Abstract

Previous research on emotional language relied heavily on off-the-shelf sentiment dictionaries that focus on negative and positive tone. These dictionaries are often tailored to nonpolitical domains and use bag-of-words approaches which come with a series of disadvantages. This paper creates, validates, and compares the performance of (1) a novel emotional dictionary specifically for political text, (2) locally trained word embedding models combined with simple neural network classifiers, and (3) transformer-based models which overcome limitations of the dictionary approach. All tools can measure emotional appeals associated with eight discrete emotions. The different approaches are validated on different sets of crowd-coded sentences. Encouragingly, the results highlight the strengths of novel transformer-based models, which come with easily available pretrained language models. Furthermore, all customized approaches outperform widely used off-the-shelf dictionaries in measuring emotional language in German political discourse.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press on behalf of the Society for Political Methodology
Figure 0

Figure 1 Overview over the three different approaches.

Figure 1

Table 1 Precision, recall, and F1 scores for the three different approaches.

Figure 2

Figure 2 Relationship between level of emotional occurrences and F1 score of the ELECTRA model.

Figure 3

Table 2 Precision, recall, and F1 scores for the Linguistic Inquiry Word Count (LIWC) and NRC dictionaries.

Supplementary material: PDF

Widmann and Wich supplementary material

Online Appendix

Download Widmann and Wich supplementary material(PDF)
PDF 2.1 MB
Supplementary material: Link

Widmann and Wich Dataset

Link