Skip to main content

Emotional Evaluation of Open-Ended Responses with Transformer Models

  • Conference paper
  • First Online:
Good Practices and New Perspectives in Information Systems and Technologies (WorldCIST 2024)

Abstract

This work applies Natural Language Processing (NLP) techniques, specifically transformer models, for the emotional evaluation of open-ended responses. Today’s powerful advances in transformer architecture, such as ChatGPT, make it possible to capture complex emotional patterns in language. The proposed transformer-based system identifies the emotional features of various texts. The research employs an innovative approach, using prompt engineering and existing context, to enhance the emotional expressiveness of the model. It also investigates spaCy’s capabilities for linguistic analysis and the synergy between transformer models and this technology. The results show a significant improvement in emotional detection compared to traditional methods and tools, highlighting the potential of transformer models in this domain. The method can be implemented in various areas, such as emotional research or mental health monitoring, creating a much richer and complete user profile.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Available at https://openai.com, reviewed in January 2024.

  2. 2.

    Available at https://ai.google, reviewed in January 2024.

  3. 3.

    Available at https://www.anthropic.com/, reviewed in January 2024.

  4. 4.

    Available at https://www.anthropic.com/index/introducing-claude, reviewed in January 2024.

  5. 5.

    Available at https://inflection.ai/about, reviewed in January 2024.

  6. 6.

    Available at https://lmsys.org/blog/2023-03-30-vicuna/, reviewed in January 2024.

  7. 7.

    A conversation comprises one or more interspersed interactions between speakers.

  8. 8.

    Available at https://www.json.org/json-en.html, reviewed in January 2024.

  9. 9.

    Word used to designate a set of input characters submitted to the model.

  10. 10.

    Available at https://spacy.io, reviewed in January 2024.

  11. 11.

    Available at https://spacy.io/universe/project/spacy-textblob reviewed in January 2024.

  12. 12.

    Available at https://textblob.readthedocs.io/en/dev/, reviewed in January 2024.

  13. 13.

    Available at https://www.kaggle.com/datasets/projjal1/human-conversation-training-data, reviewed in January 2024.

  14. 14.

    Available at https://www.kaggle.com/datasets/miguelcorraljr/ted-ultimate-dataset, reviewed in January 2024.

  15. 15.

    Available at https://huggingface.co/datasets/hita/social-behavior-emotions, reviewed in January 2024.

  16. 16.

    The model hyperparameters were set to temperature=0.0, \({\small {\texttt {top}}}\_{\small {\texttt {p=1.0}}}\) (default value), \(\small {\texttt {frequency}}\_\small {\texttt {penalty=0.0}}\) (default value), \(\small {\texttt {presence}}\_\small {\texttt {penalty=0.0}}\) (default value) and \(\small {\texttt {stop}}\_\small {\texttt {sequence=None}}\) (default value).

References

  1. Al-Omari, H., Abdullah, M.A., Shaikh, S.: EmoDet2: emotion detection in English textual dialogue using BERT and BILSTM models. In: 2020 11th International Conference on Information and Communication Systems (ICICS), pp. 226–232. IEEE (2020)

    Google Scholar 

  2. Brown, T., et al.: Language models are few-shot learners. In: Advances in Neural Information Processing Systems. vol. 33, pp. 1877–1901. Curran Associates, Inc. (2020)

    Google Scholar 

  3. Dale, R.: GPT-3: what’s it good for? Nat. Lang. Eng. 27(1), 113–118 (2021)

    Article  Google Scholar 

  4. Hartmann, J., Netzer, O.: Natural language processing in marketing. In: Artificial Intelligence in Marketing, vol. 20, pp. 191–215. Emerald Publishing Limited (2023)

    Google Scholar 

  5. Kai, W., Lingyu, Z.: Research on text summary generation based on bidirectional encoder representation from transformers. In: 2020 2nd International Conference on Information Technology and Computer Application (ITCA), pp. 317–321 (2020)

    Google Scholar 

  6. Khurana, D., Koli, A., Khatter, K., Singh, S.: Natural language processing: state of the art, current trends and challenges. Multimedia Tools Appl. 82(3), 3713–3744 (2023)

    Article  Google Scholar 

  7. Liu, Y., et al.: A survey of visual transformers. IEEE Trans. Neural Netw. Learn. Syst., 1–21 (2023)

    Google Scholar 

  8. Mann, P., Matsushima, E.H., Paes, A.: Detecting depression from social media data as a multiple-instance learning task. In: 2022 10th International Conference on Affective Computing and Intelligent Interaction (ACII), pp. 1–8 (2022)

    Google Scholar 

  9. Mao, R., Liu, Q., He, K., Li, W., Cambria, E.: The biases of pre-trained language models: an empirical study on prompt-based sentiment analysis and emotion detection. IEEE Trans. Affect. Comput. 14(3), 1743–1753 (2023)

    Article  Google Scholar 

  10. Masuda, K., Matsuzaki, T., Tsujii, J.: Semantic search based on the online integration of NLP techniques. Procedia Soc. Behav. Sci. 27, 281–290 (2011). Computational Linguistics and Related Fields

    Google Scholar 

  11. Peng, S.: A survey on deep learning for textual emotion analysis in social networks. Digit. Commun. Netw. 8(5), 745–762 (2022)

    Article  Google Scholar 

  12. Shen, J.T., et al.: MathBERT: a pre-trained language model for general NLP tasks in mathematics education (2023)

    Google Scholar 

  13. Sun, Z., Wang, M., Li, L.: Multilingual Translation via Grafting Pre-trained Language Models (2021)

    Google Scholar 

  14. Taboada, M., Brooke, J., Tofiloski, M., Voll, K., Stede, M.: Lexicon-based methods for sentiment analysis. Comput. Linguist. 37(2), 267–307 (2011)

    Article  Google Scholar 

  15. Touvron, H., et al.: LLaMA: open and efficient foundation language models (2023)

    Google Scholar 

  16. Tracy, J.L., Randles, D.: Four models of basic emotions: a review of Ekman and Cordaro, Izard, Levenson, and Panksepp and Watt. Emot. Rev. 3(4), 397–405 (2011)

    Article  Google Scholar 

  17. Wang, C., Chen, Y., Zhang, S., Zhang, Q.: Stock market index prediction using deep transformer model. Expert Syst. Appl. 208, 118128 (2022)

    Article  Google Scholar 

  18. Wehrmann, J., Becker, W., Cagnini, H.E.L., Barros, R.C.: A character-based convolutional neural network for language-agnostic twitter sentiment analysis. In: 2017 International Joint Conference on Neural Networks (IJCNN), pp. 2384–2391 (2017)

    Google Scholar 

  19. Wongkar, M., Angdresey, A.: Sentiment analysis using Naive Bayes algorithm of the data crawler: Twitter. In: 2019 Fourth International Conference on Informatics and Computing (ICIC), pp. 1–5 (2019)

    Google Scholar 

  20. Zainuddin, N., Selamat, A.: Sentiment analysis using Support Vector Machine. In: 2014 International Conference on Computer, Communications, and Control Technology (I4CT), pp. 333–337 (2014)

    Google Scholar 

  21. Zhou, Y., Kang, X., Ren, F.: Prompt consistency for multi-label textual emotion detection. IEEE Trans. Affect. Comput. 15, 1–10 (2023)

    Google Scholar 

Download references

Acknowledgement

This work was partially supported by: (i) Xunta de Galicia grants ED481B-2021-118 and ED481B-2022-093, Spain; and (ii) Portuguese national funds through FCT – Fundação para a Ciência e a Tecnologia (Portuguese Foundation for Science and Technology) – as part of project UIDB/50014/2020 (DOI: 10.54499/UIDP/50014/2020 | https://doi.org/10.54499/UIDP/50014/2020).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Benedita Malheiro .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Pajón-Sanmartín, A., de Arriba-Pérez, F., García-Méndez, S., Burguillo, J.C., Leal, F., Malheiro, B. (2024). Emotional Evaluation of Open-Ended Responses with Transformer Models. In: Rocha, Á., Adeli, H., Dzemyda, G., Moreira, F., Poniszewska-Marańda, A. (eds) Good Practices and New Perspectives in Information Systems and Technologies. WorldCIST 2024. Lecture Notes in Networks and Systems, vol 985. Springer, Cham. https://doi.org/10.1007/978-3-031-60215-3_3

Download citation

Publish with us

Policies and ethics