Generative Book

Automated python scripts to generate a simple kids book

This project was devloped as part of an elective paper in my fourth year of study in 2017, and was developed over 4 weeks.
Books typically inspire thoughts of readability. Especially childrens books. Especially childrens tongue twister books. This book is a subversion of that expectation, with the added bonus of mashing together digital and physical reading culture by adding in the bonus difficulty of reading CAPTCHA images on a page. Included within, the book has elements of deciphering code and plain text alike. The concept in its roots begun as an attempt to make reading tongue twisters just as difficult as reading them quickly aloud. This allowed exploration into multiple methods of text manipulation.


Tom White (lecturer)

While the final output is not a fully completed project, this project provided a creative outlet for testing the boundary between visual and speaking difficulty and combining these. Rather than focusing on the completedness of the output, this project was more proposed as a thought piece that could privoke conversation on visual manipulation to represent other senses through sight.
The overall process of development was used as an exploratory project to learn the python coding language and experimenting with automating the development of a print document. This project implements the use of libraries such as tracery and spacy which are used for natural language processing. The current project only employs primative sentence construction through the tracery grammars with the implementation parts of speech through the spacy library. This all brought together creates very crude alliteration and rhyming (this is achieved with the pronouncing library) to create simplistic 'tongue twisters'.
With this project, I wanted to combine both written text generation with the generation of custom images. For this, I used a CAPTCHA image generation library which I combined with the generated text to create images that include generated content specific to the overall theme of the book generated. It is important to note that while for the purpose of this project I used scripts from childs films, any chosen text can be used as an input for this project; a simple .txt file of the text is required for input and the project will use this as the input and generate a book off this.