Trurl’s (himself a robot) created the Electronic Bard, a poetry machine. It could create poems given any, arbitrarily contrived, instructions. For example:

This is a poem about a haircut! But lofty, nobel, tragic, timeless, full of love, treachery, retribution, quiet heroism in the face of certain doom! Six lines, cleverly rhymed, and every word beginning with the letter “s”!

Seduced, shaggy Samson snored.

She scissored short. Sorely shorn,

Soon shackled slave, Samson sighed,

Silently scheming,

Sightlessly seeking

Some savage, spectacular suicide.

It is an excerpt from “The Cyberiad” by Stanisław Lem, translated by Michael Kandel, http://www.art.net/~hopkins/Don/lem/WonderfulPoems.html). Well, Lem was a human (unless we take Philip K. Dick’s perspective, that L.E.M. was a Soviet writers’ committee), so is Kandel. They merely imitate machines.

Well, Lem was a visionary.

OK, we are used to e-book readers. But how about poetry generation? There are some old-school (2013) attempts with genetic algorithms, with so-called Darwinian poetry, or survival of the finnest:

Poem #20014 (generation 17)

spent waves sang 

beating pointed time and 

measureless 

with cold knowledge `

revealing 

one dream is I perhaps love you

But there is a catch. It takes a LOT of human evaluation, to mix gibberish and make the finnest survive. You can (rightfully) argue that it is still humans who create this poetry, by deciding which poem should survive to the next edition. All in all, when poets write (or in fact, when anyone writes), they choose words. In this case, it is some restricted choice.

So, how about GENERATING poems, in the first run. Well, for GENERIC texts. Look for lyrics generators, there are two many of them. Since the baseline is low, it is not hard to compete.

But lately, there were huge advances in NLP (Natural Language Processing, a data science technique, not Neuro-Linguistic Programming, a sneaky psychological manipulation technique). Deep learning (advanced artificial neural networks), so-called “Artificial Intelligence”.

From the last few months, is it able to create stories about English-speaking unicorns (with GPT-2 by OpenAI). And with some tweaking it is able to generate poetry:

Thou know’st how Menoetiades the swift

Was dragged, of Hector and the fierce compeers

And Phrygian warriors. So, we will dispatch

Your bodies, then, yourselves to burn the ships

In sacrifice; with torches and with bells

To burn them, and with oxen to replace

Your gallant friends for ever. But I wish

That no man living has so long endured

The onset of his foes, as I have power

To burn or storm; for mighty Hector erst

Was slain, and now returns his safe return

See GPT-2 Neural Network Poetry by Gwern containing examples, and a lot of background material. It is referenced in Gwern’s AI-generated Poetry by Slate Star Codex (from which I picked the example).

Why is poetry easier for machines than processing facts. Isn’t it that computers excel at logic, while they are oblivious of feelings?

Well, for computers do excel at memorizing data, and at applying many simple operations (arithmetic or logical). So far, they do not excel at deducing from arbitrary pieces of data. Storying a whole word (and to understand any longer story, one pretty much need to hold some internal model of a word) is much harder. It takes a lot of knowledge to understand a story.

Keeping a mood or style is much easier. Keeping general style, even if at the consistency, is easy (this dream-like mind-wandering). Both for pictures (vide Style transfer) and for text. Even with very simple mechanisms, such as word vectors (king – man + woman is queen; but why?) we can gen interesting metaphors, such as Stock Market ≈ Thermometer.

“The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth” – Niels Bohr, https://en.wikiquote.org/wiki/Niels_Bohr

So, if we work with profound statements, as long as we keep the style, a negation won’t do any bad. It works surprisingly well for “inspirational quotations”  Inspirobot.