Sign inSubmit
computersciencejournal.org is not ours. This journal is published only at thescipub.com/jcs. Report a suspicious emailcomputersciencejournal.org is not ours · Report
ArticleMetrics
Research Article · Open access · Published 11 February 2026

Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers Model

Andika Dwi Asmoro Wicaksono1 & Rojali1

Journal of Computer Science, Volume 22, Issue 1, pp. 244–259 · doi.org/10.3844/jcssp.2026.244.259

1,851 accesses983 downloads0 citations (Crossref)Metrics
Cite Check for updates

Abstract

The increasing use of social media has enabled large-scale analysis of user-generated content to monitor mental health trends. This study focuses on sentiment prediction of mental health-related posts on platform X using transformer-based models, specifically IndoBERT, DistilBERT, and IndoRoBERTa. The goal is to evaluate the effectiveness of these models in classifying social media posts into positive, negative, and neutral sentiment categories. The research involves data preprocessing, feature extraction using contextual embedding, and sentiment classification. IndoBERT, as a full-sized transformer model, provides high accuracy but requires significant computational resources. DistilBERT, a lightweight version of BERT, offers a more efficient alternative while maintaining competitive performance. Meanwhile, IndoRoBERTa, an optimized variation of RoBERTa for the Indonesian language, enhances contextual understanding for improved classification. The experimental results demonstrate that IndoRoBERTa achieves the highest accuracy at 95.00%, outperforming IndoBERT (93.50%) and DistilBERT (91.67%), while DistilBERT provides a faster inference time with only a slight reduction in performance. These findings suggest that transformer-based models can effectively analyze sentiment in mental health-related social media posts, offering insights into emotional patterns that could support early mental health monitoring.

Licence and reuse

Open access. This article is licensed under a Creative Commons Attribution 4.0 International Licence (CC BY 4.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.

How to reuse this article

Responses (0)

Have a comment on this research? Sign in to respond. Responses are moderated and published with your name and affiliation; the authors are invited to reply. How we use your dataWrite a response

About this article

Cite this article

Wicaksono, A. D. A. & Rojali, . (2026). Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers Model. Journal of Computer Science, 22(1), 244–259. https://doi.org/10.3844/jcssp.2026.244.259

Licence
CC BY 4.0
Issue
Volume 22, Issue 1
Policies
Editorial independenceUse of generative AIData availabilityAppeals and complaints
Version
Version of record
Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers ModelJournal of Computer Science · Volume 22, Issue 1 · pp. 244–259 · CC BY 4.0Download