MoodyAI: Text-based mood detection using NLP and LSTM for mental health awareness
Mental health has become a global concern, especially with the rising incidence of emotional health disorders due to various social and psychological factors. This study aims to design and develop an artificial intelligence (AI) model based on Natural Language Processing (NLP) and Long Short-Term Memory (LSTM) to help detect users’ moods from textual input. The model is trained on a dataset comprising 400,000 Twitter comments, classifying emotions into four main categories: angry, fear, sad, and happy. The data processing stages include text cleaning, tokenization, padding, and label encoding before being fed into an architecture consisting of an embedding layer, two LSTM layers, and a dense layer with SoftMax activation. Evaluation results demonstrate an accuracy of 97.16%, indicating that the model can accurately detect and classify users’ moods. The primary challenge encountered is the limited diversity in the dataset, which affects the model’s generalizability. Future development is expected to involve expanding the dataset and integrating the model into an interactive chatbot to support early detection and management of mental health issues.
Authors
- Reina Setiawan (ORCID: https://orcid.org/0000-0002-2123-1460)
- Reinert Yosua Rumagit (ORCID: https://orcid.org/0000-0003-0603-7958)
- Finley Eiwan Franklin Zaluchu
- Valentius Ryan Lukito
Institutions
- Binus University (ID)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1016/j.procs.2025.09.074
- Primary Topic
- Mental Health via Writing
- Type
- article
- Field-Weighted Citation Impact
- 0.00