Algorithm detects sarcasm in product reviews -

It can often be a touch difficult to tell when someone's being sarcastic, particularly if you're an American.

So an Israeli team has come up with a computer algorithm to relieve us of that onerous burden.

The Semi-supervised Algorithm for Sarcasm Identification. SASI - brilliant name, or what,  can apparently recognise sarcasm with 77 percent accuracy.

And mathematicians Oren Tsur, Dmitry Davidov and Ari Rappoport of the Hebrew University would like to see it included in reviews summarisation systems and ranking systems in future.

The team curled up at bedtime with 66,000 Amazon product reviews and a nice milky drink. They categorised 80 sarcastic patterns in the reviews, and then trained their algorithm on those particular sentences.

Examples include "All the features you want – too bad they don’t work!"; "Well, you know what happened. ALMOST NOTHING HAPPENED!!!" and "Silly me, the Kindle and the Sony eBook can’t read these protected formats. Great!".

To refine the algorithm, the researchers focused on pattern-based and syntactic features - that's sentence structure, for all you geniuses out there. These included sentence length, number of '!'s and '?'s and the number of CAPITALISED words.

Through repeated tweaking, they refined the algorithm to achieve the 77 percent hit rate.

The authors also speculate on the reasons for sarcasm. Apparently the products most likely to draw sarcastic reviews were Shure and Sony noise cancellation earphones, Dan Brown’s Da Vinci Code and Amazon’s Kindle e-reader. Now, there's a surprise.

They suggest that factors include the popularity and price of a product. Also, they say, "The simpler a product is the more sarcastic comments it gets if it fails to fill its single function - ie noise blocking/cancelling earphones that fail to block the noise".

"We speculate that one of the strong motivations for the use of sarcasm in online communities is the attempt to 'save' or 'enlighten' the crowds and compensate for undeserved hype."

Read the full report here. It's thrilling, honest.