Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: Journal of Medical Internet Research

Date Submitted: Jul 28, 2022
Date Accepted: Nov 15, 2022
Date Submitted to PubMed: Nov 23, 2022

The final, peer-reviewed published version of this preprint can be found here:

Sentiment Analysis of Insomnia-Related Tweets via a Combination of Transformers Using Dempster-Shafer Theory: Pre– and Peri–COVID-19 Pandemic Retrospective Study

Maghsoudi A, Nowakowski S, Agrawal R, Sharafkhaneh A, Kunik ME, Naik AD, Xu H, Razjouyan J

Sentiment Analysis of Insomnia-Related Tweets via a Combination of Transformers Using Dempster-Shafer Theory: Pre– and Peri–COVID-19 Pandemic Retrospective Study

J Med Internet Res 2022;24(12):e41517

DOI: 10.2196/41517

PMID: 36417585

PMCID: 9822178

Sentiment Analysis of Insomnia-Related Tweets via Combination of Transformers Using Dempster-Shafer Theory: A Pre-Peri COVID-19 Pandemic Retrospective Study

  • Arash Maghsoudi; 
  • Sara Nowakowski; 
  • Ritwick Agrawal; 
  • Amir Sharafkhaneh; 
  • Mark E. Kunik; 
  • Aanand D. Naik; 
  • Hua Xu; 
  • Javad Razjouyan

ABSTRACT

Background:

The COVID-19 pandemic has imposed additional stress on population health that may result in a change of sleeping behavior.

Objective:

: In this study, we hypothesized that using natural language processing (NLP) to explore social media would help to assess the mental health condition of people experiencing insomnia after the outbreak of COVID-19.

Methods:

We designed a retrospective study using public social media content from Twitter. We categorized insomnia-related tweets based on time into two intervals: pre-pandemic (01/01/2019 to 01/01/2020) and peri-pandemic (01/01/2020 to 01/01/2021). We performed sentiment analysis using pretrained transformers in conjunction with Dempster-Shafer theory (DST) to classify the polarity of emotions into positive, negative, and neutral. We validated the proposed pipeline on 300 annotated tweets. Additionally, we performed temporal analysis to examine the effect of time on the users’ insomnia experience, using logistic regression.

Results:

We extracted 305,321 tweets containing the word insomnia (pre-pandemic, 139,561 and peri-pandemic, 165,760). The best combination of pretrained transformers via DST yielded 84% accuracy. Next, using this pipeline, we found that the odds of negative tweets (OR, 1.39; 95% CI, 1.37-1.41, P<.001) were higher peri-pandemic compared to pre-pandemic. The likelihood of negative tweets after midnight was 21% higher than before midnight (OR, 1.21; 95%CI: 1.19-1.23, P<.001). Peri-pandemic, while the odds of negative tweets were 2% higher after midnight compared to before midnight (OR, 1.02; 95%CI: 1.00-1.07, P = .008), they were 43% higher (OR, 1.43; 95%CI: 1.40-1.46, P<.001) peri-pandemic.

Conclusions:

The proposed novel sentiment analysis pipeline that combines pretrained transformers by DST is capable of classifying the emotion or sentiment of insomnia-related tweets. Twitter users shared more negative tweets about insomnia peri-pandemic than pre-pandemic. Future studies using a natural language processing framework could assess tweets about other psychological distress, habit changes, weight gain due to inactivity, and the effect of viral infection on sleep.


 Citation

Please cite as:

Maghsoudi A, Nowakowski S, Agrawal R, Sharafkhaneh A, Kunik ME, Naik AD, Xu H, Razjouyan J

Sentiment Analysis of Insomnia-Related Tweets via a Combination of Transformers Using Dempster-Shafer Theory: Pre– and Peri–COVID-19 Pandemic Retrospective Study

J Med Internet Res 2022;24(12):e41517

DOI: 10.2196/41517

PMID: 36417585

PMCID: 9822178

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.