Certain pragmatic jobs in language seem so human that we feel like computers could never begin to approach them. Recognising sarcasm is one of these. How could you get a computer to recognise that a speaker is intending the opposite of what their words are saying, particularly if it’s very subtle?
Of course, words aren’t enough when you’re recognising sarcasm. We also need real-world knowledge, and an idea of what words to expect in a situation. Let’s say the dentist tells Fred he needs a root canal, and Fred says, “Great.” We know it’s sarcasm because we know that root canals aren’t very fun, and Fred isn’t likely to look forward to it.
We can’t tell that to computers (although some have tried), but we can use other information. For this project, they used the number of stars in the Amazon review. If it was a poor review (one to three stars), the appearance of words like ‘great’ are likely to be used sarcastically, especially if the word “can’t” appears first.
This is what I love about Computational Linguistics. We can get a start on even the hardest problems with a well-crafted experiment. The meaning is already there in the words we use. All we need is that little bit of extra information to tell the system that something extra is happening.