Mathematics (Jun 2024)

Mental-Health: An NLP-Based System for Detecting Depression Levels through User Comments on Twitter (X)

  • Rafael Salas-Zárate,
  • Giner Alor-Hernández,
  • Mario Andrés Paredes-Valverde,
  • María del Pilar Salas-Zárate,
  • Maritza Bustos-López,
  • José Luis Sánchez-Cervantes

DOI
https://doi.org/10.3390/math12131926
Journal volume & issue
Vol. 12, no. 13
p. 1926

Abstract

Read online

The early detection of depression in a person is of great help to medical specialists since it allows for better treatment of the condition. Social networks are a promising data source for identifying individuals who are at risk for this mental disease, facilitating timely intervention and thereby improving public health. In this frame of reference, we propose an NLP-based system called Mental-Health for detecting users’ depression levels through comments on X. Mental-Health is supported by a model comprising four stages: data extraction, preprocessing, emotion detection, and depression diagnosis. Using a natural language processing tool, the system correlates emotions detected in users’ posts on X with the symptoms of depression and provides specialists with the depression levels of the patients. By using Mental-Health, we described a case study involving real patients, and the evaluation process was carried out by comparing the results obtained using Mental-Health with those obtained through the application of the PHQ-9 questionnaire. The system identifies moderately severe and moderate depression levels with good precision and recall, allowing us to infer the model’s good performance and confirm that it is a promising option for mental health support.

Keywords