The Secret Service is looking to buy software that can spot sarcasm on social media.

Yeah, good luck with that.

The agency wants to buy software that, among other things, has the ability to "detect sarcasm" and language that may mean something different than it appears on first glance.

Government agencies and corporations have long used social media to try to influence the public and get their messages out, while law enforcement agencies increasingly monitor such sites for signs of trouble.

But getting a computer to detect sarcasm and its linguistic complexities can be difficult — and some experts worry at the prospect of attempts to parse speech by a government agency that has the power to arrest people for posting alleged threats online.

"It does appear that it's going to be a pretty broad monitoring program. It will likely sweep in some First Amendment protected expression," said Ginger McCall, associate director of the Electronic Privacy Information Center (EPIC).

"It is troubling, because it really stifles people's ability to freely express themselves and it has a tendency to quell dissent to make people think twice before they express themselves online."

The Secret Service request for the software, first reported by nextgov.com, was posted Monday. The agency is accepting proposals until Monday.

The work order asks for a long list of specific tools, including the ability to identify influential figures on social media, analyze data streams in real time, access old Twitter data and use heat maps. (It also wants the software to be compatible with the five-year-old Internet Explorer 8 browser — a sign of the government's outdated technology.)

Secret Service spokesman Ed Donovan said the request would allow the agency to create its own system for monitoring Twitter — both its own presence in social media and important issues that are trending on the social network. Detecting sarcasm is just a small feature of the effort, he said.

"Our objective is to automate our social media monitoring process," Donovan said.

"Twitter is what we analyze. This is real-time stream analysis. The ability to detect sarcasm and false positives is just one of 16 or 18 things we are looking at."

Donovan said the software would find topics trending on Twitter that are important to the agency, such as in 2009, when some ticketholders for the presidential inauguration in Washington were trapped inside a tunnel under the U.S. Capitol and unable to get through security gates. He said the agency currently uses the Twitter analysis program used by the Federal Emergency Management Agency, but needs its own.

The Secret Service has been dogged by controversy over its agents' behavior, particularly in overseas locales, including a prostitution scandal in Cartagena, Colombia, in 2012. It issued requests last month for media consultants to help agency leaders talk to the newsw media.

Companies use algorithms that attempt to detect sarcasm online or over the phone in measuring things such as customer satisfaction, said Lisa Sotto, a managing partner of Hunton and Williams in New York, who focuses on cybersecurity. Last year, French software firm Spotter said it had developed a tool that detects sarcasm for clients including the British Home Office and the European Commission.

Peter Eckersley, technology projects director for the Electronic Frontier Foundation, thinks the Secret Service effort will fail because computers can't grasp the nuances of language.

"It's difficult not to be sarcastic about the idea of the Secret Service automatically, algorithmically, examining all of your social media posts to determine, among other things, that you're being sarcastic," Eckersley said.

Sarcasm can also get you in trouble.

A Texas teenager was arrested last year after posting what he said was a sarcastic comment about shooting up "a school full of kids" on Facebook. A Twitter user was arrested in the Netherlands in April after tweeting what she claimed was a joke bomb threat to American Airlines.

In 2012, an Irish man and a British woman traveling together were taken into custody by Homeland Security agents at Los Angeles International Airport after the man tweeted that he planned to "destroy America" and that he planned to be "diggin' Marilyn Monroe up!" The man said "destroy" was slang for partying.

"There is a reason why they want to do this," Eckersley said. "There have been regular, tragically documented instances where a human being whose crime is being too funny winds up with a pile of agents pointing guns at them and arresting them because they made a joke."

EPIC sued the Department of Homeland Security, which oversees the Secret Service, for records on its social media monitoring efforts in 2011. The documents showed that analysts were instructed to create reports on certain "items of interest" found in social media searches, including policy directives and debates related to the department.

A House panel also held hearings after it was revealed that analysts combed Facebook and other social media sites for public sentiment about transferring Guantanamo Bay detainees to a prison in Michigan. McCall of EPIC said the agency updated its social media monitoring program after the lawsuit.

Snarky talk about politics or political figures can be extremely hard to discern because it is not immediately identifiable as positive or negative, said Gilad Lotan, chief data scientist at Betaworks, a start-up and venture capital company.

"Especially with these charged topics, people can be ironic, sarcastic and that throws all of the classification algorithms," Lotan said. "It makes it very hard to automate these systems."

Eckersley said many people treat Twitter as a public forum, but they think that Facebook is a forum for friends and family.

"It's kind of having a cop at your dinner table all the time," he said of the search for sarcasm, "and that cop isn't in on your jokes."