Katharine Gammon of Inside Science reports, “When reading a novel, it’s common to let one’s mind wander into the imaginary: What might these characters look or sound like? Now, a new project uses algorithms to translate the emotions conveyed within a text into music that reflects the same sentiments. TransProse, as the project is called, is a collaboration between Hannah Davis, a New York-based programmer and artist, and Saif Mohammad, a research officer at the National Research Council Canada in Ottawa. The inspiration for the project came when Davis was in a master’s program for creative communication technology.”

Gammon continues, “As a class project, she was translating the grammar of novels into sound. ‘Hemingway was really short and staccato,’ she said. It led her to wonder how music could tackle a much bigger data set – emotion in novels. That’s when she found the work of Mohammad, who had created a massive 14,000-word lexicon that associated words with emotions. Ice cream is associated with happiness, while tears linked up with sadness. Together, Mohammad and Davis worked to create an algorithm that could build music based on these associations. They presented their results in a paper at the European Association for Computational Linguistics Workshop on Computational Linguistics for Literature last month in Sweden.”

She goes on, “The challenge of computers parsing real-life texts, where emotions run deeper than happy and sad, is one that will be tackled in the future. The researchers say that natural-language processing still has a long way to go before it hits the mainstream, and this project is just a start. ‘The lexicon only tells you what the words are associated with, but a sentence isn’t just the sum of words,’ said Saif. ‘We have these machine-learning algorithms, and [the technology] tries to generalize what it has learned. We’ve done lots of work in the last 10 years on sentiment analysis, but the emotion work is still in its nascence’.”

Read more here, or take a listen to see what TransProse did with Peter Pan:

Image: Courtesy Flickr/ I_Believe_