Analyzing people's tweets could reveal if they're lonely, researchers say.
Loneliness -- which has been linked with depression, heart disease, dementia and other health problems -- affects about 1 in 5 adults in the United States.
Researchers analyzed public accounts of Twitter users in Pennsylvania and identified more than 6,200 who used words like "lonely" or "alone" more than five times from 2012 to 2016.
The lonely users tweeted nearly twice as much as others and were more likely to do so at night.
Lonely users' language showed more anger, depression and anxiety than that of other users, according to the team from the University of Pennsylvania School of Medicine in Philadelphia.
They also reported that lonely users often tweeted about relationship problems, substance use and difficulty controlling their emotions.
The study was published Nov. 4 in the journal BMJ Open.
"Loneliness can be a slow killer, as some of the medical problems associated with it can take decades to manifest," said lead author Sharath Chandra Guntuku, a research scientist at Penn's Center for Digital Health.
"If we are able to identify lonely individuals and intervene before the health conditions associated with the themes we found begin to unfold, we have a change to help those much earlier in their lives," he added in a university news release. "This could be very powerful and have long-lasting effects on public health."
Study co-author Rachelle Schneider, a research coordinator at the center, said social media could be a valuable tool.
"Social media has the potential to allow researchers and clinicians to passively measure loneliness over time," she said in the news release. "Through validating our data, we can develop a reliable and accurate tool to do this monitoring."
Once lonely people are identified, they can be helped in several ways, according to study senior author Dr. Raina Merchant, director of the Center for Digital Health.
"It's clear that there isn't a one-size-fits-all model," she said in the news release. "Some interventions include buddy systems, peer-to-peer networks, therapy, and skill development for navigating day-to-day interactions with others."
The U.S. National Institutes of Health has more on loneliness.