What this code does and why
This code makes a "poem" via choosing lines at random from a book of phrases - in particular, it uses "Fifteen Thousand Useful Phrases" by Grenville Kleiser, which it downloads from Project Gutenberg.
Inspired by other computer-generated short texts, like Allison Parrish's Twitter bots, I was curious whether I could generate some poetry that seemed vaguely plausible, purely by using a random approach - without having to do any natural language processing or machine learning. To do that I needed a text to choose lines from, where the individual lines were already readable English, and would have a reasonable chance of making some sense when rearranged at random.
Here are a few example outputs that I thought could pass as human-written poetry (not necessarily good poetry):