Researchers at the University of Vermont’s Computational Story Lab have created a computer program that measures happiness. Called the “hedonometer," the technology was initially designed to aggregate and chart emotions conveyed on Twitter. It graphed out spikes in happiness and sadness over time based on the use of emotional keywords ("happy," "sad," "hate," and "love," for instance). But now, The Verge reports, the folks behind the hedonometer have turned their attention away from the Twitterverse and toward the fictional universes of classic novels.

Researchers used the hedonometer to graph the emotional arcs of 1737 books from Project Gutenberg, publishing their results on the Hedonometer website for anyone to peruse. For each book, the hedonometer created a graph of fluctuations in emotional language. The graphs it produced varied wildly from book to book, as did the happy and sad words it identified. The Adventures of Tom Sawyer, for example, starts off full of happy references to “friends,” “money,” and “love,” but dips dramatically about a third of the way through the novel, with increased use of the words “grave,” “dead,” “kill” and “lost” (likely during the book’s grave-robbing scene). Then, it gradually returns to its initial happiness levels by the conclusion. Meanwhile after an initial happiness spike, Crime and Punishment has many repeated dips into sadness, with words like “prison,” “tears,” “afraid,” and “guilty.”

While the hedonometer graphs of individual novels are fascinating on their own, researchers say that—when analyzed together—they reveal some of the most fundamental building blocks of compelling stories. MIT Technology Review explains that researchers used the hedonometer results to identify six basic emotional arcs that are used time and time again throughout literature: the steady ongoing rise in happiness, the steady fall (most often seen in tragedies), the fall then rise, the rise then fall, rise-fall-rise, and fall-rise-fall. While it’s impossible to reduce any story to its emotional fluctuations (and, certainly, not all stories follow these patterns), the research is significant in providing some of the first empirical evidence of basic storytelling rules.

[h/t The Verge]

Know of something you think we should cover? Email us at tips@mentalfloss.com.