Course
The lecture "Emotion Analysis from Text" by Roman Klinger, with slides, assignments and literature.
The lecture Emotion Analysis from Text is a class I taught at the University of Stuttgart from winter 2020/2021 to 2022/2023. It covers emotion theories from psychology, corpus creation, dictionary-based and machine-learning methods, appraisal-based emotion analysis, role labelling and emotion intensity. I hope the material helps anyone who wants to learn about emotion analysis in text or to design a class on the topic.
I now teach newer versions of the lecture at the University of Bamberg. The material here is still from Stuttgart; I plan to update it with the Bamberg material in winter 2027.
Slides
| Session | Topic | Slides |
|---|---|---|
| 1 | Introduction | |
| 2 | Emotion theories | |
| 3 | Corpora | |
| 4 | Dictionaries | |
| 5 | Discussion of assignment 1 | |
| 6 | Machine-learning classification | |
| 7 | Appraisal-based emotion analysis 1 | |
| 8 | Appraisal-based emotion analysis 2 | |
| 9 | Discussion of assignment 2 | |
| 10 | Role labelling | |
| 11 | Discussion of assignment 3 | |
| 12 | Intensity, valence and arousal | PDF In-class exercise on best–worst scaling: PDF |
| 13 | Discussion of assignment 4 |
If you would like to use the LaTeX sources of the slides for your own lecture, please contact Roman Klinger.
Assignments
The assignment sheets are from the last iteration of the class.
- Creating corpora (PDF). Annotation environment: spreadsheet (XLSX), online version.
- Training classification models (PDF). Data: unify-emotion-datasets on GitHub; the corpora on this site can be used as well.
- Literature review (PDF). Templates for the report and the slides: ZIP (LaTeX).
- Role labelling (PDF). Data: extract-emotion-data on GitHub.
Literature
There is no textbook on emotion analysis from text. These books give a good overview, though usually in less detail than the lecture:
- Rosalind W. Picard: Affective Computing. MIT Press. Broader than the lecture: emotion and affect as modelled with computers in general.
- Bing Liu: Sentiment Analysis and Opinion Mining (online version). On text analysis, with more on opinion mining and sentiment than on emotions.
- Lisa Feldman Barrett, Michael Lewis, Jeannette M. Haviland-Jones (eds.): Handbook of Emotions. Guilford Press. A very good overview of emotion theories in psychology.
The papers behind the corpora and methods discussed in the lecture are cited with each corpus on the Data sets page and under How to cite.

