Cornell University created a self-learning system for defining sarcasm on the Web.
A team of students from Cornell University, participating in the Tech Challenge program, has developed a self-learning application that can recognize sarcasm. The service application, called TrueRatr, is a joint development of Cornell Tech and Bloomberg. The project itself was made in order to learn how to automatically identify sarcasm in reviews of various products.
But you can use the development for other purposes, good, it's open source. The development team includes MBA candidates, engineers, and designers. The developers claim that it was very difficult to teach a car to determine sarcasm. Previously, such attempts were made, but to define sarcasm on phrases like “yeah, right”, punctuation or other similar features is not the best solution.
After a detailed discussion , it was decided to learn to look for words in the text that carry both negative and positive meanings. All of them must be within the same phrase. An example would be “I love getting yelled at”, where “I love” carries a positive context, and “getting yelled at” a negative one. The whole phrase with a high degree of probability will be marked by the system as sarcasm.
After using this method, the accuracy of the algorithm increased to 71%. This, of course, is not enough, but it is still significantly higher than just tossing a coin, as the project manager himself put it. To improve the accuracy of the algorithm, the developers made it self-learning. And it worked, the algorithm became even more accurate, the efficiency indicator increased to 75%. By the way, people define sarcasm much worse.
')
After that, it was decided to test the operation of the algorithm in practice - in the annex to reviews of Mac OS X and iOS programs. The service analyzed the reviews posted on the Apple App Store, and removed those that considered sarcasm. If desired, the user could view the rating of reviews, highlighting the most sarcastic. Accordingly, the authors of such reviews and evaluation of applications put not the highest. If you remove these reviews, the rating of the application increases. True, not always. In the case of Grand Theft Auto: Chinatown, from which page the reviews were hidden with sarcasm, the app's rating dropped from 4.5 to 3.9.
In general, for now, one can doubt that using TrueRatr to detect sarcasm reviews is the best application for the development. But if you want, the algorithm can be used in your own projects.