Skip to main content

Can computer write a poem?

[this post is not yet completed, reviewed and paraphrased] 
Meeting Your Mask

The dilute wine bottle is starry on your shoulder.
I could conduct juice, stalactite, and rooster  
from quivers and goblets  
with a red bed  
with gates in my tail.  
I'm the son to the farm of immediate rose. 


I do not shatter in the chimney of obscene flask.  
And so that its clandenstines will ignore your ears.  
What replaces the props of purity?  
Dawned and then trusted in the city.

/poem/8bfc2f9df781ab2d

Who is the poet? Believe it or not, the above poem is generated by a computer program. And I generated it right now with a single click.


"Aw! Are you saying, computer can write poems?"


-Yes they do. Try it yourself.


You might be thinking, "it's a trick. The computer must have a database of phrases and it randomly organizes them into a poem".


But no! How can each and every poem generated by the bot (a computer) has a meaning which is closely related with the title? Every line is speaking about a similar feelings. So, it is not random. Grammatically correct sentences can be created by a computer, and that is not a surprise anymore, today.


This poem generator is created using a simple computer program written in python. Zackary Scholl, then an undergraduate student at Duke University, had written the codes in 2011. His Poetry generator uses a Context-free grammar using the notation of Backus-Naur Form. Context-free grammar systems are a generalized system of formal grammar defined by production rules which allow sentences to be recursively built from smaller phrases. The formalism was developed by Noam Chomskey in the 1950’s. Essentially this poetry generator works by having the poem dissected into smaller components: stanzas, lines, phrases, then verbs, adjectives, and nouns. When a call to create a poem is made, then it selects components of the poem and recursively generates each of those.


This explains how a poem can be generated. Can you guess, which of these poems was written by a human, and which by a computer?


A wounded deer leaps highest,
I’ve heard the daffodil
I’ve heard the flag to-day
I’ve heard the hunter tell;
’Tis but the ecstasy of death,
And then the brake is almost done,
And sunrise grows so near
sunrise grows so near
That we can touch the despair and
frenzied hope of all the ages.


vs.


Red flags the reason for pretty flags.
And ribbons.
Ribbons of flags
And wearing material
Reason for wearing material.
Give pleasure.
Can you give me the regions.
The regions and the land.
The regions and wheels.
All wheels are perfect.
Enthusiasm.


The first one is a computer, the second one is Gertrude Stein. You can find many of such poems on the website Bot or Not, “a Turing Test for poetry” created by Oscar Schwartz and Benjamin Laird. Bot or Not premiered for the recent Digital Writers’ Festival, and it is fun. It turns the romantic notion of creativity as “collected lightning” on its head — French-Romanian avant-garde poet Tristan Tzara really does sound like a robot, and so does contemporary poet Deanna Ferguson. So does Gerard Manley Hopkins. If some of the best modern and contemporary poets sound like robots, the reverse is true, too: many computer-generated poems are a détournement of human poetics. For example, that computer-generated poem you just read was programmed by Ray Kurzweil based on Emily Dickinson.



But still, a question is left unanswered. How these phrases create a feeling or a picture that only a (human) poet can do? Does computer understand human feelings?

Well, let me answer it. If you search images in google with a keyword "Sorrow", you will find lot of pictures where people are weeping. Many of these pictures does not even have a tag, title or metadata containing the word "sorrow". But still the supercomputer named Google displays them. How does Google know that weeping and sorrow are closely related? A silicon board with a billions of wires connected to it should not know about these human feelings. But it knows. It learnt over the time. We have made that board 'artificially intelligent'.  Let us simplify how it works.

Let us assume, there are 100 pictures that are tagged with a word 'sorrow'.  10 among these pictures are also tagged with the word 'tear'. The computer now learns, 'tear' is somewhat related to the word 'sorrow'. And then it returns other images that are tagged with the word 'tear'. And it keeps this new lesson in its database. Over hundreds of such of searches with thousands of keywords, gives the computer a statistical confidence that whatever it learn is right. And thus it learns, a word and other words that describe the feelings associated with it.

[to be continued....]

 

 

chickenpoetbot_daff

 

References:

  1. http://dwwp.decontextualize.com/pdfs/morris.pdf

  2. https://www.poetrygenerator.ninja

  3. http://motherboard.vice.com/read/the-poem-that-passed-the-turing-test

  4. http://botpoet.com/vote/about-foam/

  5. http://poetry4robots.com/about/