Banksy Cheltenham Mural Pokes Fun at GCHQ
The mural which appeared on the wall of a house in Cheltenham on Saturday night has been credited to street artist Banksy, and pokes fun at the spying of GCHQ agents.Robin Gunningham/Facebook

The United States Department of Homeland Security has attracted ridicule by advertising for programmers to devise software that can tell when tweets and other social media postings are sarcastic – or something potentially more sinister.

The potentially lucrative contract was advertised on a government website, Federal Business Opportunities, and explicitly stipulates that the software should have the "ability to detect sarcasm and false positives".

Security agencies around the world monitor ever-increasing volumes of web traffic and social media "chatter", and are trying to become more sophisticated in how they decide whether someone's comments could potentially affect national security or simply be joking.

In 2010 UK citizen Paul Chambers was found guilty of "menacing electronic communication" when he jokingly tweeted that Robin Hood airport should be blown up. Supported by a number of celebrities including Stephen Fry and Al Murray, he appealed at the High Court and his conviction was quashed.

Although widely ridiculed for the sarcasm-detecting scheme – one online commentator, perhaps sarcastically, said the scheme was "totally going to work", agency spokesman Ed Donovan defended the concept, telling the Washington Post: "our objective is to automate our social media monitoring process. Twitter is what we analyse. 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."

Paul chambers
Paul Chambers's appeal against his conviction for a joke text was upheldReuters

However, even human beings sometimes struggle to know when someone's tweet is serious or just silly, so devising software to ascertain when someone is being sarcastic may prove difficult. When comedy legend Steven Wright said, "I'd kill for a Nobel Peace Prize", he was of course joking – but would a computer program get it?

US security services have come under increasing scrutiny since revelations emerged – many of them by former spy Edward Snowden - about the scale of surveillance operations. Mobile phone group Vodafone reports that it faces thousands of requests from government agencies to hand over personal information about phone usage, and has called for increasing transparency and urged legislative reform.