Menus Subscribe Search

Follow us


The World Wide Web

secret-service

(Photo: David Stuart Productions/Shutterstock)

Can We Really Detect Sarcasm With a Machine?

• June 17, 2014 • 10:00 AM

(Photo: David Stuart Productions/Shutterstock)

What was once the domain of literary critics has now become the world of the Secret Service.

Eyes rolled a couple of weeks ago when the Secret Service posted a work order for new social media analytics software. Not because the law enforcement agency tasked with protecting the president and other federal officials lacks a social media presence, but because among the 22 functionality requirements for the software was the “ability to detect sarcasm and false positives.”

Edwin M. Donovan, deputy assistant director of the Secret Service’s Office of Government and Public Affairs, emphasizes that sarcasm detection is only one of many requirements. “It’s so you don’t have to sift through thousands of tweets,” he says. “We want to streamline, to automate the social media monitoring process. Not just for sarcasm.”

“Right now, if there were suddenly 200 tweets about something on D Street near the Capitol, we’d want to be able to synthesize that.”

Donovan says that assessing large volumes of messages has been a problem for the Secret Service, which in the past has borrowed the analytics tools of other agencies, like FEMA. “It’s an issue that’s come up before, and we don’t want to waste time sifting through messages.”

“Right now,” Donovan says, “if there were suddenly 200 tweets about something on D Street near the Capitol, we’d want to be able to synthesize that.” The agency wants to be able to monitor its own presence on social media, but also track trending topics and influential users.

“Remember the purple tunnel of doom?” Donovan asks, referring to the debacle during the 2009 presidential inauguration when thousands of attendances with purple tickets were caught in the Third Street Tunnel, unable to cross 395 to attend the event. “We weren’t monitoring Twitter that day, so we didn’t know. Since then, we’ve entered social media.”

The Secret Service (@SecretService) joined Twitter in February of 2010. The account has posted only 572 tweets, but is followed by 110,000 users. And it’s not the only governmental agency interested in assessing the tone of other users. Last summer, the BBC reported that the French company Spotter provided such an analytics tool to the British Home Office, the European Union Commission, and Dubai Courts.

For around $1,675 per month, Spotter provides software that “uses a combination of linguistics, semantics and heuristics to create algorithms that generate reports about online reputation.” Determining whether users are genuinely complaining or sincerely threatening a government agency is difficult, but Spotter claims an 80 percent accuracy rate and offers the service in 29 languages.

But how does software accomplish a task that is difficult even for sentient beings? Even the most casual of correspondents has had a text message or email misunderstood by its recipient. Without the aid of eye rolls or shoulder shrugs, textual sarcasm can be difficult to detect. The science of sincerity, or sarcasm if you’re a glass-empty type, is critical for law enforcement agencies, but also profitable for corporations seeking to improve their customer service. Understanding whether a reviewer sarcastically praised your product or honestly questioned your services is critical.

So what used to be the domain of literary critics has become a novel problem for software designers. A 2010 paper by three researchers at Hebrew University presented a sarcasm algorithm with a 77 percent precision rate. Developed through an analysis of 66,000 Amazon product reviews, the algorithm was able to detect the situational irony of titles (“[I] Love the Cover” for a book review and “Where Am I?” for a GPS device) and sarcastic patterns in speech and punctuation (sentence length, multiple exclamation or question marks in sentences, and the number of words with all capital letters among others).

But Amazon reviews have many words. In a 2011 paper, three researchers at Rutgers’ School of Communication & Information were much less successful at identifying sarcasm on Twitter, which is limited to 140-character tweets. Tweet length as well as the lack of context made assessing tone very difficult, for machines but also humans. Even with the assistance of Twitter tics like emoticons and hashtags, the human judges and the machines demonstrated only 70 percent accuracy when distinguishing sarcastic tweets from positives or negative tweets.

But that was 2011, and with companies like Spotter already reporting 80 percent accuracy, the Secret Service will likely find more bids than it needs. Donovan expressed some sarcasm of his own when I asked about how they will measure the actual accuracy of whichever software they purchase. “That’s a great question,” Donovan says, “for the companies that make these claims.”

Casey N. Cep
Casey N. Cep is a writer from the Eastern Shore of Maryland. She has written for the New Republic, the New York Times, the New Yorker, and the Paris Review. Follow her on Twitter @cncep.

More From Casey N. Cep

A weekly roundup of the best of Pacific Standard and PSmag.com, delivered straight to your inbox.

Recent Posts

October 31 • 4:00 PM

Should the Victims of the War on Drugs Receive Reparations?

A drug war Truth and Reconciliation Commission along the lines of post-apartheid South Africa is a radical idea proposed by the Green Party. Substance.com asks their candidates for New York State’s gubernatorial election to tell us more.


October 31 • 2:00 PM

India’s Struggle to Get Reliable Power to Hundreds of Millions of People

India’s new Prime Minister Narendra Modi is known as a “big thinker” when it comes to energy. But in his country’s case, could thinking big be a huge mistake?


October 31 • 12:00 PM

In the Picture: SNAP Food Benefits, Birthday Cake, and Walmart

In every issue, we fix our gaze on an everyday photograph and chase down facts about details in the frame.


October 31 • 10:15 AM

Levels of Depression Could Be Evaluated Through Measurements of Acoustic Speech

Engineers find tell-tale signs in speech patterns of the depressed.


October 31 • 8:00 AM

Who Wants a Cute Congressman?

You probably do—even if you won’t admit it. In politics, looks aren’t everything, but they’re definitely something.


October 31 • 7:00 AM

Why Scientists Make Promises They Can’t Keep

A research proposal that is totally upfront about the uncertainty of the scientific process and its potential benefits might never pass governmental muster.


October 31 • 6:12 AM

The Psychology of a Horror Movie Fan

Scientists have tried to figure out the appeal of axe murderers and creepy dolls, but it mostly remains a spooky mystery.


October 31 • 4:00 AM

The Power of Third Person Plural on Support for Public Policies

Researchers find citizens react differently to policy proposals when they’re framed as impacting “people,” as opposed to “you.”


October 30 • 4:00 PM

I Should Have Told My High School Students About My Struggle With Drinking

As a teacher, my students confided in me about many harrowing aspects of their lives. I never crossed the line and shared my biggest problem with them—but now I wish I had.


October 30 • 2:00 PM

How Dark Money Got a Mining Company Everything It Wanted

An accidentally released court filing reveals how one company secretly gave money to a non-profit that helped get favorable mining legislation passed.


October 30 • 12:00 PM

The Halloween Industrial Complex

The scariest thing about Halloween might be just how seriously we take it. For this week’s holiday, Americans of all ages will spend more than $5 billion on disposable costumes and bite-size candy.


October 30 • 10:00 AM

Sky’s the Limit: The Case for Selling Air Rights

Lower taxes and debt, increased revenue for the city, and a much better use of space in already dense environments: Selling air rights and encouraging upward growth seem like no-brainers, but NIMBY resistance and philosophical barriers remain.


October 30 • 9:00 AM

Cycles of Fear and Bias in the Criminal Justice System

Exploring the psychological roots of racial disparity in U.S. prisons.


October 30 • 8:00 AM

How Do You Make a Living, Email Newsletter Writer?

Noah Davis talks to Wait But Why writer Tim Urban about the newsletter concept, the research process, and escaping “money-flushing toilet” status.



October 30 • 6:00 AM

Dreamers of the Carbon-Free Dream

Can California go full-renewable?


October 30 • 5:08 AM

We’re Not So Great at Rejecting Each Other

And it’s probably something we should work on.


October 30 • 4:00 AM

He’s Definitely a Liberal—Just Check Out His Brain Scan

New research finds political ideology can be easily determined by examining how one’s brain reacts to disgusting images.


October 29 • 4:00 PM

Should We Prosecute Climate Change Protesters Who Break the Law?

A conversation with Bristol County, Massachusetts, District Attorney Sam Sutter, who dropped steep charges against two climate change protesters.


October 29 • 2:23 PM

Innovation Geography: The Beginning of the End for Silicon Valley

Will a lack of affordable housing hinder the growth of creative start-ups?


October 29 • 2:00 PM

Trapped in the Tobacco Debt Trap

A refinance of Niagara County, New York’s tobacco bonds was good news—but for investors, not taxpayers.


October 29 • 12:00 PM

Purity and Self-Mutilation in Thailand

During the nine-day Phuket Vegetarian Festival, a group of chosen ones known as the mah song torture themselves in order to redirect bad luck and misfortune away from their communities and ensure a year of prosperity.


October 29 • 10:00 AM

Can Proposition 47 Solve California’s Problem With Mass Incarceration?

Reducing penalties for low-level felonies could be the next step in rolling back draconian sentencing laws and addressing the criminal justice system’s long legacy of racism.


October 29 • 9:00 AM

Chronic Fatigue Syndrome and the Brain

Neuroscientists find less—but potentially stronger—white matter in the brains of patients with CFS.


October 29 • 8:00 AM

America’s Bathrooms Are a Total Failure

No matter which American bathroom is crowned in this year’s America’s Best Restroom contest, it will still have a host of terrible flaws.


Follow us


Levels of Depression Could Be Evaluated Through Measurements of Acoustic Speech

Engineers find tell-tale signs in speech patterns of the depressed.

We’re Not So Great at Rejecting Each Other

And it's probably something we should work on.

Chronic Fatigue Syndrome and the Brain

Neuroscientists find less—but potentially stronger—white matter in the brains of patients with CFS.

Incumbents, Pray for Rain

Come next Tuesday, rain could push voters toward safer, more predictable candidates.

Could Economics Benefit From Computer Science Thinking?

Computational complexity could offer new insight into old ideas in biology and, yes, even the dismal science.

The Big One

One town, Champlain, New York, was the source of nearly half the scams targeting small businesses in the United States last year. November/December 2014

Copyright © 2014 by Pacific Standard and The Miller-McCune Center for Research, Media, and Public Policy. All Rights Reserved.