Cargando…

Detection of emotion by text analysis using machine learning

Emotions are an integral part of human life. We know many different definitions of emotions. They are most often defined as a complex pattern of reactions, and they could be confused with feelings or moods. They are the way in which individuals cope with matters or situations that they find personal...

Descripción completa

Detalles Bibliográficos
Autores principales: Machová, Kristína, Szabóova, Martina, Paralič, Ján, Mičko, Ján
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Frontiers Media S.A. 2023
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10548207/
https://www.ncbi.nlm.nih.gov/pubmed/37799520
http://dx.doi.org/10.3389/fpsyg.2023.1190326
_version_ 1785115228000747520
author Machová, Kristína
Szabóova, Martina
Paralič, Ján
Mičko, Ján
author_facet Machová, Kristína
Szabóova, Martina
Paralič, Ján
Mičko, Ján
author_sort Machová, Kristína
collection PubMed
description Emotions are an integral part of human life. We know many different definitions of emotions. They are most often defined as a complex pattern of reactions, and they could be confused with feelings or moods. They are the way in which individuals cope with matters or situations that they find personally significant. Emotion can also be characterized as a conscious mental reaction (such as anger or fear) subjectively experienced as a strong feeling, usually directed at a specific object. Emotions can be communicated in different ways. Understanding the emotions conveyed in a text or speech of a human by a machine is one of the challenges in the field of human-machine interaction. The article proposes the artificial intelligence approach to automatically detect human emotions, enabling a machine (i.e., a chatbot) to accurately assess emotional state of a human and to adapt its communication accordingly. A complete automation of this process is still a problem. This gap can be filled with machine learning approaches based on automatic learning from experiences represented by the text data from conversations. We conducted experiments with a lexicon-based approach and classic methods of machine learning, appropriate for text processing, such as Naïve Bayes (NB), support vector machine (SVM) and with deep learning using neural networks (NN) to develop a model for detecting emotions in a text. We have compared these models’ effectiveness. The NN detection model performed particularly well in a multi-classification task involving six emotions from the text data. It achieved an F1-score = 0.95 for sadness, among other high scores for other emotions. We also verified the best model in use through a web application and in a Chatbot communication with a human. We created a web application based on our detection model that can analyze a text input by web user and detect emotions expressed in a text of a post or a comment. The model for emotions detection was used also to improve the communication of the Chatbot with a human since the Chatbot has the information about emotional state of a human during communication. Our research demonstrates the potential of machine learning approaches to detect emotions from a text and improve human-machine interaction. However, it is important to note that full automation of an emotion detection is still an open research question, and further work is needed to improve the accuracy and robustness of this system. The paper also offers the description of new aspects of automated detection of emotions from philosophy-psychological point of view.
format Online
Article
Text
id pubmed-10548207
institution National Center for Biotechnology Information
language English
publishDate 2023
publisher Frontiers Media S.A.
record_format MEDLINE/PubMed
spelling pubmed-105482072023-10-05 Detection of emotion by text analysis using machine learning Machová, Kristína Szabóova, Martina Paralič, Ján Mičko, Ján Front Psychol Psychology Emotions are an integral part of human life. We know many different definitions of emotions. They are most often defined as a complex pattern of reactions, and they could be confused with feelings or moods. They are the way in which individuals cope with matters or situations that they find personally significant. Emotion can also be characterized as a conscious mental reaction (such as anger or fear) subjectively experienced as a strong feeling, usually directed at a specific object. Emotions can be communicated in different ways. Understanding the emotions conveyed in a text or speech of a human by a machine is one of the challenges in the field of human-machine interaction. The article proposes the artificial intelligence approach to automatically detect human emotions, enabling a machine (i.e., a chatbot) to accurately assess emotional state of a human and to adapt its communication accordingly. A complete automation of this process is still a problem. This gap can be filled with machine learning approaches based on automatic learning from experiences represented by the text data from conversations. We conducted experiments with a lexicon-based approach and classic methods of machine learning, appropriate for text processing, such as Naïve Bayes (NB), support vector machine (SVM) and with deep learning using neural networks (NN) to develop a model for detecting emotions in a text. We have compared these models’ effectiveness. The NN detection model performed particularly well in a multi-classification task involving six emotions from the text data. It achieved an F1-score = 0.95 for sadness, among other high scores for other emotions. We also verified the best model in use through a web application and in a Chatbot communication with a human. We created a web application based on our detection model that can analyze a text input by web user and detect emotions expressed in a text of a post or a comment. The model for emotions detection was used also to improve the communication of the Chatbot with a human since the Chatbot has the information about emotional state of a human during communication. Our research demonstrates the potential of machine learning approaches to detect emotions from a text and improve human-machine interaction. However, it is important to note that full automation of an emotion detection is still an open research question, and further work is needed to improve the accuracy and robustness of this system. The paper also offers the description of new aspects of automated detection of emotions from philosophy-psychological point of view. Frontiers Media S.A. 2023-09-20 /pmc/articles/PMC10548207/ /pubmed/37799520 http://dx.doi.org/10.3389/fpsyg.2023.1190326 Text en Copyright © 2023 Machová, Szabóova, Paralič and Mičko. https://creativecommons.org/licenses/by/4.0/This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
spellingShingle Psychology
Machová, Kristína
Szabóova, Martina
Paralič, Ján
Mičko, Ján
Detection of emotion by text analysis using machine learning
title Detection of emotion by text analysis using machine learning
title_full Detection of emotion by text analysis using machine learning
title_fullStr Detection of emotion by text analysis using machine learning
title_full_unstemmed Detection of emotion by text analysis using machine learning
title_short Detection of emotion by text analysis using machine learning
title_sort detection of emotion by text analysis using machine learning
topic Psychology
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10548207/
https://www.ncbi.nlm.nih.gov/pubmed/37799520
http://dx.doi.org/10.3389/fpsyg.2023.1190326
work_keys_str_mv AT machovakristina detectionofemotionbytextanalysisusingmachinelearning
AT szaboovamartina detectionofemotionbytextanalysisusingmachinelearning
AT paralicjan detectionofemotionbytextanalysisusingmachinelearning
AT mickojan detectionofemotionbytextanalysisusingmachinelearning