I'm currently building a fun script, that basically matches given phrases and gives a predefined response based on the match-points. You can ask it to retrieve some information based on live feeds, run tasks, tell anecdotes or just chat with her.
I already have built-in detection for badwords, caps lock or both. The program has a girl name and I tried to make as close to being a girly-girl as possible, on the logic terms (for example: everybody knows that most girly-girls take 700ms to respond to a question, joking of course). So here is a little example:
Client: WHAT IS YOUR PROBLEM?
Kiku: DONT USE THAT TONE WITH ME!
Client: #### you
Kiku: why are you being so mean to me :/
However, I really would like to add sarcasm-feature to it. So if you write something in sarcasm, then she will detect it and respond accordingly. Now this is a tricky part, How do you teach a script, what sarcasm is?
To me more specific. What are the most common sarcastic words used today? Or how to get that statistic? How can I make the script understand the context of the given phrase?
As this question is getting alot of hype, I think things should be cleared out a bit more. It is very clear, that making a script fully detect sarcasm is basically impossible. At least in reasonable matter. However, I do believe that some amount of possible sarcasm could be detected.
I currently have made it so far, that my script can detect a very limited sarcasm. I predefined some common sarcastic-words (however, alone they are useless.) For example: like, whatever, yeah, right and great. And then it first matches, the simple things, like uppercase and quoted:
THANKS you are so smart or
oh you are so "SMART".
Since the scripts main function is to do tasks or retrieve information, and afterwords it will ask if that was what you meant. Then I thought, adding "thanks" as a special variable. So
yeah thanks or
whatever thanks will trigger the possible sarcasm, and the script will ask you: "Do I detect sarcasm?" Your best bet would be to say "sorry" then, otherwise it will add a warning-point and if the limit is reached -- it will start ignoring you.
As these very very simple algorithms seem to actually work, then this idea has a future, of course after alot of tuning and tweaking. However, is somebody alot smarter would make a open-source software with the same idea in mind. Then this feature could be hooked to alot of functions on the web. Customer care would probably benefit the most, however, this kind of software could also be used detecting "flaggable"-content.