Automatic Poetry

I've been playing with generating poetry using spreadsheet formulae for a year or more.

why produce automatic poetry?  I encourage you to read up on John Cage and Chance Operations

Coming from a software development background, I have an uncomfortable relationship with the idea of anything automatic.  The work that goes into a button you can push to automagically do something, is often complex and subject to variation.

Automating anything to do with the english language implies even more complexity.  The language, in a word, is irregular - making it beautiful and a major pain to codify.

Here's how I approached "automatic poetry".

  1. provide input to the spreadsheet about the structure of a poem.
  2. provide data  that the spreadsheet can use to construct its own poem.
To me, the logical units of a poem are the words.  Each word contributes to a line in a poem by acting as a part of speech. 

It's probably important to note here for the reader, that I don't even consider meter or rhyming in creating automatic poems.  That's outside of my interests and would involve a fairly daunting alignment on syllables and phonetics.  

the input I provide to the spreadsheet on structure is in the form of a poem broken down into words/parts of speech.  Every poem has a different sequence of words acting as different parts of speech.

for instance the line:

     Mary had a little lamb

can be viewed as the following sequence of parts of speech:

    [Proper Noun - subject] [verb - aux] [article] [adjective] [noun-object]

Because there are a vast number of possible combinations of words that might produce a poem, I apply this automation for multiple structures that I pull from favorite poems. 


The next, most laborious, step is to collect and curate replacement words that can be "randomly" drawn upon as alternative words to fit into the structure.

In short, I collect hundreds of words, store them in the spreadsheet in columns labeled with the part of speech.  

I have several tabs of parts of speech.  Nouns, verbs, adjectives, adverbs, pronouns, etc.  Each tab, contains many columns.  each column representing a wide variety of variations on a particular part of speech.  Verbs are particularly numerous, as I found factors like tense, plurality, transitivity, action, and context weigh heavily in producing more pleasing "automatic" poems.

For each part of speech I have two column. The first column is a raw list of all the words I've gathered.  The second column draws on the first using a formula that select a random word from that column. I apply a formula to the second column to populate is with 25 random words for each part of speech.


note: all formulae apply to Google sheets

bringing data into the structure

the last step is to bring the words into the structure of the poem. Here I create formula that draw from the part of speech tabs the randomly curated word.


Finally I aggregate the words into lines so I can cut and paste them into a plain text editor.

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LOWER(CONCATENATE(A1," ",B1," ",C1," ",D1," ",E1," ",F1," ",G1," ",H1," ",I1," ",J1))," ,",",")," .",".")," ?","?")

The results are not always pretty and are subject to some pretty dramatic editing before I might consider submitting to a journal. But it is a new and interesting way to start a poem. 


Popular posts from this blog

Faces - Experimenting With Portrait Prints