Real-time NLP-based stress detection in social media for digital mental health intervention - Nazri, Nur Alya Batrisyia; Zulkurnain, Nurul Fariza; Gunawan, Teddy Surya; Zainuddin, Norafiza; Kartiwi, Mira; Md Yusoff, Nelidya (IEEE, 2025)
This study presents an NLP-based machine learning system for detecting stress in social media posts, enabling timely digital mental health intervention. A dataset of 45,792 posts from Reddit and Twitter was compiled, cleaned, tokenised, lemmatised, and balanced using Random Oversampling, with sentiment features extracted via VADER. TF-IDF and sentiment scores were used to train four classifiers—Logistic Regression, LinearSVC, Random Forest, and XGBoost—evaluated on accuracy, precision, recall, F1-score, and inference time. LinearSVC achieved the highest F1-score (0.898) and fastest GUI inference (2.44 s), demonstrating strong performance and sensitivity to subtle stress cues. A Gradio-based GUI enables instant, accessible predictions, validating the system’s practicality. The results confirm the feasibility of combining linguistic and sentiment analysis for scalable, real-time stress detection, laying a foundation for future integration with cyberincivility monitoring in digital health tools.