Skip to content

I made a bag of poems as a birthday gift for a friend using this code

Notifications You must be signed in to change notification settings

maxg0/bag-of-poems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A bag of poems

I made a bag of poems as a birthday gift for a friend using this code. All the poems are three words on three lines each, for a total of nine words. The words don't rhyme or have any particularly deep meaning and most of the poems end up being completely nonsensical. The original plan was to create haikus or something more elegant, but time constraints led to this solution. I hand picked a bunch of the poems, threw them in a word editor, corrected a lot of the weirder edge cases manually, printed out the poems, cut them out and put them in a small bag. The end result was a bag of poems, or a "poesipåse" in Swedish.

There is no elegance in the code, no Markov chains or machine learning, just random words being put together and an impressive collection of badly named and unused variables.

Running

python dikt.py starts it. Press enter to generate a new poem. You can comment out the last line to have it dump out poems based on the limit variable.

Example output

någon adlad älg 
bränner hopplöst städer 
allt undrar vi

About

I made a bag of poems as a birthday gift for a friend using this code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages