Computers can get an 'emotional feel' for fiction
from The wanderer above the sea of fog, Caspar David Friedrich (1818)

Computers can get an ‘emotional feel’ for fiction

As Kurt Vonnegut argued in a now-famous lecture, stories have emotional shapes. As you read a novel, you feel the emotions of the protagonists, sharing their fears, their anger at injustices, surprise when their assumptions turn out to be wrong, and joy when they finally solve their problems. Vonnegut was speaking theoretically from his experience as an author, but what if we could train computers to tap into that emotion and—in the processproduce real data? A new analysis of 3377 works of fiction has done just that. The stories, from an online repository of books in the public domain called Project Gutenberg, fell into one of six genres: mystery, humor, fantasy, horror, western, and science fiction. To track the works’ “emotional shape,” scientists used a massive online dictionary that categorizes words by the emotions they tend to be associated with: anger, disgust, fear, joy, sadness, or surprise. Armed with this information, the researchers programmed computers to come up with a six-dimensional score for every single sentence in each novel, which they then used to trace the order and intensity of emotions in each work. For example,?Frankenstein, by Mary Shelley, grows steadily in anger and fear over the course of the novel, with little change in other emotions save a big spike in sadness in the middle. But the picture looks completely different for Murder at Bridge, by Anne Austin, a classic mystery novel that slowly drains of joy until it suddenly spikes at the end, along with a burst of surprise. The surprise for the researchers was that this emotional shape could help a computer predict its genre. In the current study, published this week in PLOS ONE, a computer accurately predicted the genre of fiction works about 50% of the time, much higher than the 17% expected from random guessing. The most common mistake the computer made was misclassifying horror novels as either science fiction or fantasyperhaps not so surprising given the ambiguity between those genres. The one emotion that stood out as the strongest emotional discriminator between genres was fear. Could that be fiction's secret sauce?