Skip to content

A twitter bot which generates pseudo-Shakesperean prose every 30 minutes

Notifications You must be signed in to change notification settings

genekogan/RobotShakespeare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

##Robot Shakespeare lives here!

##More info on the project

Source code for Robot Shakespeare, an automated twitter account which spits out some pseudo-Shakespeare every 30 minutes forever.

It works by using NLTK to analyze the complete works of one William Shakespeare and generate an n-gram model, i.e. a word-to-word transition probability model. It then generates snippets of occasionally beautiful prose by doing a random walk on the text using a Markov Model.

If you want to run it, you need NLTK to analyze and generate text, and tweepy to tweet. And you need your own twitter account/bot because this one is busy...

How to make your own twitter bot

This is well documented, but to create a twitter bot, you need to create a twitter account, then setup an application on Twitter devwith OAuth protocol. This link explains it pretty well minus the node.js stuff. Once you have the access token, you can very easily setup a python script which tweets to your new bot using tweepy.

Also handy... if you wish to let your script run indefinitely without generating a massive log file, you need to nohup it before you close your ssh session:

nohup python main.py  > /dev/null 2>&1&

About

A twitter bot which generates pseudo-Shakesperean prose every 30 minutes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages