This article proposes an automated approach, based on artificial intelligence techniques, for detecting indicators of depression in texts written in Spanish. Among the main contributions is the construction of a new specialized corpus, supervised by mental health professionals and based on the Beck Depression Inventory. Text processing included linguistic techniques such as lemmatization, stopword removal, and structural transformation using trigrams. As part of the work, SpADE-BERT was designed, a model based on multilingual BERT with a tokenization scheme adapted to incorporate trigrams directly from the input phase. This modification allowed for more robust interaction between the local context and semantic representations. SpADE-BERT was evaluated against multiple approaches reported in the literature, which employ algorithms such as logistic regression, support vector machines, decision trees, and Random Forest with advanced configurations and specialized preprocessing. In all cases, our model showed consistently superior performance on metrics such as precision, recall, and F1-score. The results show that integrating deep language models with adapted tokenization strategies can significantly strengthen the automated identification of linguistic signals associated with depression in Spanish texts.
Reyes-Vera et al. (Sun,) studied this question.