Recognizing Sarcasm with Computer Algorithms

The pursuit of machine intelligence means we have to come up with ways to communicate with our computers in a way both entities can understand. But while computers process verbal commands in a straightforward fashion, humans tend to use more sophisticated speech forms, employing slang or symbols to convey an idea. So an Israeli research team has developed a machine algorithm that can recognize sarcasm.

SASI, a Semi-supervised Algorithm for Sarcasm Identification, can recognize sarcastic sentences in product reviews online with pretty astounding 77 percent precision. To create such an algorithm, the team scanned 66,000 Amazon.com product reviews, with three different human annotators tagging sentences for sarcasm. The team then identified certain sarcastic patterns that emerged in the reviews and created a classification algorithm that puts each statement into a sarcastic class.

The algorithms were then trained on that seed set of 80 sentences from the collection of reviews. These annotated sentences helped the algorithm learn what sorts of words and patterns distinguish sarcastic remarks – those that mean the opposite of what they literally convey, or that convey a sentiment inconsistent with the literal reading.

They then turned the algorithm loose on an evaluation set. Pattern evaluation efficiency scored accurately 81 percent of the time, while the overall precision of the pattern recognition/sarcasm categorizing algorithm was accurate in 77 percent of instances. Not bad for a computer’s first shot at interpreting the human sense of humor.

This isn’t all just so your Roomba gets the joke when you tell it it sucks. Computer programs that can recognize sarcastic statements could generate better personalized content and make better recommendations to human users by not mistaking a product review titled “keep your receipt” with a sound piece of online shopping advice. It could also benefit opinion-mining systems that troll the Web trying to measure public sentiment about a product or idea.

[Hebrew University via Slashdot]

22 Comments

This is so stupid.
Recognize the sarcasm in that.

That's a really useful invention, just imagine the possibilities!

lol kryo...no way that algorithm can sense the sarcasm in your comment!

End of problems for Sheldon Cooper

I'm pretty sure I don't even get sarcasm 77% of the time, so good job computer!

I think the roomba joke might fall more pun than sarcasm. just sayin'

77%? I can get 50% flipping a coin....

Ooh, a sarcasm detector. Oh, that's a real useful invention.

Have it test this:

"'Two and a Half Men' is the best show ever!"

So, did it work?

Who knew that an article about sarcasm would draw so many relevant comments. Pavlov has no idea what he was talking about.

Wow, a sarcasm machine, that's real useful.
-my god, the readings are off the chart!

No different than face recognition, face recognition and this supposedly lexical pattern scanner rely on the same concept on using mass tables of information; face recognition software uses lengthy pre-built image maps to perform image comparing, common ones use comparison algorithms similar to wave form data processing. In this case it's much more simpler with a sarcasm detector. The content of what the analyzer learns is just a long array of data that describes unique patterns contradictory sets of clauses. That's my speculation on how it would be done. Ultimately, nothing magical. Genuine idea, common concept.

In the past century we've gone from 'the brain looks like this' to knowing it physical parts and most what they do. The same advances will be carried over into the process of thinking. The end game bringing a through understanding of how we form thoughts. It'll be accomplished by mid-century if not much sooner.

As with all advances in our species, good things are used for 'wrong' purposes. The 'Thought Police' are coming. You'll probably get yours through a software update to your phone.

When I read this, I immediately pictured Leonard Hofstadter lifting up a sarcasm sign for Sheldon Cooper. The Big Bang Theory is just the worst show ever imagined. It's ridiculous how bad that show is.

xavm

from Beijing, Beijing

What they need is a human control group.

That's pretty unique. Intresting that it has such good efficiency at recognizing sarcasm. To the guy that said "and two and a half men is the best show ever" if it would be sarcasm or not I would think the computer would see it as not being sarcasm BUT if it reads the entire sentence with something like "I bet you also think two and a half men is the best show ever right?" than maybe it reads it as sarcasm...

Water softener info: www.watersoftenersalt.net

You gotta love them Jews.

This is a wonderful article. The things given are unanimous and needs to be appreciated by everyone.
-------------
david wilson

Measureing public sentiment about a product or idea is a very good idea. And that makes me think. Why don't search engines registrer how many times products and websites are mentioned in connection with some negative words like (s...) and some positive words like (good)That could work as som kind of product and website word association library.TV

Live long and prosper friends.

This is more important than it seems, naysayers.

If true AI is ever developed, the ability to discern what a humans means beyond a statement is an important quality. In other words, the AI needs to be able to "read between the lines". It doesn't mean much now, but it could be very important in the future.

oh, a sarcasm detector. Oh, that's a real useful invention.

http://www.fmheroes.com/


138 years of Popular Science at your fingertips.



Download Our iPhone App

Stay up to date on the latest news of the future of science and technology from your iPhone with full articles, images and offline viewing



Follow Us On Twitter

Featuring every article from the magazine and website, plus links from around the Web. Also see our PopSci DIY feed



Become a Fan On Facebook

Share links with friends, comment on stories and more


September 2010: The College Issue

This month, a look at the future of secret warfare, the dangerous search for Afghanistan's mineral wealth, a backyard flamethrower, and the most amazing college labs.

Read the issue here.

circ-top-header.gif
circ-cover.gif


Editor: John Mahoney | Email
Associate Editor: Paul Adams | Email

Contributing Writers:
Clay Dillow | Email
Rebecca Boyle | Email