Text Analyser Reveals Emotional Temperature of Novels and Fairy Tales
Once upon a time, a data miner discovered a rich vein of emotion and lived happily ever after
Stories are the source of enduring fascination for children and adults alike. At a fundamental level, they are a powerful channel for communicating emotions. And while they have been studied in detail by generations of critics , there is little in the way of objective tools for analysing and comparing the emotional content of stories and how these emotions change throughout a tale.
Today, that looks set to change thanks to the work of Saif Mohammad at the Institute for Information Technology in Ottawa, Canada. Mohammad has created data mining tool that measures the emotional temperature of a tale and the way this changes throughout the story.
The result allows users to search stories by emotion. “For example, retrieving the darkest of the Brothers Grimm fairy tales, or ﬁnding snippets from the Sherlock Holmes series that build the highest sense of anticipation and suspense,” says Mohammad.
The new method is straightforward. It depends first of all on the huge corpus of digitised books that have become available in recent years, largely thanks to the work of the Gutenburg Project and the Google Books Corpus.
This Week’s Top 5 Posts
Analysing the emotional content of text is also becoming easier. In recent years, researchers have built up significant databases of the emotions that a given word evokes. This is part of the new field of sentiment analysis in which common words are categorised as positive, negative or neutral and associated with one the eight fundamental emotions—joy, sadness, anger, fear, trust, disgust, surprise and anticipation.
Mohammad has created his emotion analyser by combining these two advances with a clear method for visualising the results. For example, in analysing Shakespeare’s comedy As You Like It, he can display the number of words associated with each emotion that appear in every 10,000 words. This gives a kind of emotional signature.
Comparing this to the emotional signature of Hamlet, one of Shakespeare’s tragedies, is revealing (see image above). “Observe how one can clearly see that Hamlet has more fear, sadness, disgust, and anger, and less joy, trust, and anticipation,” he says.
And this is just the beginning. He can analyse the way the emotional temperature changes throughout a story, how different authors use emotion and how the use of emotion changes from one writing genre to another.
And he can reveal how the emotions associated with certain nouns differ. “For example, what is the distribution of emotion words used in proximity to mentions of women, race, and homosexuals,” he asks.
By searching for the emotions associated with characters in a story, it becomes possible to automatically generate summaries of their emotional states.
Beyond that, once an entire corpus of work has been analysed in this way, it becomes possible to compare them in unprecedented depth and detail. For example, Mohammad has analysed all of the Brothers Grimm fairy tales and arranged them in order of negative word density. The darkest turns out to be a tale called Gambling Hansel.
And Mohammad has not only compared stories but entire genres. “We compare emotion words in fairy tales and novels, to show that fairy tales have a much wider range of emotion word densities than novels,” he says.
That looks to be a powerful new way to analyse literature. There’s clearly no shortage of data to mine when it comes to novels and other tales. And there’s gold in them thar hills.
Ref:arxiv.org/abs/1309.5909: From Once Upon a Time to Happily Ever After: Tracking Emotions in Novels and Fairy Tales