Digital Writing with Python Assignment 4: Generative Facebook Status Updater

July 29, 2009

Our assignment this week was to write a Python program that extracts web text to provide input to a text generation/mungeing algorithm and generate a new remixed text.

I've had this fantasy lately about writing a Facebook status update generator that would spit out quirky updates that might inspire comments and relieve me of posting on a regular basis.

I was unable to find an RSS feed of other peoples' status updates; evidently, Facebook used to offer this, but now only lets you access your own. Thus, I linked to a live RSS stream of my own status data, exempted articles and pronouns to give the status some structure, and then randomly replaced unexempted words from word lists I found online. The result wasn't bad. I still have a long way to go, but I definitely did get some pithy updates out of it:

Chris Jennings: First bunch of wires my energy
Chris Jennings: First eliminator of chemistry my girl
Chris Jennings: Facebook: servo for trackers
Chris Jennings: Facebook: bundle for beans
Chris Jennings: BBC storms that Sartre was NOT a deserters
Chris Jennings: is knotting the mops to Apollo paces
Chris Jennings: First huts of meat my concern
Chris Jennings: is supervising the pans to Apollo scheduler
Chris Jennings: steaming tray
Chris Jennings: is encountering the slate to Apollo scabs
Chris Jennings: Facebook: guns for chamber
Chris Jennings: just warehousing a permit recruits in Atlantic City: gross
Chris Jennings: has just concatenated his cheated solvent to the ensured cruises of an Indian ensign conspiracy
Here is a look at the code:



0 comments: