November 2018
Beginner
424 pages
11h 43m
English

Computers can write poetry by rearranging existing poems. This is basically what humans do. You and I didn’t invent the language we speak—we learned it. To talk or write, we just recombine existing words—and rarely in a truly original manner. As Sting once said about writing music, “I don’t think there’s such a thing as composition in pop music. I think what we do in pop music is collate . . . I’m a good collator.”
In this chapter, you’re going to write a program that puts the “best words in the best order” in the form of haiku. But to do this, Python needs good examples, so you’ll need to provide a training ...