The Mansfield Reporter is a simple device which can generate new text from some of history's greatest authors. By pressing the red button, you will be shown a new passage from either Friedrich Nietzsche, William Shakespeare, or Gertrude Stein. Or, press the black button to combine all of the authors into one super-author, and generate a unique passage from their combined corpus of text.
The device digests a piece of literature by one of the authors, and builds a model of the words used in the text. A sentence is then created through a semi-random process where the next word is generated only based on the probability of it occurring after the current word. This process is called Markov chaining, and the implementation used here is the Markovify library, developed at BuzzFeed.
In this instance, all of the (python) code is running on a tiny Raspberry Pi, displaying through a tft screen from Adafruit. Using the Pillow image manipulation library, the device breaks the sentence into one-word chunks, and uses a randomly selected image from my set of Polaroid photographs as a background. So, what you eventually see is a combination of the random words and text, compiled in the moment. The system is flexible enough that the output could be an animated gif, or a large wallpaper size image, like this one from Shakespeare:
The interesting thing, for me, is how the generated text moves between deep philosophical insight, and complete nonsense...and sometimes the device produces text where it is impossible to tell which is which. Also, while the device creates new ideas from old text, it is limited by the tendencies of the author's voice. The result is fascinating in how it uncovers, or disfigures, the original work of the author.
Would you like to have the source-code for this artwork? It is all yours, but I am bit self-concious of my programming abilities. So, while I haven't posted the code publicly yet, if there interest I definitely will.
Subscribe to Max Lupo
Get the latest posts delivered right to your inbox