Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i've never picked a protected flower (concrete unicode poems) #110

Open
everestpipkin opened this issue Dec 4, 2018 · 4 comments
Open

Comments

@everestpipkin
Copy link

everestpipkin commented Dec 4, 2018

screen shot 2018-12-03 at 8 17 08 pm

i've never picked a protected flower is a book of concrete unicode poems, assembled each run by a program written in node.js. this is one example of output.

the pdf;
http://ifyoulived.org/never.pdf

the basic;

  • the poems included in this book use titles scraped forum posts, from users of wordreference.com. their usernames are in the back of the book.
  • the font is gnu unifont, and semantic grouping was based on conceptnet
  • a hacked version of jscii formed the base of the text field generation
  • some deterministic random functions borrowed from loren schmidt

the complicated;

  • this code for this book was written in a few parts.
  • the full dataset was scraped from the wordreference forums with a python script. the compiled source material is hundreds of thousands of post titles, as well as the username associated.
  • this data was then cleaned, removing phrases that did not meet certain standards (specific grammatical questions, or those that included slurs), as well as removing parts of phrases - things in brackets, etc. a fair amount of the work of this was mindfully cleaning this data to make it feel more lyrical.
  • then, using 'related words' in the concept net api, i moved through this textual database, pulling specific lines that matched these words. for instance, the word 'ocean', may return 'boat', 'sea', 'fish', 'shark', etc- so the resultant poem fits a theme.
  • then i pull the related words of one of these returned phrases, so the next poem may be about 'shark'. moving this way through the database, the poems slowly track and change.
  • after assembling a long list of poems (in a node.js program), it generates the final product, an html page. to generate this page, it copies an html template into a new file with the poems as a variable, which has the text-field generator built in.
  • this text field generator (the unicode patterns that the poems are embedded in) works like this; it generates small canvases of pattern, then converts them to ascii planes. the unicode is selected randomly from 17,000 characters of the unicode set.
  • then, it embeds each line of the poem inside the pattern. monospace all-unicode fonts were important in this, so the patterns do not get terribly off register.
  • these completed text fields are attached to the dom element as a div, with a page-break after each one.
  • the pdf is saved off from an html page from the print dialog.
  • i ended up running the program twice, once with the poem embedding turned on and once with it turned off, and auto-merging the two pdfs with automator because my browser couldn't render 400 pages at once

the whole project file/code is here (sorry, under-commented but, viable. just add your own data set!)

and, again, here is the pdf!
http://ifyoulived.org/never.pdf

thank you!
-everest pipkin

@hugovk hugovk added the preview label Dec 4, 2018
@emmawinston
Copy link

everest this is just an absolute joy

@danielsinderson
Copy link

These are excellent.

@B-Lemke
Copy link

B-Lemke commented Dec 19, 2018

I love this outcome. I think this is a work of beauty and exactly what I was looking for when searching for inspiration for art. :)

@rchrdlln
Copy link

this is great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants