Introduction to Computer Assisted Poetry

2/16/19

As I noted in Creating Haiku and Mathematics of Haiku, mathematics and poetry are quite compatible. In this article, I talk about computer assisted poetry and show some examples of how I do it. If a computer program or spreadsheet creates poetry completely at random, the output is likely to be gibberish a large percentage of the time. Therefore, one needs to implement randomization in intelligent, constrained ways, as well as monitor and edit the output before publishing the poem. Of the poems that I've written (which can be found here), "computer poetry" ideas and methods are used in many of them.

Consider the fantastic poem by Margaret Atwood:

you fit into me
like a hook into an eye
a fish hook
an open eye

To start using randomization to understand this poem, one could sample completely at random from lines of the program, words, letter frequencies in the poem, or from the alphabet, to create new, similar (in some way) poems. We can see that as we move more away from the characteristics of the original program, the output becomes more like gibberish. However, also keep in mind that in a spreadsheet, the random numbers and hence the output can be refreshed over and over until there is an acceptable poem.

Sampling Lines (completely random)

a fish hook
like a hook into an eye
a fish hook
you fit into me

Sampling Words (completely random)

a fish a a
you like an hook fish fit
a open into
hook fit a

Sampling Letters (completely random)

meo oth oiok fa
niei p maio tofe kn oya
i ieoo eykh
yk kkye noo

Sampling Alphabet (completely random)

cqh uxy lxwh mu
fnvj c ejkd trrv qm cci
y ycpz rdii
em zsak dox


We can improve things slightly, by being consistent with the words or the letters. For example, there are words that repeat in the original poem, so if we use one word here we should use the same word there. The words that repeat in the original poem are: "into", "a", "hook", "an", and "eye". Therefore if a word is randomly selected for "hook", it should be the same word in both places in the poem. The same exact idea applies if letters are randomly selected. The letter randomly selected to replace the "y" in "you" should be the same letter replacing the "y" in "eye".

Sampling Words (completely random, word consistency)

an into a fish
me like into a like an
like eye into
like hook an

Sampling Letters (completely random, word consistency)

ayh fao khoo ie
kuyf u yifi khoo nt ono
u tpei yifi
nt moek ono

Sampling Alphabet (completely random, word consistency)

ynn rlh jpxn nk
bbsd j usvw jpxn lj puw
j fxnh usvw
lj imfg puw

Sampling Letters (completely random, letter consistency)

fko hpa peak nn
opnn h hkkn peak he nfn
h hpfh hkkn
he kone nfn

Sampling Alphabet (completely random, letter consistency)

oam tjq juqa fq
gjoq i baao juqa iu qoq
i tjwb baao
iu aqqu qoq


Something else we can do, is note the syllables in the words in the original poem. In the original poem, all words are 1 syllable words, except for "into" and "open" that are 2 syllable words. For computer assisted haiku, I use a database containing thousands of 1 syllable words and 2 syllable words. And again, we can sample completely at random with or without keeping the words consistent.

Sampling Words (completely random, syllable consistentcy)

beef chaff gymnast lorn
shell kith strung hokku ball ass
duds gauze rules
might springlike tinge

Sampling Words (completely random, syllable and word consistency)

beef chaff gymnast lorn
shell kith strung gymnast ball ass
kith gauze strung
ball springlike ass

Also, simply consider randomly sampling the various parts of speech using the parts of speech from the original poem. For example, the form of the original poem is basically

you VERB into me
like a OBJECT1 into a OBJECT2
a ADJECTIVE1 OBJECT1
a ADJECTIVE2 OBJECT2


We can make large lists of verbs, objects, adjectives, and etc., and sample from these lists to fill in the blanks, so to speak. However, this approach, while simple, isn't entirely satisfactory. First, we need to actually do

you VERB into me
like a(OBJECT1) OBJECT1 into a(OBJECT2) OBJECT2
a(ADJECTIVE1) ADJECTIVE1 OBJECT1
a(ADJECTIVE2) ADJECTIVE2 OBJECT2


where by a(ADJECTIVE1) I mean a function a(), where the use of "a" or "an" is based on which specific ADJECTIVE1 is randomly selected. That is, if the first letter of the randomly selected ADJECTIVE1 is an a, e, i, o, or u, then a(ADJECTIVE1) = "an", otherwise a(ADJECTIVE1) = "a". However, this is still not complete, because the word "the" can also be used where an "a" or an "an" are used. Because of this, one can make the word "the" pop up a random percentage of the time in the definition of a().

We can continue in this manner through the original poem, until we get a fairly generalized form of the original poem. Doing this, I get

PRONOUN1 ADVERB VERB PREPOSITION1 PRONOUN2
LIKESYNONYM a(OBJECT1) OBJECT1 PREPOSITION2 a(OBJECT2) OBJECT2
a(ADJECTIVE1) ADJECTIVE1 OBJECT1
a(ADJECTIVE2) ADJECTIVE2 OBJECT2


Note that after all of this work, this method still doesn't absolutely prevent gibberish. However, this method lowers the chance of gibberish compared to completely random selection, while modelling the successful forms in the original poem.

I enjoy computer assisted poetry because it allows one to explore words and word combinations one would not normally have ever thought to consider. I also do not tell others which poems I created using a computer assisted approach. Does it even matter? Can you tell which of these poems I wrote were created in this manner?

you look into me
like the scissors into the bone
the thorough scissors
the yielding bone

you furrow into me
like an introduction into a group
an erect introduction
a trivial group

you walk into me
like the cat into the bag
the playful cat
the open bag

they walk on us
identical to a face near a foot
the new face
the economic foot

they unfortunately buzz around themselves
akin to the flies in a library
the unwritten fly
the aromatic library

we merrily generate within us
not unlike a medicine behind the boom box
a happy medicine
the warmhearted boom box


Thanks for reading (and writing)!

Please anonymously VOTE on the content you have just read:

Like:
Dislike:



For poetry, I recommend:


Please show me a randomly selected poem