notes.husk.org/likes images.

59100531279

snowball-poem-generator-mk2

nossidge:

Snowball Poem Generator - mk2

o
my
old
code
given
better
updated
versions

So here is the project I’ve been working on, on and off, for the past few months. It’s a user-friendly and much more fully-featured update to my previous code which generates snowball poems, a favourite poem structure of the mathematically inclined Oulipo poetry and literature movement.

Snowball poems are a form of concrete poetry where each line is a single word, and each successive word is one letter longer.

The new code has many more features than the old. I’ll briefly detail the updates here. This is also my first ever Git repository, so I’m jolly pleased about that.

I go far, with faint candle, through profound stillness.

Features

Lexicon check! Make sure the input text is valid English by checking against a word list file. No more nitty-gritty amending of input text files. You can go to a website and just copy+paste all the text, and still get useful input.

Read more than one input file! You don’t have to put all your text in one massive file anymore. Just save text files to a single folder, and it will read them all. Useful for reading that 26,890 file Project Gutenberg DVD.

Preprocess raw files! No longer have to spend processing time scanning though raw text. The program will generate a file containing only the phrases that snowball upwards by one letter, and you can use that file as input when generating future poems. Useful because the first time you run it, that Gutenberg input takes an hour and forty minutes to process.

Seed phrases! Have you found a snowballing phrase with quite a nice ring to it? You can give the program a seed phrase, like “strings quivered fearfully”, and poems will be generated based on that phrase. You can even specify many seed phrases at once, and it’ll generate poems from all of them.

Multi-key Markov chains! While generating the poem, word by word, the program can now examine previously chosen words and use them in combination with the current word to select a more likely following word than if it had just used the one word.

No C++ knowledge required! It’s a binary executable (program file) that uses simple command line arguments. If you use Windows and you don’t know how to do that, here’s a screenshot of a shortcut I just made. It’s that easy.

Command line programmer friendly! Options to amend most program features and settings. Can take seed phrases from a file or stdin, write poems to files or directly to stdout, display verbose output, display no output, useful error messages, and more!

O, we are born fools, taking further progress elsewhere.

Notes

Growing snowballs only. For this update, I decided to concentrate on what I felt was the most interesting application of the code. So I got rid of the melting snowballs, and the random length word salad. It just wasn’t generating interesting output. The code’s still there on the Gist page, but I won’t be updating that anymore.

Windows only, but only because I don’t have the capability to test with other OSs. (OSes. OS’s?) The C++ code is up there, so you can try to get something working.

The poems in this post that are on a single line were created by the program over the course of the last 4 months. I have, however, added punctuation to some of them for readability; the program isn’t clever enough to do that. Yet. (And the gif at the top was made using Processing)

Twitterbot. Generated snowballs are uploaded to Twitter twice a day @SnowballPoetry.

I do not envy their lavish display. Whatever pleasures, demolishes.

Try it out now!

Go to the Quick Start section, download the program and follow the instructions.

The Oulipo movement used constraints such as snowball poetry as a means of triggering ideas and inspiration. You might find it interesting to see what snowballs can be created from your blog posts, poetry, stories, journal, or even your tweets. The words you use have underlying patterns which have always been there; they just haven’t been brought out yet.

i
do
see
much
pithy
poetry
swiftly
summoned

Date posted: 2013/08/23 13:08:36
Date liked: 2013/08/23 17:08:33
19 Tumblr notes
Liked from: Rev Dan Catt
Rev Dan Catt reblogged from: nossidge
Tagged:
ollama error 500: {"error":"failed to create new sequence: failed to process inputs: image: unknown format"} 386