inoejj / PoemGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PoemGenerator

drawing

'Do not worry. You have always written before and you will write now. All you have to do is write one true sentence. Write the truest sentence that you know.' So finally I would write one true sentence, and then go on from there.- Ernest Hemingway, A Moveable Feast

Have fun generating poetry! It might be that half the lines are nonsense, or maybe more, but isn't that just a reflection of the creative process? As thinkers, as creators, we have so many thoughts everyday--more than half of them are definitely nonsense. This is the same. We're asking you to find those few lines of beauty in the nonsense, and create meaning where there seems to be none. It's an exercise in creativity and compassion. Like finding shapes in clouds. Like drawing constellations. There's something magic in these generated lines, if you're willing to look. Some lost inspiration, if you're willing to find it. It might just take generating and regenerating these lines a few times.

The hope of this is that it'll help you follow in the footsteps of Hemingway's words. Perhaps it's the hope of every writer: to write the truest sentence you know.

The Basics

We've provided a sample text file containing all of Shakespeare's work for you to play around with and generate your own lines of poetry from. All you need to do is download the Python file and run it! If you're interested in taking a look at the code itself, and learning a bit of Python in the process, the easiest way is to use Google Colab through any Google account you might have. To run each annotated block of code, either press the 'play' button in the top left corner of a block, or click inside the text of a block and hit the keys CTRL+ENTER. You're free to use any other text files you might be interested in playing with, whether it be T.S. Eliot's The Wasteland or excerpts from your own personal writings, and you're welcome to change both the number of lines generated and the number of words per line.

Examples

Generated from the sample file of Shakespeare's collected works:

art thou well read in wishes

I am one of revels sir

life is flint to us

even from Verona here whose souls past

axe fall exeunt scene

Generated from T.S. Eliot's The Wasteland:

wall and reforms and i tiresias old man fear death

human engine waits like a closed car at morning striding

bones in the dead sound of this and when invited

and waiting masked my end great

Generated from our personal writing:

edge of summers gone sharp

constellations curling close like two steps

losing their shared midnight

old times you're missing you follow

only the roadmap to see something true

About

License:MIT License


Languages

Language:Jupyter Notebook 100.0%