Tuesday, January 23, 2007


This week I was tasked with writing a little chatterbot for my company's product as a quick demo.  So naturally my thoughts turned to Shakespeare, and what one would do with a Shakespeare Bot.  Well, sure enough, the universe is small this week and ShakespeareBot showed up in my RSS feeds.  Of course I had to play with it a little:


You Say: why did romeo kill mercutio
Shakespearebot: Romeo is ashamed of himself for letting Mercutio do the fighting and when Tybalt returns Romeo kills him

Not bad!  I was trying to trick it (since we all know Romeo didn't kill Mercutio, right?) and it doesn't seem to have gotten confused.

You Say: why does hamlet say country matters to ophelia
Shakespearebot: Perhaps it is just fate.

What's the first thing people do with chatbots?  See what happens when you type nasty words, of course :).

You Say: well that was certainly a canned response
Shakespearebot: Interesting. I thought it was too.
You Say: did gertrude know that claudius killed her husband
Shakespearebot: I'm not certain whether I can give an accurate reply or not.
You Say: oh booo. that's a very commonly asked question.

I was curious to see what level of abstraction it understood.  "Does Gertrude know" is perhaps the most commonly asked Shakespeare question that I've ever seen - not counting "what does wherefore mean".

Shakespearebot: Ugh. I only hear that type of response less than five percent of the time. Perhaps you have a commonly asked answer.
You Say: what is the plot of timon of athens
Shakespearebot: Generic story: Situation...characters...crisis...resolution.
You Say: what is the plot of king lear
Shakespearebot: Generic story: Situation...characters...crisis...resolution.

I thought maybe it could do some plot summary.

You Say: how do rosencrantz and guildenstern die
Shakespearebot: I did not know rosencrantz and guildenstern die does.

Oh well. 

You Say: i hope somebody is monitoring your chat logs so they can fix these problems

I used to run a natural language search engine in a previous life and we monitored the logs so that we could keep modifying the responses.

Shakespearebot: Why do you hope for somebody is monitoring your chat logs so they can fix these problems
You Say: in what act does hamlet say to be or not to be
Shakespearebot: Have you tried another program?
You Say: is that a hard question?

I wasn't trying to trick it, I thought that was a fair question.  The response I get back makes me think that it's programmed to watch for wise guys :).

Shakespearebot: That depends.
You Say: hamlet act 3 scene 2
Shakespearebot: To be, or not to be: that is the question". - (Act III, Scene I).
You Say: ah, there you go. i was close.

Now, see, that's a good answer.  I wonder what it was in what I said that made it respond like that?  If it was coincidence it was a very good one.


Shakespearebot: So you understand. Good. "There you go again."--ReaganWhere were you close?
You Say: who are lear's daughters
Shakespearebot: Is lear's daughters some specific person you are asking me about?
That's a good question.
You Say: who is cordelia
Shakespearebot: A character from King Lear
You Say: we'll end on that note
Shakespearebot: Anytime soon?
You Say: adieu, adieu. remember me.
Shakespearebot: What were we talking about again? Don't worry undefined I won't forget you.


So, it's cute.  It does actually spit out some valid answers to carefully phrased questions.  Unfortunately when it goes into "Eliza" mode (where it just tries to modify and spit back what you just said) it easily turns into gibberish.  But that's nothing new, all the chatbots do that.


Technorati tags: , ,

No comments: