Mining Twitter Data for Signs of Depression in Brazil

  • Otto von Sperling Universidade de Brasília
  • Marcelo Ladeira Universidade de Brasília


The literature on computerized models that help detect, study and understand signs of mental health disor- ders from social media has been thriving since the mid-2000s for English speakers. In Brazil, this area of research shows promising results, in addition to a variety of niches that still need exploring. Thus, we construct a large corpus from 2941 users (1486 depressive, 1455 non-depressive), and induce machine learning models to identify signs of depression from our Twitter corpus. In order to achieve our goal, we extract features by measuring linguistic style, behavioral patterns, and affect from users’ public tweets and metadata. Resulting models successfully distinguish between depressive and non-depressive classes with performance scores comparable to results in the literature. We hope that our findings can become stepping stones towards more methodologies being applied at the service of mental health.

Palavras-chave: data mining, machine learning, mental health, twitter


American Psychiatric Association. pp. 0–942. In , Diagnostic and Statistical Manual of Mental Disorders, Fourth
Edition: DSM-IV-TR. American Psychiatric Association, Michigan, USA, pp. 0–942, 2000.

Beck, A. T., Beck, R. A., and Brown, G. K. Manual for the beck depression inventory-ii. Psychological Corporation
78 (2): 490–498, 1996.

Bollen, J., Mao, H., and Pepe, A. Modeling public mood and emotion: Twitter sentiment and socio-economic
phenomena. In Fifth International AAAI Conference on Weblogs and Social Media. Vol. 2011. AAAI Conference,
Palo Alto, USA, pp. 450–453, 2011.

Bradley, M. M. and Lang, P. J. Affective norms for english words (ANEW): Instruction manual and affective
ratings. The Center for Research in psychophysiology 30 (1): 25–36, 1999.

Burcusa, S. L. and Iacono, W. G. Risk for recurrence in depression. Clinical psychology review 27 (8): 959–985,

Coppersmith, G., Dredze, M., and Harman, C. Quantifying mental health signals in twitter. In Proceedings of the
workshop on computational linguistics and clinical psychology: From linguistic signal to clinical reality. Association for Computational Linguistics, Baltimore, USA, pp. 51–60, 2014.

De Choudhury, M., Gamon, M., Counts, S., and Horvitz, E. Predicting depression via social media. In Seventh
international AAAI conference on weblogs and social media. AAAI conference on weblogs and social media,
Cambridge, USA, pp. 0–10, 2013.

Jansson-Fröjmark, M. and Lindblom, K. A bidirectional relationship between anxiety and depression, and insomnia? a prospective study in the general population. Journal of Psychosomatic Research 64 (4): 443 – 449, 2008.

Kristensen, C. H., de Azevedo Gomes, C. F., Justo, A. R., and Vieira, K. Brazilian norms for the affective
norms for english words. Trends in Psychiatry and Psychotherapy 33 (3): 135–146, 2011.

Moreno, M. A., Jelenchick, L. A., Egan, K. G., Cox, E., Young, H., Gannon, K. E., and Becker, T.
Feeling bad on facebook: Depression disclosures by college students on a social networking site. Depression and
anxiety 28 (6): 447–455, 2011.

Nascimento, R. S., Parreira, P., Santos, G. N., and Guedes, G. P. Identifying signs of depressive behaviour
on social media (identificando sinais de comportamento depressivo em redes sociais). In 7o Brazilian Workshop on Social Network Analysis and Mining (BraSNAM 2018). SBC, Porto Alegre, Brazil, pp. 0–6, 2018.

Park, M., Cha, C., and Cha, M. Depressive moods of users portrayed in twitter. In Proceedings of the ACM
SIGKDD Workshop on healthcare informatics (HI-KDD). Vol. 2012. ACM SIGKDD, Philadelphia, USA, pp. 1–8,

Pennebaker, J. W., Mehl, M. R., and Niederhoffer, K. G. Psychological aspects of natural language use: Our
words, our selves. Annual review of psychology 54 (1): 547–577, 2003.

Rabkin, J. G. and Struening, E. L. Life events, stress, and illness. Science 194 (4269): 1013–1020, 1976.

Radloff, L. S. The CES-D scale: A self-report depression scale for research in the general population. Applied
psychological measurement 1 (3): 385–401, 1977.

Reece, A. G., Reagan, A. J., Lix, K. L., Dodds, P. S., Danforth, C. M., and Langer, E. J. Forecasting the
onset and course of mental illness with twitter data. Scientific reports 7 (1): 13006, 2017.

Rude, S., Gortner, E.-M., and Pennebaker, J. W. Language use of depressed and depression-vulnerable college
students. Cognition & Emotion 18 (8): 1121–1133, 2004.

Sartorius, N., Üstün, T. B., Lecrubier, Y., and Wittchen, H.-U. Depression comorbid with anxiety: results
from the WHO study on psychological disorders in primary health care. The British journal of psychiatry 168 (S30): 38–43, 1996.

Williams, K. L. and Galliher, R. Predicting depression and self-esteem from social connectedness, support, and
competence. Journal of Social and Clinical Psychology - J SOC CLIN PSYCHOL 25 (8): 855–874, 10, 2006.

World Health Organization. Depression and other common mental disorders: Global health estimates., 2017.
Como Citar

Selecione um Formato
VON SPERLING, Otto; LADEIRA, Marcelo. Mining Twitter Data for Signs of Depression in Brazil. In: SYMPOSIUM ON KNOWLEDGE DISCOVERY, MINING AND LEARNING (KDMILE) , 2019, Fortaleza. Anais do VII Symposium on Knowledge Discovery, Mining and Learning. Porto Alegre: Sociedade Brasileira de Computação, nov. 2019 . p. 25-32. DOI: