Recognizing Emotions in Short Texts

Abstract

Tese de mestrado, Ciência Cognitiva, Universidade de Lisboa, Faculdade de Ciências, 2022O reconhecimento automático de emoções em texto é uma tarefa que mobiliza as áreas de processamento de linguagem natural e de computação afetiva, para as quais se pode contar com o especial contributo de disciplinas da Ciência Cognitiva como Inteligência Artificial e Ciência da Computação, Linguística e Psicologia. Visa, sobretudo, a deteção e interpretação de emoções humanas através da sua expressão na forma escrita por sistemas computacionais. A interação entre processos afetivos e cognitivos, o papel essencial que as emoções desempenham nas interações interpessoais e a crescente utilização de comunicação escrita online nos dias de hoje fazem com que o reconhecimento de emoções de forma automática seja cada vez mais importante, nomeadamente em áreas como saúde mental, interação pessoa-computador, ciência política ou marketing. A língua inglesa tem sido o maior alvo de estudo no que diz respeito ao reconhecimento de emoções em textos, sendo que ainda existe pouco trabalho desenvolvido para a língua portuguesa. Assim, existe uma necessidade em expandir o trabalho feito para a língua inglesa para o português. Esta dissertação tem como objetivo a comparação de dois métodos distintos de aprendizagem profunda resultantes dos avanços na área de Inteligência Artificial para detetar e classificar de forma automática estados emocionais discretos em textos escritos em língua portuguesa. Para tal, a abordagem de classificação de Polignano et al. (2019) baseada em redes de aprendizagem profunda como Long Short-Term Memory bidirecionais e redes convolucionais mediadas por um mecanismo de atenção será replicada para a língua inglesa e será reproduzida para a língua portuguesa. Para a língua inglesa, será utilizado o conjunto de dados da tarefa 1 do SemEval-2018 (Mohammad et al., 2018) tal como na experiência original, que considera quatro emoções discretas: raiva, medo, alegria e tristeza. Para a língua portuguesa, tendo em consideração a falta de conjuntos de dados disponíveis anotados relativamente a emoções, será efetuada uma recolha de dados a partir da rede social Twitter recorrendo a hashtags com conteúdo associado a uma emoção específica para determinar a emoção subjacente ao texto de entre as mesmas quatro emoções presentes no conjunto de dados da língua inglesa que será utilizado. De acordo com experiências realizadas por Mohammad & Kiritchenko (2015), este método de recolha de dados é consistente com a anotação de juízes humanos treinados. Tendo em conta a rápida e contínua evolução dos métodos de aprendizagem profunda para o processamento de linguagem natural e o estado da arte estabelecido por métodos recentes em tarefas desta área tal como o modelo pré-treinado BERT (Bidirectional Encoder Representations from Tranformers) (Devlin et al., 2019), será também aplicada esta abordagem para a tarefa de reconhecimento de emoções para as duas línguas em questão, utilizando os mesmos conjuntos de dados das experiências anteriores. Enquanto a abordagem de Polignano et al. teve um melhor desempenho nas experiências que realizámos com dados em inglês, com diferenças de F1-score de 0.02, o melhor resultado obtido nas experiências com dados na língua portuguesa foi com o modelo BERT, obtendo um resultado máximo de F1-score de 0.6124.Automatic emotion recognition from text is a task that mobilizes the areas of natural language processing and affective computing counting with the special contribution of Cognitive Science subjects such as Artificial Intelligence and Computer Science, Linguistics and Psychology. It aims at the detection and interpretation of human emotions expressed in the written form by computational systems. The interaction of affective and cognitive processes, the essential role that emotions play in interpersonal interactions and the currently increasing use of written communication online make automatic emotion recognition progressively important, namely in areas such as mental healthcare, human-computer interaction, political science, or marketing. The English language has been the main target of studies in emotion recognition in text and the work developed for the Portuguese language is still scarce. Thus, there is a need to expand the work developed for English to Portuguese. The goal of this dissertation is to present and compare two distinct deep learning methods resulting from the advances in Artificial Intelligence to automatically detect and classify discrete emotional states in texts written in Portuguese. For this, the classification approach of Polignano et al. (2019) based on deep learning networks such as bidirectional Long Short-Term Memory and convolutional networks mediated by a self-attention level will be replicated for English and it will be reproduced for Portuguese. For English, the SemEval-2018 task 1 dataset (Mohammad et al., 2018) will be used, as in the original experience, and it considers four discrete emotions: anger, fear, joy, and sadness. For Portuguese, considering the lack of available emotionally annotated datasets, data will be collected from the social network Twitter using hashtags associated to a specific emotional content to determine the underlying emotion of the text from the same four emotions present in the English dataset. According to experiments carried out by Mohammad & Kiritchenko (2015), this method of data collection is consistent with the annotation of trained human judges. Considering the fast and continuous evolution of deep learning methods for natural language processing and the state-of-the-art results achieved by recent methods in tasks in this area such as the pre-trained language model BERT (Bidirectional Encoder Representations from Transformers) (Devlin et al., 2019), this approach will also be applied to the task of emotion recognition for both languages using the same datasets from the previous experiments. It is expected to draw conclusions about the adequacy of these two presented approaches in emotion recognition and to contribute to the state of the art in this task for the Portuguese language. While the approach of Polignano et al. had a better performance in the experiments with English data with a difference in F1 scores of 0.02, for Portuguese we obtained the best result with BERT having a maximum F1 score of 0.6124

    Similar works