Chatbot: Scholar Edition

Ok here’s one that could probably be built in Python in less than a day, especially by recycling some code from my man Hamilton Ulmer’s hilarious rhymeless poem generator.  Here’s the idea for the chatbot:

  • I create a list of GChat friends to ‘prank chat’.
  • When one of those friends updates his status message (to something more interesting than just ‘Away’), the bot will use the message as a query on Google Scholar.
  • A random article will be selected from the search results.
  • The article will be parsed and fed into a Markov text model.
  • At random intervals between 30 seconds and 2 minutes, the bot will generate a random sentence and chat it to the ‘pranked’ friend.

Sound stupid?  Yeah.  But imagine the great conversations that could take place:

whiteknight415 updated status: ‘finally going home for the night’
SKYNET (me): Social learning involves learning how to perform a behavior, through imitation, and when to perform it, through social facilitation.
whiteknight415: dude this is skynet isnt it

The twist I’d really like to implement is to build the Markov model backwards – that is, instead of having previous words determine future words, do the reverse.  You could then have the system ask questions by forcing the sentence to end with ‘is it’, ‘was it’, or simply a question mark.  Without that much work, the bot could have somewhat meaningful conversations with its victims.

It seems like this must have been done by some other enthusiast already.  Time to go do some research.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s