Abstract
Emotion detection in textual data plays an important role in various NLP applications and is an important branch of sentiment analysis. There is a dearth of applications of emotion detection in low resource languages such as Hindi. There are a number of challenges in the available open-source resources in Hindi language such as imbalanced datasets and lack of understanding of textual nuances specific to Hindi. This paper presents a comprehensive study on emotion detection in Hindi text using Large Language Models (LLMs). We will be leveraging GPT-3.5-turbo API for dataset augmentation using few-shot learning and zero-shot learning techniques and further fine-tuning pretrained BERT and mBERT models. This study’s key findings include generating two balanced datasets to establish baselines, fine-tuning models for emotion detection and evaluating their performance. There is a significant improvement in Accuracy and F1-score, demonstrating the effectiveness of the approach employed. We further discuss the future directions for research including multimodal emotion detection and cross lingual applications along with ethical considerations in deploying emotion detection systems. This research contributes to advancing the understanding and applications of emotion detection in Hindi text such as customer feedback assessment, social media sentiment analysis, mental health evaluation and human-computer interaction (HCI) via virtual assistants like Alexa and Siri.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Ahmad, Z., Jindal, R., Ekbal, A., Bhattachharyya, P.: Borrow from rich cousin: transfer learning for emotion detection using cross lingual embedding. Expert Syst. Appl. 139, 112851 (2020)
Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: pre-training of deep bidirectional transformers for language understanding (2018). arXiv preprint arXiv:1810.04805
Devlin, J.: Bert/multilingual at google-research/bert. GitHub (2019). https://github.com/google-research/bert/blob/master/multilingual.md. Accessed 1 Mar 2024
Dyvik, E.H. 2023. The most spoken languages worldwide 2023. Statista. [Online]. Available at: https://www.statista.com/statistics/266808/the-most-spoken-languages-worldwide/. Accessed 1 Mar 2024
Ekbal, A., Bhattacharyya, P., Saha, T., Kumar, A., Srivastava, S.: HindiMD: a multi-domain corpora for low-resource sentiment analysis. In: Proceedings of the Thirteenth Language Resources and Evaluation Conference, pp. 7061–7070 (2022)
Garg, K., Lobiyal, D.K.: Hindi EmotionNet: a scalable emotion lexicon for sentiment classification of Hindi text. ACM Trans. Asian Low-Resource Lang. Inf. Process. (TALLIP) 19(4), 1–35 (2020)
Harikrishna, D.M., Rao, K.S.: Emotion-specific features for classifying emotions in story text. In: 2016 Twenty Second National Conference on Communication (NCC), pp. 1–4. IEEE (2016)
Hugging Face. 2024. google-bert/bert-base-multilingual-cased. https://huggingface.co/google-bert/bert-base-multilingual-cased. Accessed 1 Mar 2024
Hugging Face. 2024. google-bert/bert-base-uncased. https://huggingface.co/google-bert/bert-base-uncased. Accessed 1 Mar 2024
Kemp, S.: Digital 2023: India (2023). https://datareportal.com/reports/digital-2023-india. Accessed 1 Mar 2024
Kumar, Y., Mahata, D., Aggarwal, S., Chugh, A., Maheshwari, R., Shah, R.R.: Bhaav-a text corpus for emotion analysis from Hindi stories (2019). arXiv preprint arXiv:1910.04073
Kumar, T., Mahrishi, M., Sharma, G.: Emotion recognition in Hindi text using multilingual BERT transformer. Multimed. Tools Appl.1–22 (2023)
Nandwani, P., Verma, R.: A review on sentiment analysis and emotion detection from text. Soc. Netw. Anal. Min. 11(1), 81 (2021)
OpenAI. 2024. Text Generation. OpenAI Platform Documentation. https://platform.openai.com/docs/guides/text-generation. Accessed 1 Mar 2024
Paszke, A., et al.: Pytorch: an imperative style, high-performance deep learning library. Adv. Neural Inf. Process. Syst. 32 (2019)
Phani, S., Lahiri, S., Biswas, A.: Sentiment analysis of tweets in three Indian languages. In: Proceedings of the 6th Workshop on South and Southeast Asian Natural Language Processing (WSSANLP2016), pp. 93–102 (2016)
Sahu, G., Rodriguez, P., Laradji, I.H., Atighehchian, P., Vazquez, D., Bahdanau, D.: Data augmentation for intent classification with off-the-shelf large language models, 2022. arXiv preprint arXiv:2204.01959
Sasidhar, T.T., Premjith, B., Soman, K.P.: Emotion detection in Hinglish (Hindi+ English) code-mixed social media text. Procedia Comput. Sci. 171, 1346–1352 (2020)
Singh, G.V., Priya, P., Firdaus, M., Ekbal, A., Bhattacharyya, P.: EmoInHindi: a multi-label emotion and intensity annotated dataset in Hindi for emotion recognition in dialogues (2022). arXiv preprint arXiv:2205.13908
Venkatakrishnan, R., Goodarzi, M., Canbaz, M.A.: Exploring large language models’ emotion detection abilities: use cases from the middle east. In: 2023 IEEE Conference on Artificial Intelligence (CAI), pp. 241–24. IEEE (2023)
Wang, Y., Yao, Q., Kwok, J.T., Ni, L.M.: Generalizing from a few examples: a survey on few-shot learning. ACM Comput. Surv. (CSUR) 53(3), 1–34 (2020)
Wikipedia contributors. 2024. Hindi. Wikipedia. https://en.wikipedia.org/wiki/Hindi. Accessed 1 Mar 2024
Wolf, T., et al.: Huggingface’s transformers: State-of-the-art natural language processing, 2019. arXiv preprint arXiv:1910.03771
Wong, B.: Top Social Media Statistics And Trends. Forbes (2024). https://www.forbes.com/advisor/in/business/social-media-statistics/. Accessed 1 Mar 2024
Worlddata.info. 2024. Hindi speaking countries. https://www.worlddata.info/languages/hindi.php. Accessed 1 Mar 2024
Yoo, K.M., Park, D., Kang, J., Lee, S.W., Park, W.: GPT3Mix: leveraging large-scale language models for text augmentation (2021). arXiv preprint arXiv:2104.08826
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Agarwal, R., Abbas, N. (2025). Emotion Detection in Hindi Language Using GPT and BERT. In: Bramer, M., Stahl, F. (eds) Artificial Intelligence XLI. SGAI 2024. Lecture Notes in Computer Science(), vol 15447. Springer, Cham. https://doi.org/10.1007/978-3-031-77918-3_8
Download citation
DOI: https://doi.org/10.1007/978-3-031-77918-3_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-77917-6
Online ISBN: 978-3-031-77918-3
eBook Packages: Computer ScienceComputer Science (R0)