Can a Computer Detect Sarcasm?

Sarcasm is a great way to take the edge off of criticism or to tell the world you aren’t exactly happy about something. When we are using verbal language, it’s usually fairly easy to detect sarcasm. It’s another matter completely when we attempt to get our point across in text. It’s easy for someone to take things the wrong way online because it’s impossible to read intended meaning. We have a few ways to combat this problem, including actually placing a disclaimer within our comment stating that we are being sarcastic.

Doing this isn’t always possible, though. How, then, are we supposed to know for sure? Why can’t our computer just tell us when sarcasm is detected? A slew of researchers are attempting to help. They have developed a computer program that can identify sarcasm in online environments with about an 80% accuracy. There’s obviously still a long way to go before computers can correctly understand all the subtleties of humor. This new research might just help companies sort through comments about products and services to find out what their customers really think.

The program uses a strategy called “machine learning,” and detects sarcasm by analyzing patterns of phrases and punctuation often used to indicate irony. Starting out, the researchers fed the computer 80 sarcastic sentences and a few thousand non-sarcastic sentences grabbed from Amazon user rewviews. Sarcastic comments included: “Trees died for this book?” and, for a smart phone: “All the features you want — too bad they don’t work!” The program analyzed all of the sentences and created several hundred patterns that it then used to evaluate a total of 66,000 reviews. Each review contained an average of fifteen sentences. One of the patterns it figured out, for example, was that sentences that start with “I guess” and end with an ellipsis are often, though not always sarcastic.

To test the program out, the team gave two hundred of the same product reviews to three independent reviewers. Results showed about an 80% agreement between computers and humans when trying to detect sarcasm in the written words. Research like this may well lead to very important advances in artificial intelligence. Who needs monkeys, anyway?