Good news, if you haven't noticed, has always been a rare commodity. We all have our ways of coping, but the media's pessimistic proclivity presented a serious problem for Jurriaan Kamp, editor of the San Francisco-based Ode magazine—a must-read for "intelligent optimists"—who was in dire need of an editorial pick-me-up, last year in particular. His bright idea: an algorithm that can sense the tone of daily news and separate the uplifting stories from the Debbie Downers.

Talk about a ripe moment: A Pew survey last month found the number of Americans hearing "mostly bad" news about the economy and other issues is at its highest since the downturn in 2008. That is unlikely to change anytime soon: global obesity rates are climbing, the Middle East is unstable, and campaign 2012 vitriol is only just beginning to spew in the U.S. The problem is not trivial. A handful of studies, including one published in the Clinical Psychology Review in 2010, have linked positive thinking to better health. Another from the Journal of Economic Psychology the year prior found upbeat people can even make more money.

Kamp, realizing he could be a purveyor of optimism in an untapped market, partnered with Federated Media Publishing, a San Francisco–based company that leads the field in search semantics. The aim was to create an automated system for Ode to sort and aggregate news from the world's 60 largest news sources based on solutions, not problems. The system, released last week in public beta testing online and to be formally introduced in the next few months, runs thousands of directives to find a story's context. "It's kind of like playing 20 questions, building an ontology to find either optimism or pessimism," says Tim Musgrove, the chief scientist who designed the broader system, which has been dubbed a "slant engine". Think of the word "hydrogen" paired with "energy" rather than "bomb."

Web semantics developers in recent years have trained computers to classify news topics based on intuitive keywords and recognizable names. But the slant engine dives deeper into algorithmic programming. It starts by classifying a story's topic as either a world problem (disease and poverty, for example) or a social good (health care and education). Then it looks for revealing phrases. "Efforts against" in a story, referring to a world problem, would signal something good. "Setbacks to" a social good, likely bad. Thousands of questions later every story is eventually assigned a score between 0 and 1—above 0.95 fast-tracks the story to Ode’s Web interface, called OdeWire. Below that, a score higher than 0.6 is reviewed by a human. The system is trained to only collect themes that are "meaningfully optimistic," meaning it throws away flash-in-the-pan stories about things like sports or celebrities.

No computer is perfect, of course, and like IBM's Watson that held its own on Jeopardy! earlier this year, Ode’s slant engine continues to improve with time—and with each mistake. During one test, the slant system that runs Ode labeled a story about the FBI being "asleep at the switch" as positive, perhaps thinking it addressed sleep deprivation. Nor is it ideologically neutral: the U.S. losing ground to China is not such bad news to, well, China.

The goal is not to be naive, either—drowning out the gloom to focus on rainbows and unicorns. "Ignoring reality is not what this is about," Kamp says. "It's looking at the same reality, just looking at a different angle." High unemployment is a problem that seems all bad, he says, but if you approach it from a side door—perhaps profiling people who have founded new business and learned new skills or industries that have benefited from the downturn—it turns into a story that can inspire others, and maybe even lower the jobless rate faster.

Slant identification may have a big future. Researchers say it could eventually specialize Web content for pockets of consumers and make ads more engaging. Its potential to track attitudes in writing could even help address the age-old lament of how liberal or conservative the mainstream media actually is. Gone, too, could be the journalism axiom of "if it bleeds, it leads". If Ode has its way, solution-based news could become the hot new thing for the overwhelmed and dispirited. Imagine a new newsroom mantra: if it succeeds, it leads.