Mining Historical Emotions

Risto Turunen & Ilari Taskinen, Tampere University

https://doi.org/10.58077/55bz-wj46

The use of computational approaches to study the history of emotions has been uncommon thus far.[1] This rarity stems from the nature of the discipline: analyzing the psychological underpinnings, cultural meanings, and social practices of emotions using sparse and fragmented sources requires nuanced interpretations and conceptualizations far exceeding simple numerical analysis of the data. Despite the challenges, historians of emotions might benefit from adding quantitative methods applied in the digital humanities to their research toolkit. This suggestion is motivated by the global trend of digitizing historical documents in archives and libraries which significantly improves data accessibility. Text mining these digital collections offers methodological opportunities to identify previously unseen layers of historical emotions, provided the analysis is conducted with historical sensitivity.

The foundation of today’s emotion mining methodologies can be traced back to sentiment analysis utilized in studies of public-opinion analysis in the early 1900s and in text subjectivity analysis in computational linguistics in the 1990s. Computer-based sentiment analysis has surged in popularity with the growth of web-based textual data.[2] In its simplest form, sentiment analysis identifies automatically whether a given text conveys a positive or negative sentiment. Later the methodology of emotion mining has expanded to many other perspectives, including emotion classification. This advanced technique investigates which specific emotions are expressed in analyzed texts and their emotional intensity. It typically relies on psychological theories to place emotions into basic emotion categories such as fear, anger, disgust, sadness, happiness, and surprise.[3]

From a technical perspective, the two standard approaches to emotion mining are lexicons and machine learning. Emotion lexicons can give, for example, each word a sentiment polarity value or an emotion category value or both. These lexicons can be constructed either manually or automatically. Sentiment or emotion classification is based on summing up the values defined in the lexicon. Supervised machine learning depends on annotated training data: when a machine has ‘learned’ enough human-labelled examples of emotions in the text – for example, sentences with emotion labels – it can predict emotions in the unseen textual datasets.[4]

Computer-based emotion-mining methods should not be implemented in historical research without deliberation. Approaches rooted in psychological theories of universal basic emotions can be particularly problematic. The fundamental premise in the history of emotions is that emotions are culturally constructed and vary over time and across different contexts.[5] The problem of universalism becomes evident in lexicon-based analysis. There are several off-the-shelf emotion lexicons designed for present-day issues, such as sorting customer feedback, but their usefulness in the historical domain is questionable. A historian using an emotion lexicon should not rely on ready-made lexicons but adjust them to the historical context under scrutiny or create their own lexicon specifically designed for the culture of the era.[6] While transferring historical expertise into a machine with self-created lexicons is possible, the methodological issue of linguistic ambiguity cannot be solved using lexicon-based approaches: depending on the context, one word can refer to many different emotions.

The benefit of lexicon-based approaches compared to machine learning is that they require less computational effort and are more transparent for the historians of emotions to interpret.[7] Machine-learning approaches, while requiring more technical knowledge and being less transparent than lexicon-based methods, have greater potential to capture context-specific and historical meanings of emotional language. Unlike lexicons, machine-learning models are not limited to human-predefined emotion words: they can utilize additional features of language to classify emotions. The rise of the transformer architecture since 2018 has led to a breakthrough in machine learning and especially text mining, with large language models (LLMs) such as ChatGPT detecting the nuances of human emotions more accurately than any previous technologies.[8] In addition, transformers excel in tasks that require an understanding of semantic equivalence across languages, which allows more complex research designs than previously possible, involving multiple languages and cross-cultural comparisons.[9]

The challenge for historical-emotion mining is that most LLMs have been trained on contemporary data and thus reflect modern understanding of emotions. A promising but understudied area of historical-emotion analysis involves integrating expert annotations with LLMs.[10] Manually annotating emotions in historical texts demands extensive knowledge of the time and place where the text originated, as well as a precise definition of the complex concept of emotion in this particular research context. Although annotation is a laborious process, it is challenging to imagine a methodologically solid alternative that does not involve the ‘historian-in-the-loop’. If theoretical rigour from the history of emotions can be combined with LLMs that have been trained from scratch or at least fine-tuned with historical data, advances in the study of past emotions are possible.

A crucial issue to consider is the differing roles that computational analysis serves in computer science and humanistic research. In computer science, emotion mining is applied to large datasets for tasks such as filtering hate speech from online forums, sorting customer feedback, or stock market analysis. For these practical tasks, a functional solution that performs sufficiently well is enough. In historical research, computational analysis functions as a supportive intermediary step rather than an ultimate goal. To understand the web of cultural and social meanings in a given historical context, historians must place their empirical evidence into wider frames and recognize the limitations of their sources. This includes the traditional close reading of historical texts. The lack of historical awareness in computational studies of emotions in the past may be a reason why historians of emotions sometimes adopt a critical stance towards computer-based emotion mining.[11]

Historical research is about putting things into perspective and is at its best when links between the micro-level of people’s lives and the macro-level of cultural and social currents are made visible. Computational emotion mining offers promising possibilities for achieving this convergence, and the field is likely to expand in the near future. Text-mining methods can reveal general patterns not easily distinguished with the naked eye. Conversely, a detailed close reading can spot meanings that broad categorizations do not grasp.

Notes

[1] For a historical analysis of the changes in the frequencies of emotion words over time, see Peter Stearns, ‘Obedience and Emotion’, Journal of Social History, 47 (2014): 593–611; Risto Turunen, Ilari Taskinen, Ville Kivimäki and Lauri Uusitalo, ‘Mining Emotions from the Finnish War Letter Collection, 1939–1944’, Proceedings of the 6th Digital Humanities in the Nordic and Baltic Countries Conference (2022); Milan van Lange, Emotional Imprints of War (Bielefeld: Bielefeld University Press, 2023); for a co-occurrence analysis of emotion words, see Risto Turunen, Shades of Red (Helsinki: The Society for Labour History, 2021): 312-341; for a historical sentiment analysis based on emotion lexicons, see Rachele Sprugnoli, Sara Tonelli, Alessandro Marchetti and Giovanni Moretti, ‘Towards Sentiment Analysis for Historical Texts’, Digital Scholarship in the Humanities, 31, (2016): 762-772; Pierre Lack, ‘Using Word Analysis to Track the Evolution of Emotional Well-being in Nineteenth-century Industrializing Britain’, Historical Methods: A Journal of Quantitative and Interdisciplinary History, 54 (2021): 228-247.

[2] Mika Mäntylä, Daniel Graziotin and Miikka Kuutila, ‘The Evolution of Sentiment Analysis’, Computer Science Review, 27 (2018): 16-32.

[3] Saif Mohammad and Peter Turney, ‘Crowdsourcing a Word-Emotion Association Lexicon’, Computational Intelligence, 29 (2013): 436-465; Saif Mohammad, ‘Word Affect Intensities’, Proceedings of the 11th Edition of the Language Resources and Evaluation Conference (2018).

[4] Thomas Schmidt, Katrin Dennerlein and Christian Wolff, ‘Towards a Corpus of Historical German Plays with Emotion Annotations’, International Conference on Language, Data, and Knowledge (2021).

[5] Rob Boddice, The History of Emotions (Manchester: Manchester University Press, 2018).

[6] Risto Turunen, Ilari Taskinen, Lauri Uusitalo and Ville Kivimäki, ‘Mining Emotions from the Finnish War Letter Collection, 1939–1944’, Digital Humanities in the Nordic and Baltic Countries Conference (2022): 135-44.

[7] Emily Öhman, The Language of Emotions. (Helsinki: Helsinki University Press, 2021): 66-7.

[8] Mostafa Amin, Erik Cambria and Björn Schuller, ‘Will Affective Computing Emerge from Foundation Models and General AI?’, IEEE Intelligent Systems, 38 (2023): 15-23.

[9] Edward Slingerland and Maciej Chudek, ‘The Prevalence of Mind-Body Dualism in Early China’, Cognitive Science: A Multidisciplinary Journal, 35 (2011): 997-1007.

[10] Katrin Dennerlein, Thomas Schmidt and Christian Wolff, ‘Computational Emotion Classification for Genre Corpora of German Tragedies and Comedies from 17th to Early 19th Century’, Digital Scholarship in the Humanities, 38 (2023): 1466-1481.

[11] Thomas Hills, Eugenio Proto, Daniel Sgroi and Chanuki Seresinhe, ‘Historical Analysis of National Subjective Wellbeing Using Millions of Digitized Nooks’, Nature Human Behaviour, 3 (2019): 1271-1275.