Computers are getting better at understanding human languages, thanks partly to algorithms that can analyse sentences for positive or negative sentiments, says Ari Rappoport of the Hebrew University of Jerusalem, Israel. But picking up on sarcasm is still a problem. “In many cases, sarcasm is difficult even for people to recognise”, never mind computers, he says.

Rappoport and colleagues wrote a sentiment-analysing program. They then trained this software to recognise sarcasm by feeding it sentences that had been flagged up by human reviewers as likely to contain sarcasm.

The team used the trained program to analyse a selection of product reviews on Amazon.com and a random selection of posts on Twitter. Three human volunteers were asked to rate the same material for sarcastic content.

The algorithm agreed with the volunteers 77 per cent of the time for Amazon.com product reviews and 83 per cent of the time for the tweets.


Nice work, really

“It is a very exciting paper, because it attacks a problem that I didn’t really think we were ready to make headway on,” says Lillian Lee, a natural language processing expert at Cornell University in Ithaca, New York, who was not involved with the study.

David Traum, a language researcher at the University of Southern California in Marina del Rey, says that getting people to agree about what constitutes sarcasm from single utterances with little context is difficult. “Really all we can say is that for these cases computers are about as good as people at agreeing with other people about what is sarcastic.”

The research was presented at the International AAAI Conference on Weblogs and Social Media in Washington DC this week. The tool could be used by marketers to track online public sentiment surrounding brands.