Skip to main content


Front. Psychol., 03 September 2021
Sec. Positive Psychology
This article is part of the Research Topic Well-being and Work Motivation brought by Technological Changes, Coping and Adaptations During and Post COVID-19 Pandemic: Barriers and Opportunities View all 15 articles

Identifying Silver Linings During the Pandemic Through Natural Language Processing

\nJuan Antonio Lossio-Ventura,&#x;Juan Antonio Lossio-Ventura1,2Angela Yuson Lee&#x;Angela Yuson Lee3Jeffrey T. HancockJeffrey T. Hancock3Natalia LinosNatalia Linos4Eleni Linos
Eleni Linos1*
  • 1Department of Dermatology, Stanford University, Stanford, CA, United States
  • 2Machine Learning Team, National Institute of Mental Health, National Institutes of Health, Bethesda, MD, United States
  • 3Department of Communication, Stanford University, Stanford, CA, United States
  • 4FXB Center for Health and Human Rights, Harvard University, Cambridge, MA, United States

COVID-19 has presented an unprecedented challenge to human welfare. Indeed, we have witnessed people experiencing a rise of depression, acute stress disorder, and worsening levels of subclinical psychological distress. Finding ways to support individuals' mental health has been particularly difficult during this pandemic. An opportunity for intervention to protect individuals' health & well-being is to identify the existing sources of consolation and hope that have helped people persevere through the early days of the pandemic. In this paper, we identified positive aspects, or “silver linings,” that people experienced during the COVID-19 crisis using computational natural language processing methods and qualitative thematic content analysis. These silver linings revealed sources of strength that included finding a sense of community, closeness, gratitude, and a belief that the pandemic may spur positive social change. People's abilities to engage in benefit-finding and leverage protective factors can be bolstered and reinforced by public health policy to improve society's resilience to the distress of this pandemic and potential future health crises.


The COVID-19 pandemic has presented an unprecedented challenge to human welfare. Despite rising numbers of vaccinations, cases continue to surge in many parts of the world causing both our healthcare systems and our collective well-being to be stretched to their limits (Nelson et al., 2020). In the face of this tragedy, individuals have had to confront profound grief, loss, and uncertainty about the future that can severely impact their mental health (Mumphrey and Kelleher, 2020).

The challenges of coping with a global pandemic can be seen in the rise of depression, acute stress disorder, anxiety disorders, and worsening levels of subclinical psychological distress, all of which have substantially increased in prevalence since the pandemic's onset (Brooks et al., 2020; Burhamah et al., 2020; Czeisler et al., 2020; Huang and Zhao, 2020). In response, public health organizations like the World Health Organization have highlighted the need to provide psychosocial support to individuals struggling with their mental health during and in the aftermath of the pandemic (World Health Organization, 2020).

Finding ways to support individuals' mental health may be particularly difficult during a pandemic, when many conventional methods of support such as peer-to-peer interaction, social belonging, and community activities may no longer be safe or accessible (Campion et al., 2020). Furthermore, coping mechanisms such as short-term problem-solving or emotion management may be insufficient for meeting the needs of the moment. As a result, solutions are needed that can mitigate threats to mental health by building on existing protective factors and encouraging positive coping strategies, without requiring activities that may run counter to COVID-19 prevention measures.

One opportunity for intervention to protect individuals' health and well-being is to identify the existing sources of strength and hope that have helped people persevere through the pandemic, so that public health policy and messaging can fortify these strengths. Colloquially known as “silver linings,” the act of finding positive ways that one's life has changed as a result of a traumatic or stressful event is known as benefit-finding in the study of resilience (Folkman and Moskowitz, 2007). This is a particular form of meaning-focused coping that helps people process difficult situations by changing how they make sense of the situation in their own lives or in the world around them (Folkman, 2008).

The protective effects of benefit-finding have largely been found in the context of bereavement after losing loved ones, anxiety about health threats, and surviving natural disasters—all of which are reflected in the COVID-19 pandemic. Indeed, early research on resilience in the pandemic has found that benefit-finding is associated with reductions in psychological distress. A recent study by Cox et al. found that increased benefit-finding was associated with not only greater life satisfaction, meaning, and vitality but also decreased reports of depression and stress (Cox et al., 2021).

In light of calls to understand the role of positive coping strategies in the pandemic and in the path forward as the world heals (Burke and Arslan, 2020), we sought to identify and characterize the types of benefits found by individuals during the COVID-19 pandemic. We asked:

RQ1: What, if any, are the benefits, or ‘silver linings', that have helped people persevere through the COVID-19 pandemic?

Based on previous work on protective factors linked to increased resilience during COVID-19, we predicted that two factors that would emerge in our analysis would be time spent with loved ones and gratitude.

In this paper, we use a mixed-method approach that includes computational natural language processing (NLP) methods, including sentiment analysis and topic modeling, along with qualitative thematic content analysis to identify these protective factors from a survey. NLP methods have long been used to explore people's thoughts and feelings during emotional events and crises by processing patterns in language use at scale—an affordance that may be particularly valuable during rapidly evolving situations such as the COVID-19 pandemic (Cohn et al., 2004; Tausczik et al., 2012; Wolohan, 2020). Similarly, in-depth thematic content analysis is often used to identify more granular patterns in text responses.

As it becomes increasingly clear that addressing the full impact of the pandemic requires implementation of public health policy on mental health (Bearden and Karlsgodt, 2021), the goals of this paper are 2-fold. We aim to identify these silver linings to understand how people find solace in times of crisis, and to consider how we may carry forward positive societal changes caused by the pandemic into a post-COVID world. Understanding the sources of hope that have helped people weather the psychological toll of COVID-19 can inform public health policy to improve society's resilience to the distress of this pandemic and future health crises.



In March 2020, we launched an online survey on three social media platforms (Twitter, Facebook, and Nextdoor) to identify the impact of the COVID-19 pandemic on participants' lives. Any individual 18 and older was eligible to participate. They could participate by clicking on the link to the survey embedded in the social media post upon seeing the recruitment materials. The survey was approved by Stanford's Institutional Review Board and all participants consented to the study.

The survey included a total of 21 questions including demographics and the impact of COVID-19 on individuals' lives, which is reported in Nelson et al. (2020). In this work, we focused on the evaluation of free-text responses to the question “Although this is a challenging time, can you tell us about any positive effects or 'silver linings' you have experienced during this crisis?” The authors agreed to make the data available upon reasonable request.


We recruited a convenience sample of 4,582 participants over the 7-month period from March to September 2020. We excluded 1,469 participants who did not respond to the silver-linings question that was central to our analysis, resulting in a final sample size of 3,113 responses. The average age of participants was 47.41 ± 15.2 years (range: 18–99), 71.5% were women, 59% were white as shown in Table 1. Participants of 68 different countries completed the survey, mostly from the U.S. (82.8%) followed by Guatemala (2.8%), Canada (2%), New Zealand (1.7%), and the U.K. (1.4%).


Table 1. Participant demographics and sentiment analysis results (18 < = age < = 99).

Statistical Analyses

We used a combination of computational and qualitative methods of natural language processing to identify the themes in participants' text responses. Given the large size and the richness of the dataset, our approach sought to leverage the complementary strengths of both methods. Computational methods of natural language processing were used to automatically evaluate and extract themes from the responses at scale, and to examine the structure and distribution of silver linings themes across responses. Qualitative methods of thematic content analysis were used to confirm the themes, to identify more fine-grained, specific topics, and to select exemplar quotes for each theme.

Computational Analyses

This section describes the computational methods of natural language processing used to automatically evaluate the text of the silver linings responses from the online survey. As seen in Figure 1, we outlined the basic steps of: (A) Preprocessing; (B) Sentiment Analysis; and (C) Topics Extraction.


Figure 1. Workflow of the Natural Language Processing methods applied to analyze the text of the survey.

(A) Preprocessing:

We preprocessed the dataset of survey responses to preserve the confidentiality and integrity of protected health information (PHI). Thus, we applied the following rules of preprocessing: (1) specific occurrences for email addresses were replaced with generic tokens; (2) named entities such as people's names were also replaced with generic tokens; (3) text was lemmatized; (4) all text was changed to lowercase; (5) stop-words were suppressed, such as “an,” “also,” etc.; and (6) links were omitted.

(B) Sentiment Analysis:

The aim of our analysis is to measure the intensity of responses related to silver lining topics in the early stages of the pandemic. Thus, we sought to understand the emotional properties of participants' responses with sentiment analysis. The objective of sentiment analysis is to discover emotion, opinion, and subjectivity expressed in a piece of text (Feldman, 2013). In this study, we used TextBlob, a Python-based library for processing textual data, to explore patterns in how people discussed silver linings in the pandemic (Loria, 2018). TextBlob provides an API for tasks such as part-of-speech tagging, lemmatization, sentiment analysis, among others. For sentiment analysis, TextBlob returns a score called polarity within the range [−1, 1]. Each response is evaluated in terms of polarity where −1 represents very negative and +1 represents very positive.

(C) Topic Extraction:

In order to identify the types of silver linings participants reported experiencing, we used NLP methods of topic modeling and clustering to digest, analyze, and automatically extract topics from survey responses. Topic modeling aims to discover latent topics inherent to a set of textual responses, by identifying groups of words that frequently occur together (Lossio-Ventura et al., 2021). Clustering methods group texts based on their similarity.

In this study, we characterized the responses via feature extraction by employing a combination of the latent Dirichlet allocation model (LDA) and semantic representation transformers called Bidirectional Encoder Representations from Transformers (BERT), then grouped similar responses using k-means clustering. Based on studies demonstrating that this combination improved performance on numerous language analysis tasks (Rangrej et al., 2011; Peinelt et al., 2020; Xie et al., 2020), this approach allowed us to better reveal the most common types of silver linings in participants' responses.

The LDA is a probabilistic model that describes a set of texts as a mixture of distinct topics, which are represented as a mixture of distributions of words (Blei et al., 2003). LDA uses a Bayesian approach to learn these distributions, which allows it to compute the probability that a text belongs to a given topic. We implemented this with Gensim version 4.0.0, an open-source library for unsupervised topic modeling (Rehurek and Sojka, 2010). Parameters of LDA were set as suggested in previous studies to obtain optimal performance on short texts. The hyper-parameters of LDA were set to α = 0.05 and β = 0.01. We set the number of iterations to 1,000 and number of topics to 25. Thus, the output vector of each response had a dimension of 25. This produced a vector of probabilities for each participant's survey response, where the elements are probability scores of that response belonging to a particular topic. The sum of all elements of the vector is 1.

BERT is a language representation model released by Google. Recent studies have successfully employed BERT for topic analysis (Zhou et al., 2019; Liu et al., 2020, 2021). BERT enhances the semantic representation of texts with its feature extraction and fine-tuning transfer learning capabilities (Vaswani et al., 2017; Devlin et al., 2019). In this analysis, we used the BERT implementation provided by Hugging Face PyTorch. BERT parameters were set as suggested in Hugging Face PyTorch. Pad was set to the longest sequence in the batch (i.e., 512) and the pretrained model chosen was “bert-base-uncased.” Thus, we encoded each response and obtained a vector embedding of dimension 768.

Next, we entered the LDA and BERT vectors for each survey response into the clustering algorithm. We used one of the most well-known algorithms, k-means (with k-means++ initialization) implemented from Sklearn (MacQueen, 1967). We varied k (i.e., number of clusters) ranging from 2 to 20, and the initialization was set to k-means++. Note that the clustering algorithm received a vector of dimension 793 (25+768). The output of the clustering task is clusters (topics) of responses. To evaluate the performance of the clustering method, we applied a cluster validity index, the Silhouette Coefficient (SC) (Rousseeuw, 1987). The SC index evaluates the clusters/topics based on two aspects: the similarity of responses within the same cluster (cohesion), and the difference between the responses of different clusters. Then we created wordclouds of the most important keywords from each topic. Note that the extracted keywords that represent each topic are single-word terms.

Finally, we used BioTex, an information retrieval tool that extracts multi-word terms (multi-word keywords) from text responses for different languages such as English and Spanish (Lossio-Ventura et al., 2016). BioTex implements several measures to extract multi-word terms, such as TF-IDF, LIDF-value, among others. This tool is based on several linguistic patterns also known as lexical categories such as nouns, adjectives, etc. For instance, BioTex is able to extract multi-word terms such as “quality time with spouse” which is composed of the following lexical categories: “adjective-noun-preposition-noun.”

Qualitative Analyses

To further identify more granular themes from the corpus of open-ended responses in the dataset, we used qualitative methods of thematic content analysis. The coding process was conducted by two trained human coders following Braun and Clarke's (2006) guidance for completing thematic content analysis. First, two members of the research team (AL and EL) familiarized themselves with the data by reading over all of the responses. Next, they met regularly to generate codes and identify initial themes that emerged from a process of discussion and iterative review. These themes were subjected to further review by the research team, yielding a final set of nine themes of silver linings that participants reported as a result of the COVID-19 pandemic. Themes were named, defined, and finalized in a codebook. The manual coding of responses was conducted by two raters: AL who coded 86% of the responses and a research assistant who coded 25% of the responses. Both coders used the same codebook and demonstrated good inter-rater reliability as evaluated by Cohen's kappa (=0.70 −0.94). Upon completion of the coding process, the research team integrated the themes identified into existing literature and identified exemplar quotes.


Computational Analyses: Sentiment Analysis and Silver Linings Identified Through Natural Language Processing

The results of the sentiment analysis are presented in Table 1, including comparisons by demographics such as participants' gender, age group, and country of residence, and keyword examples of relevant topics associated with each group. We report the polarity analysis, which is the sentiment scores of mean responses categorized as positive, negative, or neutral in emotion. As expected, we found that the overall sentiment of participants' responses was positive when describing the silver linings they found in the pandemic, with the average polarity score being 0.22. Moreover, in general, women (polarity = 0.23) tend to slightly be more positive than men (polarity = 0.21) and they usually reacted to topics related to kids, followed by parents and partners.

The weekly average sentiment score of all responses over time are shown in Figure 2. Despite the stressors and tragedies of 2020, the average sentiment appears to remain positive overall. However, we can see that emotions in responses were less positive in the aftermath of distressing events, such as the murder of George Floyd and the death of Ruth Bader Ginsburg. On the other side, emotions in responses were more positive following hopeful events such as the announcement of the creation and testing phases of COVID-19 vaccines.


Figure 2. Weekly average of sentiments in responses over time. A sentiment score of −1 represents very negative and +1 very positive.

We then identified the types of silver linings people experienced using topic modeling and clustering. Note that we performed experiments using the Silhouette Coefficient (SC) index to measure the performance of the topic extraction step with the number of clusters/topic ranging from 2 to 20 (“k”). The SC obtained the best results when considering 5 clusters; this means the methods automatically created 5 groups where each group contained messages of a topic. Figure 3 depicts the results of clustering (i.e., grouping similar responses) and topic extraction (most frequent words from each topic) of free-text responses based on the combination of LDA and BERT embeddings methods.


Figure 3. Clustering and most frequent words from free-text responses based on the combination of LDA and BERT embeddings methods. (A) Shows the clustering considering 5 clusters (groups) as main topics. Each cluster shows the percentage of number of responses in that group, for instance, cluster 5 contains 16.83% of the total of responses, and (F) presents keywords from cluster 5 associated with positive environmental impact, benefits of working from home.

Figure 3A shows the clustering with 5 clusters as main topics. Each cluster shows the percentage of number of responses in that group, for instance, cluster 5 contains 16.83% of the total of responses. Figures 3B–F presents the most frequent words (single-word terms only) from all clusters, for instance, Figure 3F suggests that the cluster is associated with positive environmental impact. Topic modeling shows the different topics of discussion on silver linings are diverse, but the five most common topics that were automatically identified were finding benefits in (1) time with family, (2) work from home and flexible schedules, (3) sense of community and neighborhood, (4) reduced human impact on the environment, and (5) free time to develop skills. We confirmed these topics with BioTex. Figure 4 shows the most relevant terms (multi-word) automatically extracted with BioTex from all response, which are representative from the 5 topics previously identified.


Figure 4. Wordcloud of the most relevant terms (multi-word terms) extracted with BioTex from silver lining responses during the COVID-19 crisis between March and September 2020.

Qualitative Analyses: Silver Linings Identified Through Thematic Content Analysis

Thematic content analysis allowed us to identify more fine-grained types of silver linings than those extracted with NLP methods. Indeed, the content analysis confirmed the five topics identified through NLP and yielded four additional themes, finding that people reported finding silver linings in (1) feeling gratitude for what they have, (2) improved health literacy (i.e., around correct illness prevention), (3) viewing the pandemic as an impetus for positive social change, and (4) appreciating the communication opportunities made possible by technology.

Table 2 shows the results from the thematic content analysis. Paralleling findings from the NLP analysis, we observe that almost half of participants (46.4%) said that they found benefits in having increased quality time with their loved ones due to staying home during the pandemic. For some, this was driven by changes in their household, as a result of children moving home to their parents or individuals moving in with their partners. For others, this was facilitated by an increased use of technologies like social media and video-chats, which enabled people to connect with their friends and family despite being physically distant. In fact, some people (13.0%) explicitly cited technology as a silver lining of the pandemic, mentioning that they learned how to use tools like Zoom to build and maintain their relationships.


Table 2. COVID-19 silver lining identified from manual content analysis.

In addition, approximately a third of participants (29%) found benefits in the “slowed down” pace of life during the pandemic. They enjoyed having more time to rest, work on professional projects, pursue new hobbies or skills, and reflect on their lives. More specifically, some (13.6%) also felt that their experiences of the pandemic urged them to be more grateful for what they had. Still others (12.7%) explicitly mentioned the benefits of being able to work from home, such as enjoying the increased flexibility of work hours and the absence of stressful commutes. Finally, a subset of participants (5.6%) viewed the reduction of human travel and activity as a silver lining because it lead to a reduced impact on the environment.

People also found silver linings in the positive effects they anticipated would happen in the wake of the pandemic. Some (10.2%) felt that the necessity of taking health precautions to prevent the spread of COVID-19 would lead to improved health literacy among the general public, and subsequently lead to improved collective health in the future. In addition, some (7.6%) felt that the severity of the pandemic would serve as an impetus for positive societal changes.


Principal Findings

The goal of this paper was to identify the silver linings that individuals reported finding in the COVID-19 pandemic. During times of hardship, the act of finding silver linings, or benefits, can help people persevere by orienting them to the presence of protective factors in their lives.

We found that although people's emotions were impacted by COVID-19 and distressing events from the year, people were able to find sources of positive emotion in their lives. The public's sentiment score remained positive overall despite the tragedies and stressors that occurred in early stages of the pandemic. Using computational and qualitative natural language processing techniques, we found nine themes of silver linings. They found strength and hope in having quality time with loved ones, seeing local and global communities coming together, feeling the pace of life “slow down,” enjoying the benefits of working from home, appreciating the benefits of technology use, and viewing the pandemic as an impetus for positive societal changes, particularly improved health literacy and improvements to the environment.

Silver Linings in the Pandemic: Denoting the Presence of Protective Factors

Although the pandemic took a severe toll on collective well-being, we found that people were able to find silver linings to their experiences. This is consistent with previous work on benefit-finding in the aftermath of traumatic events (Folkman, 2008). Positive psychology research has found that people in adverse situations often report finding different kinds of benefits from their experiences, despite its negative impact (Affleck and Tennen, 1996; Werner, 2000; Tennen and Affleck, 2002; Folkman, 2008).

The process of identifying benefits may be helpful because it helps orient people to the presence of protective factors in their lives, which are “skills, strengths, or resources that can help them deal more effectively with stressful events” that serve as psychological buffers that protect individuals from the potential harms of adverse situations, such as living through a pandemic [Fuller-Iglesias et al., 2008; Substance Abuse and Mental Health Services Administration (SAMHSA), 2019; Conversano et al., 2020; Magson et al., 2020; Maine Center for Disease Control Prevention, 2020; Bearden and Karlsgodt, 2021]. Reflecting on silver linings may help people better recognize the external protective factors in their lives—such as having strong relationships with family or friends—or their own internal protective factors—such as having dispositional mindfulness or practicing gratitude (Wood et al., 2008; Lomas et al., 2014; Vieselmeyer et al., 2017; Gee, 2021). As a result, they are better positioned to take advantage of these resources.

In our study, the silver linings that emerged from our analyses revolved broadly around finding a sense of community, closeness, and gratitude—all of which may help orient people to the presence of protective factors in their lives. For example, some people reported feeling a sense of increased closeness with their loved ones and found that the pandemic gave them a unique opportunity to spend quality time with their families. For these people, the act of actively recognizing and appreciating their close relationships as a “silver lining” may help them engage in meaning-focused coping with the pandemic by finding a source of positive meaning in their experiences (Folkman, 2008). In addition, this silver lining denotes the presence of the protective factor of having a supportive or valued relationship with their loved ones, which has been linked to improved psychological well-being and resilience in the face of threats (Fuller-Iglesias et al., 2008). Indeed, a recent study found that people with greater perceived family support were less lonely and had better mental health during the COVID-19 crisis while social distancing measures were in place (Li and Xu, 2020).

Similarly, the silver lining of “appreciating what one has” denotes the presence of an important internal protective factor which is the practice of gratitude. People who reported this silver lining felt an increased sense of appreciation for what they had and a greater sense of clarity about what mattered in their life. They expressed appreciation for some of the positive lifestyle changes that have emerged, reflecting on the normalization of working from home, greater awareness of physical and mental health needs, and novel uses of technology that have allowed individuals and communities to connect when in-person interactions were limited. Extensive studies have demonstrated the beneficial effects of gratitude on well-being (Sansone and Sansone, 2010; Wood et al., 2010). In the context of the pandemic, a number of studies have found that practicing gratitude and appreciation for the positive aspects of one's life protected individuals against some of the harmful mental health impacts of the pandemic among a variety of communities (Butler and Jaffe, 2021; Nguyen and Le, 2021).

Many people also found a silver lining in seeing their communities come together to support one another in a time of crisis. For some, this entailed seeing their neighbors and peers join together to help others in their local community. For others, this meant seeing people like healthcare workers, essential workers, and volunteers work on a global scale to combat the virus. Previous research on recovery from traumatic events has found that there can often be a collective outpouring of support and prosocial behavior in the aftermath of the crisis (Zaki, 2019). However, it is not always easy to recognize this, particularly in times of distress. Reporting this silver lining may denote an orientation toward the protective factors of seeing the “positive” in other humans, to focus on what can be controlled, and to draw a sense of strength from adversity at the individual and collective level (McCrae, 1984; Tedeschi and Calhoun, 2004). Because of this orientation, people who recognize this sense of communality may be better able to participate in helping others or accessing forms of support at the community level.

Notably, many individuals found solace in viewing the pandemic as an impetus for necessary positive societal changes—-a call to action to address urgent issues such as climate change, misinformation, and disparities in health and healthcare. Indeed, work on resilience through adverse life events has demonstrated that individual resilience is closely linked to interactions with systems-level factors, such as access to resources and public policy (Gee, 2021). Our results suggest that having a vision of a better future may be a key protective factor that helps individuals persevere through times of grief and uncertainty. Critically, however, belief in a better, more equitable future of a post-COVID world must be matched with concrete actions to make that vision a reality.


Limitations to our research includes the non-representative nature of our sample and relatively small dataset used, which may affect the NLP methods, such as word representations and the creation of a relevant vocabulary coverage of COVID-19. For example, it is possible survey respondents were able to work from home or had not lost loved ones at the time of response.

Moreover, the NLP-based topic extraction approach we implemented allowed to improve the performance when revealing the most common topics, grouping similar responses, and in translating the unstructured response to input features for the clustering algorithm. However, it is worth to mention that there is currently no standard way of combining topics with pretrained contextual representations such as BERT.


By definition, “silver linings” are the signs of hope and strength, however faint, in an otherwise tragic situation. While no silver lining may be able to mitigate the impact of the pandemic on people's lives, our results show what silver linings people have turned to in order to persevere through the challenges of the pandemic. In a time of limited resources, understanding the silver linings that have given people hope, strength, and solace can inform efforts to support individual and collective recovery from the psychological and emotional challenges of the pandemic. As a result, we may be better able to heal from this crisis and better prepared to respond to potential future crises.

Data Availability Statement

The data used in this study can be made available upon reasonable request to the corresponding author.

Ethics Statement

The studies involving human participants were reviewed and approved by Stanford's Institutional Review Board and all participants consented to the study. The patients/participants provided their written informed consent to participate in this study.

Author Contributions

JALV and AL conceived and designed the study, performed the analysis and interpretation of data, wrote the initial draft, and revised subsequent versions. JALV set up the natural language processing applications. AL manually annotated the survey dataset. EL, NL, and JH as senior investigators and provided relevant feedback. EL led and supervised the project. All authors read, revised, and approved the final manuscript.


Research reported in this publication was supported by the (1) National Cancer Institute of the National Institutes of Health under Award Number DP2CA225433 and (2) National Institute of Arthritis and Musculoskeletal and Skin Diseases of the National Institutes of Health under Award Number K24AR075060. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher's Note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.


We would like to thank Mark York, who worked as research assistant in the Social Media Lab at Stanford University, for helping annotate the data.


Affleck, G., and Tennen, H. (1996). Construing benefits from adversity: adaptotional significance and disposltional underpinnings. J. Pers. 64, 899–922. doi: 10.1111/j.1467-6494.1996.tb00948.x

PubMed Abstract | CrossRef Full Text | Google Scholar

Bearden, C. E., and Karlsgodt, K. H. (2021). Risk and resilience in extraordinary times. Biol. Psychiatry. 6, 136–138. doi: 10.1016/j.bpsc.2020.12.001

PubMed Abstract | CrossRef Full Text | Google Scholar

Blei, D. M., Ng, A. Y., and Jordan, M. I. (2003). Latent dirichlet allocation. J. Mach. Learn. Res. 3, 993–1022.

Google Scholar

Braun, V., and Clarke, V. (2006). Using thematic analysis in psychology. Q. Res. Psychol. 3, 77–101. doi: 10.1191/1478088706qp063oa

CrossRef Full Text | Google Scholar

Brooks, S. K., Webster, R. K., Smith, L. E., Woodland, L., Wessely, S., Greenberg, N., et al. (2020). The psychological impact of quarantine and how to reduce it: rapid review of the evidence. Lancet 395, 912–920. doi: 10.1016/S0140-6736(20)30460-8

PubMed Abstract | CrossRef Full Text | Google Scholar

Burhamah, W., AlKhayyat, A., Oroszlányová, M., AlKenane, A., Almansouri, A., Behbehani, M., et al. (2020). The psychological burden of the COVID-19 pandemic and associated lockdown measures: Experience from 4000 participants. J. Affect. Disord. 277, 977–985. doi: 10.1016/j.jad.2020.09.014

PubMed Abstract | CrossRef Full Text | Google Scholar

Burke, J., and Arslan, G. (2020). Positive education and school psychology during COVID-19 pandemic. J. Posit. Sch. Psychol. 4, 137–139. doi: 10.47602/jpsp.v4i2.243

CrossRef Full Text | Google Scholar

Butler, J., and Jaffe, S. (2021). “Challenges and gratitude: A diary study of software engineers working from home during covid-19 pandemic,” in 2021 IEEE/ACM 43rd International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP) (Madrid: IEEE). doi: 10.1109/ICSE-SEIP52600.2021.00047

CrossRef Full Text | Google Scholar

Campion, J., Javed, A., Sartorius, N., and Marmot, M. (2020). Addressing the public mental health challenge of COVID-19. Lancet Psychiatry 7, 657–659. doi: 10.1016/S2215-0366(20)30240-6

PubMed Abstract | CrossRef Full Text | Google Scholar

Cohn, M. A., Mehl, M. R., and Pennebaker, J. W. (2004). Linguistic markers of psychological change surrounding September 11, 2001. Psychol. Sci. 15, 687–693. doi: 10.1111/j.0956-7976.2004.00741.x

PubMed Abstract | CrossRef Full Text | Google Scholar

Conversano, C., Di Giuseppe, M., Miccoli, M., Ciacchini, R., Gemignani, A., and Orrù, G. (2020). Mindfulness, age and gender as protective factors against psychological distress during Covid-19 pandemic. Front. Psycholo. 11:1900. doi: 10.3389/fpsyg.2020.01900

PubMed Abstract | CrossRef Full Text | Google Scholar

Cox, C. R., Swets, J. A., Gully, B., Xiao, J., and Yraguen, M. (2021). Death concerns, benefit-finding, and well-being during the COVID-19 pandemic. Front. Psychol. 12:648609. doi: 10.3389/fpsyg.2021.648609

PubMed Abstract | CrossRef Full Text | Google Scholar

Czeisler, M. É., Lane, R. I., Petrosky, E., Wiley, J. F., Christensen, A., Njai, R., et al. (2020). Mental health, substance use, and suicidal ideation during the COVID-19 pandemic-United States, June 24-30, 2020. Morb. Mortal. Weekly Rep. 69:1049. doi: 10.15585/mmwr.mm6932a1

PubMed Abstract | CrossRef Full Text | Google Scholar

Devlin, J., Chang, M. W., Lee, K., and Toutanova, K. (2019). “Bert: Pre-training of deep bidirectional transformers for language understanding,” in NAACL-HLT. doi: 10.18653/v1/N19-1423

CrossRef Full Text | Google Scholar

Feldman, R. (2013). Techniques and applications for sentiment analysis. Commun. ACM, 56, 82–89. doi: 10.1145/2436256.2436274

CrossRef Full Text | Google Scholar

Folkman, S. (2008). The case for positive emotions in the stress process. Anxiety Stress Coping 21, 3–14. doi: 10.1080/10615800701740457

PubMed Abstract | CrossRef Full Text | Google Scholar

Folkman, S., and Moskowitz, J. T. (2007). “Positive affect and meaning-focused coping during significant psychological stress,” in The scope of social psychology: Theory and Applications, eds M. Hewstone, H. A. W. Schut, J. B. F. De Wit, K. Van Den Bos, and M. S. Stroebe (Psychology Press), 10, 193–208.

Google Scholar

Fuller-Iglesias, H., Sellars, B., and Antonucci, T. C. (2008). Resilience in old age: social relations as a protective factor. Res. Hum. Dev. 5, 181–193. doi: 10.1080/15427600802274043

CrossRef Full Text | Google Scholar

Gee, D. G. (2021). Early life trauma and resilience: insights from developmental neuroscience for policy. Biol. Psychiatry 6, 141–143. doi: 10.1016/j.bpsc.2020.07.005

PubMed Abstract | CrossRef Full Text | Google Scholar

Huang, Y., and Zhao, N. (2020). Generalized anxiety disorder, depressive symptoms and sleep quality during COVID-19 outbreak in China: a web-based cross-sectional survey. Psychiatry Res. 288:112954. doi: 10.1016/j.psychres.2020.112954

PubMed Abstract | CrossRef Full Text | Google Scholar

Li, S., and Xu, Q. (2020). Family support as a protective factor for attitudes toward social distancing and in preserving positive mental health during the COVID-19 pandemic. J. Health Psychol. 6:1359105320971697. doi: 10.1177/1359105320971697

PubMed Abstract | CrossRef Full Text | Google Scholar

Liu, J., Xia, C., Li, X., Han, H., and Liu, T. (2020). “A BERT-based ensemble model for Chinese news topic prediction,” in Proceedings of the 2020 2nd International Conference on Big Data Engineering (Shanghai). doi: 10.1145/3404512.3404524

CrossRef Full Text | Google Scholar

Liu, Y., Whitfield, C., Zhang, T., Hauser, A., Reynolds, T., and Anwar, M. (2021). Monitoring COVID-19 pandemic through the lens of social media using natural language processing and machine learning. Health Inform. Sci. Syst. 9, 1–16. doi: 10.1007/s13755-021-00158-4

PubMed Abstract | CrossRef Full Text | Google Scholar

Lomas, T., Froh, J. J., Emmons, R. A., Mishra, A., and Bono, G. (2014). Gratitude Interventions. The Wiley Blackwell Handbook of Positive Psychological Interventions (John Wiley & Sons). doi: 10.1002/9781118315927.ch1

CrossRef Full Text | Google Scholar

Loria, S. (2018). textblob Documentation. Available online at: (accessed February 15, 2018).

Google Scholar

Lossio-Ventura, J. A., Gonzales, S., Morzan, J., Alatrista-Salas, H., Hernandez-Boussard, T., and Bian, J. (2021). Evaluation of clustering and topic modeling methods over health-related tweets and emails. Artifi. Intellig. Med. 117:102096. doi: 10.1016/j.artmed.2021.102096

PubMed Abstract | CrossRef Full Text | Google Scholar

Lossio-Ventura, J. A., Jonquet, C., Roche, M., and Teisseire, M. (2016). Biomedical term extraction: overview and a new methodology. Inform. Retri. J. 19, 59–99. doi: 10.1007/s10791-015-9262-2

CrossRef Full Text | Google Scholar

MacQueen, J. (1967). Some methods for classification and analysis of multivariate observations. Proc. Berkeley Sympo. Mathe. Stati. Probabil. 1:14.

PubMed Abstract | Google Scholar

Magson, N. R., Freeman, J. Y., Rapee, R. M., Richardson, C. E., Oar, E. L., and Fardouly, J. (2020). Risk and protective factors for prospective changes in adolescent mental health during the COVID-19 pandemic. J. Youth Adolesc. 50, 44–57. doi: 10.1007/s10964-020-01332-9

PubMed Abstract | CrossRef Full Text | Google Scholar

Maine Center for Disease Control Prevention (2020). Protective Factors. Available online at: (accessed July 14, 2021).

Google Scholar

McCrae, R. R. (1984). Situational determinants of coping responses: loss, threat, and challenge. J. Pers. Soc. Psychol. 46:919.

PubMed Abstract | Google Scholar

Mumphrey, C., and Kelleher, J. S. (2020). Poll: Pandemic Takes Toll on Mental Health of Young Adults. Washington: The Washington Post.

Nelson, L. M., Simard, J. F., Oluyomi, A., Nava, V., Rosas, L. G., Bondy, M., et al. (2020). US public concerns about the COVID-19 pandemic from results of a survey given via social media. JAMA Inter. Med. 180, 1020–1022. doi: 10.1001/jamainternmed.2020.1369

PubMed Abstract | CrossRef Full Text | Google Scholar

Nguyen, T. M., and Le, G. N. H. (2021). The influence of COVID-19 stress on psychological well-being among Vietnamese adults: The role of self-compassion and gratitude. Traumatology 27, 86–97. doi: 10.1037/trm0000295

CrossRef Full Text | Google Scholar

Peinelt, N., Nguyen, D., and Liakata, M. (2020). “tBERT: Topic models and BERT joining forces for semantic similarity detection,” in Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (Washington). doi: 10.18653/v1/2020.acl-main.630

CrossRef Full Text | Google Scholar

Rangrej, A., Kulkarni, S., and Tendulkar, A. V. (2011). “Comparative study of clustering techniques for short text documents,” in Proceedings of the 20th International Conference Companion on World Wide Web (Hyderabad).

Google Scholar

Rehurek, R., and Sojka, P. (2010). “Software framework for topic modelling with large corpora,” in Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks (Valletta).

Google Scholar

Rousseeuw, P. J. (1987). Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Mathe. 20, 53–65. doi: 10.1016/0377-0427(87)90125-7

CrossRef Full Text | Google Scholar

Sansone, R. A., and Sansone, L. A. (2010). Gratitude and well being: the benefits of appreciation. Psychiatry 7:18.

Google Scholar

Substance Abuse Mental Health Services Administration (SAMHSA) (2019). Risk and Protective Factors. SAMHSA's Evidence Based Practices Resource Center. Available online at: (accessed July 14, 2021).

Tausczik, Y., Faasse, K., Pennebaker, J. W., and Petrie, K. J. (2012). Public anxiety and information seeking following the H1N1 outbreak: blogs, newspaper articles, and wikipedia visits. Health Commun. 27, 179–185. doi: 10.1080/10410236.2011.571759

PubMed Abstract | CrossRef Full Text | Google Scholar

Tedeschi, R. G., and Calhoun, L. G. (2004). Posttraumatic growth: conceptual foundations and empirical evidence. Psychol. Inq. 15, 1–18, doi: 10.1207/s15327965pli1501_01

CrossRef Full Text | Google Scholar

Tennen, H., and Affleck, G. (2002). Benefit-finding and benefit-reminding. Handb. Posit. Psychol. 1, 584–597.

Google Scholar

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., et al. (2017). “Attention is all you need,” in Advances in Neural Information Processing Systems (Long Beach, CA).

Google Scholar

Vieselmeyer, J., Holguin, J., and Mezulis, A. (2017). The role of resilience and gratitude in posttraumatic stress and growth following a campus shooting. Psychol. Trauma 9:62. doi: 10.1037/tra0000149

PubMed Abstract | CrossRef Full Text | Google Scholar

Werner, E. E. (2000). Protective factors and individual resilience. Handb. Early Childh. Intervent. 2, 115–132. doi: 10.1017/CBO9780511529320.008

CrossRef Full Text | Google Scholar

Wolohan, J. T. (2020). “Estimating the effect of COVID-19 on mental health: Linguistic indicators of depression during a global pandemic,” in Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020 (Seattle, WA).

Google Scholar

Wood, A. M., Froh, J. J., and Geraghty, A. W. (2010). Gratitude and well-being: A review and theoretical integration. Clin. Psychol. Rev. 30, 890–905. doi: 10.1016/j.cpr.2010.03.005

PubMed Abstract | CrossRef Full Text | Google Scholar

Wood, A. M., Maltby, J., Gillett, R., Linley, P. A., and Joseph, S. (2008). The role of gratitude in the development of social support, stress, and depression: Two longitudinal studies. J. Res. Personal. 42, 854–871. doi: 10.1016/j.jrp.2007.11.003

CrossRef Full Text | Google Scholar

World Health Organization (2020). Mental health and psychosocial considerations during the COVID-19 outbreak. Available online at:

Google Scholar

Xie, Q., Zhang, X., Ding, Y., and Song, M. (2020). Monolingual and multilingual topic analysis using LDA and BERT embeddings. J. Informetr. 3:101055. doi: 10.1016/j.joi.2020.101055

CrossRef Full Text | Google Scholar

Zaki, J. (2019). The War for Kindness: Building Empathy in a Fractured World. New York, NY: Crown.

Google Scholar

Zhou, Y., Li, C., He, S., Wang, W., and Qiu, Y. (2019). “Pre-trained contextualized representation for Chinese conversation topic classification,” in 2019 IEEE International Conference on Intelligence and Security Informatics (ISI) (Shenzhen: IEEE). doi: 10.1109/ISI.2019.8823172

CrossRef Full Text | Google Scholar

Keywords: silver linings, protective factors, COVID-19, natural language processing, topic modeling, sentiment analysis

Citation: Lossio-Ventura JA, Lee AY, Hancock JT, Linos N and Linos E (2021) Identifying Silver Linings During the Pandemic Through Natural Language Processing. Front. Psychol. 12:712111. doi: 10.3389/fpsyg.2021.712111

Received: 19 May 2021; Accepted: 16 July 2021;
Published: 03 September 2021.

Edited by:

Marius Ioan Drugas, University of Oradea, Romania

Reviewed by:

Nicolas Pellerin, Université Toulouse—Jean Jaurès, France
Daniela Rodrigues Recchia, Universität Witten/Herdecke, Germany

Copyright © 2021 Lossio-Ventura, Lee, Hancock, Linos and Linos. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Eleni Linos,

These authors have contributed equally to this work and share first authorship

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.