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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

MoodyAI: Text-based mood detection using NLP and LSTM for mental health awareness

Reina Setiawan, Reinert Yosua Rumagit, Finley Eiwan Franklin Zaluchu, Valentius Ryan Lukito
Procedia Computer Science
Mental Health via Writing
article

MoodyAI: Text-based mood detection using NLP and LSTM for mental health awareness

Reina Setiawan, Reinert Yosua Rumagit, Finley Eiwan Franklin Zaluchu, Valentius Ryan Lukito
article en

Abstract

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.

Procedia Computer ScienceVol. 269
Binus University (ID)
Openalex Percentile: Top 62%
Mental Health via Writing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

MoodyAI: Text-based mood detection using NLP and LSTM for mental health awareness — Reina Setiawan, Reinert Yosua Rumagit, et al. · Procedia Computer Science (2025) | TGRS Research Map | TGRS