Skip to content

How text of digital found poem is generated

Digital found poem has grown into a very large random poetry generator over the years that I’ve been working on it. The code of the app is simple, but the task of seeding it with language that can be combined randomly to create “poetically possible” and interesting text has been a real headache. In fact, it’s probably nuts to think that you can pull tens of thousands of random words, phrases, and clauses into a computer program and combine them willy-nilly into anything resembling coherent poetic text.

This realization almost made me abandon the program. But then I thought, “What if I let go of the idea that the program has to be completely random and try to create some rules that get the words to go where I want them to? What if I add in some literary devices such as pattern repetition, allusions, personification, etc.? Could that make the text more attractive for others to interact with? And that’s what I finally decided to try. So today, digital found poem still puts pieces of text together randomly like a good old-fashioned random poetry generator. But the text also shows the “heavy hand” of the author. 

For a poetry generator to work, the first thing you have to do, of course, is fill it with language–the words, phrases, and clauses that the program will use to generate the poems. So for years I’ve been adding text that I encounter in my daily reading, that I hear in speech or on the radio, that I see on tv or on the internet, and so on. I also add lots of phrases and clauses that just pop into my mind, in addition to literary allusions that can spice things up.

The list of word that I might add on any given day might look as follows: 

  • drudgery
  • there are laws to obey
  • unearned
  • conditioned by
  • at the closing of the curtain
  • the pain on firstname’s face
  • emerge(s/ing/d)
  • contending with
  • you could’ve loved me
  • when i look in the mirror 
  • as the sea level rises
  • the difference between…and
  • pluralsubject refuses to see
  • i’ve tried to measure up
  • etc.

Note that on a scale from “happy to sad,” this list consists mainly of neutral or unhappy words. You don’t see words like “deeply in love,” or “happy faces,” or “i can’t wait to see you.” And this should be a hint that the poems generated by digital found poem will be pretty dark. And the reason for this is simply that if you try to mix the happy with the sad in a random way, it just doesn’t work. You’d get something like 

what anguish is here

              what ruthlessness

           as the sky erupts

                     we smile at each other

            overjoyed at the beauty all around

Now, digital found poem does use words like “love” and “friendship” and “beauty.” But only in the context that they are over, gone, and done with. So yes, the poems are dark. And now you know why.

The first thing I do any day I have time to work on digital found poem is to add the latest new language I’ve selected from outside sources or that I’ve thought up. Then I test whether the new additions seem to work coherently with what’s already in the program or whether they immediately clash. If they mainly work, I keep them. If not, I discard. And so “the world” of digital found poem keeps growing and growing.

Digital found poem works by having two types of lists. One type is the “data” lists that contain different categories of nouns, verbs, adjectives, adverbs, prepositions, conjunctions, phrases, and clauses. (This includes many lists found on the Internet, such as lists of common first names, common last names, names of trees, flowers, colors, birds, rivers, cities, musical groups, etc.) 

The other type is the “pattern” lists, which use the variables from the data lists to create larger chunks of language. So if a data list named paindadj contains the adjectives “lonely,” “miserable,” and “desperate” and another data list named i_feel contains the subject/verb structures “i feel,” “i am,” and “i’ve become,”  a pattern list named i_linking_verb could have the following code: i_linking_verb = i_feel + painadj. And any of the following combinations of text could be printed to the screen by using line = i_linking_verb

  • i feel lonely
  • i feel miserable
  • i feel desperate
  • i am lonely
  • i am miserable
  • i am desperate
  • i’ve become lonely
  • i’ve become miserable
  • i’ve become desperate 

Simplistically stated, the way that digital found poem generates its text is as follows. The code first goes to what I call the master pattern list and randomly selects one of the currently 464 variable items on this list. Items on this list might look as follows: 

line = loc_prep & c & spacer3 & subjectnoun & c & spacer3 & verb_singular 

In this pattern, loc_prep is a word list that contains prepositions of location, c and spacer3 will cause a line break and variable spacing, subjectnoun is a word list that contains all types of singular people or singular personified nouns, verb_singular is a word list that contains tons of singular verbs and verb phrases, and line is the variable that is a collection of all the words, line breaks, and spacing in this pattern that will ultimately be printed to the screen. (The ampersand sign (&) just concatenates all the items in the line of code.) When line is printed to the screen, this pattern can create any of the following variations plus an untold number more: 

  • near the abandoned house/a mystic/sits at the table
  • by the grocery store/a single mom/leaves empty handed
  • on o road/a wise man/equivocates
  • across the street from the women’s shelter/angeline/is walking away
  • between the flowers/this day/can never heal 

As the code picks up an item from the master pattern list (or any other pattern list), it also picks up a flag that I’ve added which tells digital found poem which pattern list to go to next. Note that the items in the list above are all independent clauses with either a gender-neutral subject (“a mystic” for example) or a gender-specific subject (“a single mom” for example). So with flags, I can choose to sent the code to go pick up a phrase from a phrase list, then to another subject list that includes “he” or “she,” depending on what gender is required (or “it”) and then to another phrase list or two. Here’s what a full stanza based on the pattern above might look like: 

  • in this little town/ignazio/has taken the plunge/this lousy tuesday/he’s waiting for the script to change/all at once/for ever and ever 
  • across the street from the candy store/an old man/pays no attention/crazy with the time ticking away/he speaks through forgotten history/made with malignant deeds/at the edge of madness 
  • near the funeral parlor/a lost soul/has come too late/without direction/she carries on with her gains and losses/bound by the workings of loneliness/wondering about everything/here of all places 

With stanza one done, the code returns to the master pattern list and goes through this same process again to create stanza two, three, four, and five. Then the code stops with the completed poem printed to the screen. 

Another thing I should mention (because you see it constantly in digital found poem) is that the master pattern list contains many “fill in the blank” items. All of these are expressions that people use daily in discourse and that you see used also in a million other poems–but with the great benefit in digital found poem that these patterns are filled in in a zillion different ways. Here are some examples:

  • today again …
  • yesterday you said …
  • this morning began with …
  • when i look in you eyes i see …
  • since you’ve been gone i have … 

With flags, these can also be extended to repeat the “fill in the blank” parts as follows: 

  • today again … today again …
  • yesterday you said … today you say …
  • this morning began with … and it ended with …

Here’s are three examples of what stanzas created with the “today again…” “fill in the blank” pattern might look like:

  • today again/we’re condemned to this hour’s deadly concessions/today again/we’re broken in two/drifting off/in one breath 
  • today again/we’re ripped by a mad negativity/today again/we cease to care/wandering in an artless reverie/after a long silence 
  • today again/we’re swallowed up by the messed-up filth of longing/today again/we’re drifting apart/on our uneasy battleground/in the arms of another

This is definitely not random, of course, but including these patterns does bring a level of coherence to digital found poem that you would never get if you left everything up to chance.

So that’s in brief how the text in digital found poem is created. Pretty simple, right? And I continually play with digital found poem by adding new patterns to the master list, searching for new language to add to the data lists, modifying or deleting language that doesn’t seem to work well, correcting spelling errors, fixing grammar elements, etc., all in the hope of making the app a little better with each update and perhaps of more interest or use to others.

Do note that this app works only on PCs/tablets and not on mobile phonesAnd it works on a Mac or other operating systems only if they can run Windows

Should you want to know more about digital found poem or if you have suggestions about how to improve it, please email me.  And any other comments such as “love it,” “hate it,” “fun,” “stupid,” etc. are, of course, also welcome.

Published inUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *