Bookbot poet kit index
My Poet, My Poem & I: The NCSU Libraries bookBot Poet
Markus Wust
North Carolina State University
Essay: Do Robots Dream of Being Poets?
Can a computer create art? More specifically, can it create poetry? There have been many attempts by computer scientists at algorithms that could produce poetry, or, with increasing success, at least texts that would meet the formal requirements for certain types of poetry (see, for example, the entries for the annual “Turing Tests in Creative Arts”). Also, there are probably as many literary scholars and artists who have denied that a machine could ever truly be creative and produce poetry that would be equal to that written by a human. While the bookBot Poet and the Poem Dispenser described here are not comparable to efforts by other developers and unlikely to sway the opinions of sceptics, they can hopefully achieve, at a smaller scale, what Dan Rockmore, Director of the Dartmouth College Neukom Institute for Computational Science, has laid out as the motivation for the above-mentioned Turing Tests:
It's a challenge to produce a moving piece of literature, and I think in challenging yourself to try to do it, it makes you think hard about what moves you about a story, what goes into making a story ... Thinking hard about those questions has a long tradition in the humanities, so it's just another way in which we can bring another lens to that, not in order to replace it but just to honestly consider it.
Background
In January 2013, the NCSU Libraries opened the state-of-the-art James B. Hunt Jr. Library on North Carolina State University's Centennial Campus. The building featured a wide variety of collaborative work spaces for students and faculty as well as high-tech visualization facilities and large video walls. To reduce the amount of storage space required for books and other materials, the Libraries installed an Automated Retrieval System (nicknamed the “bookBot”); it uses four robots to retrieve large metal bins from shelves and deliver them to workstations where library employees pull requested materials and then bring them to the check-out desk or forward them to other library locations. The system's total capacity is about two million items housed in more than 18,000 bins. The space savings achieved through the use of the bookBot are significant: compared to traditional shelving, it takes up only about one-ninth of the space which can be used instead for providing teaching, research, and collaboration spaces for the university community. In addition, maintaining the necessary environmental conditions in the bookBot for storing books, archival materials, and other resources is easier and consumes less energy than doing so for a whole building.
The bookBot Poet
During daily operations, the system generates a variety of data points, such as the origin and destination bins of retrieved items – a book, for example, may not necessarily be returned to the same bin that it came from – access dates and times, etc. When, in April 2014, the NCSU Libraries hosted the North Carolina Literary Festival, the idea was to use these data to create a project that could engage festival visitors and connect the themes of literature and technology (represented by the new library building). The web-based bookBot Poet would generate free verse poems for display on the Hunt Library's Commons Wall; new poems would either be produced once the display is refreshed or users could open a companion website on their mobile device and request a new poem.
Technical Implementation
A script generates a daily summary of bookBot activity that registers the location of each accessed bin and the access time; no further information (e.g., which item was requested) is included in the report. These data are then imported into a MySQL database which serves as the data source for the project. The actual bookBot Poet application, which was written in PHP, queries some of the previous day's data to determine the length of the poem and the type of sentence (declarative, imperative, interrogative, exclamatory) that is to be used for each line. Based on these selections, it picks one of ten sentence templates which define what word categories (noun, verb, preposition, etc.) make up the sentence and their particular order. Once the structure of the poem has been determined, the bookBot Poet accesses a large vocabulary database that has been created for the project based on published word lists and that includes multiple word forms, such as different tenses for verbs or singular/plural for nouns. Using a combination of bookBot usage data and randomly generated numbers, the application selects the vocabulary items that are needed to complete each sentence template. Before generating the final HTML output, the application makes small grammatical adjustments, e.g., to make sure that a singular noun or third-person pronoun are followed by a verb with the correct -s/-es ending, such as “She sings.”
When it came to designing the visual display for the bookBot Poet, there were three goals:
- As many visitors would be viewing the project from the Library's third floor – which would place them several feet below the video wall – the text had to be easily legible from a distance. This would likely preclude the use of a design that imitates a handwritten poem using a script typeface.
- It had to be visually interesting in order to have visitors take notice and start reading the poem.
- Visitors should associate it with poetry and ideally be reminded of their own attempts at creating poetry.
The final decision was to simulate fridge poetry magnets attached to an old refrigerator, something that patrons are likely to have seen or even done before themselves. The refrigerator image is a rendering of a 3D model and is used as the background for the HTML page. The “magnets” do not use images – which would be difficult to do given the large variations in word length – but are rather created using CSS. In order to give the magnet arrangement the appearance of having been created by a human, each word and punctuation mark was enclosed in a div tag and randomly assigned one of seven CSS classes. Depending on the class' transform property values for rotate and translate, each magnet would be slightly rotated and/or moved to the left or right.
The mobile companion website which is advertised at the bottom of the bookBot Poet display was build using jQuery Mobile, a touch-optimized web framework that greatly facilitated building a site that reliably works on all mobile platforms and browsers and that adjusts to a wide variety of screen sizes and resolutions. Another key component is WebSocket, a protocol that “enables interaction between a browser and a web server with lower overheads, facilitating real-time data transfer from and to the server.” It allows the mobile website to maintain an open connection to the bookBot Poet page on the library video wall by going through a central server; it can then use this connection to send refresh requests to the bookBot Poet, which in turn means that a new poem is generated and displayed. The project was built before the NCSU Libraries installed its own WebSocket server; thus, bookBot Poet was designed to use, and still uses Pusher, a commercial WebSocket provider, and its JavaScript and PHP libraries. As the application would not generate much traffic, Pusher's free plan with its limits on concurrent connections and messages per day was sufficient. After the request is sent to the Pusher server, a 30-second countdown is initiated on the mobile site to prevent a single user from too quickly refreshing the display in the building.
The Poem Dispenser
During the NC Literary Festival, the bookBot Poet was the only content that was shown on the Commons video wall; later on, it became part of the pool of exhibits that content editors could choose from to create the content schedule. I have always wanted to find other uses for the bookBot Poet content in ways that would help promote NCSU Libraries services and create new collaborations with our campus community.
Two years after the bookBot Poet's launch I had started working with label and receipt printers for a couple of projects and was wondering whether they could be used in conjunction with the bookBot Poet. In conversation with two colleagues – who themselves were published poets – the idea for a small printer emerged that would allow visitors to the library print either a bookBot poem or one created by a human writer on a strip of thermal paper and take it with them. The idea for such a tool was actually not new. While working on the printer, we learned about “Vandal Poem of the Day,” a collaboration between the University of Idaho Libraries and the university's College of Letters, Arts, and Social Sciences. Their printer consists of a Raspberry Pi and a thermal receipt printer inside a small wooden box that can be used to print a daily poem or one randomly selected from a curated list of poems by established writers. This is the same technical platform that we had chosen for our printer. However, in our case the availability of multiple sources for poems allowed for additional functionality. An integrated camera could take an optional portrait photograph of the user that would be printed alongside the poem; the goal was to personalize the poem for the user and make reading the poem a more individual experience. To protect patron privacy, the photograph would be deleted as soon as the poem was printed. At the bottom of the printout would be either a cartoon image representing the bookBot Poet or a portrait of the poet to hopefully help users feel a personal connection with the author. In addition, instead of activating the printer with a single hardware button, our printer would utilize a small touchscreen where users could select the type of poem they wanted to print and take a selfie. Another feature would be a counter that would show how many bookBot respectively human poems had been requested at any event where the printer had been deployed.
Poems
The fifty-one human-sourced poems came from two main sources. On the one hand there was a selection of works by established poets which was based on the author's reputation, the quality of the poems, and – since we had to account for the slow speed of the thermal printer – its length. Another set of texts were provided to us by students in NC State's Master of Fine Arts in Creative Writing program. This allowed us to engage with a part of our community with which we had little interaction in the past while providing the students with a unique publishing outlet. As the initial venue for the Poem Dispenser was meant to be a staffed table in D. H. Hill Library, the NCSU Libraries' other main library, during National Poetry Month (April) 2017, we hired some of the students who contributed poems so they could explain the Dispenser's concept and encourage visitors to print a poem for themselves; this also allowed the students to engage with their readers and get an opportunity to talk about their work.
Poem Dispenser in Use
At this point, the Poem Dispenser has been used on five occasions:
- National Poetry month: As mentioned above, this was the event for which the Dispenser was originally created. It was made available on almost all work days over a two-and-a-half week period.
- During that same period, it was displayed during the Libraries' annual book sale as a novelty item for patrons.
- Our veterinary medicine library hosted it for one day during finals week of Spring 2017 as a stress relief tool for students.
- The Dispenser was part of a literature-focused booth at SPARKcon 2017, an annual Creativity Festival in Raleigh, NC.
- It was selected as one of a handful projects to be presented at a library event for NC State alumni.
Future of bookBot Poet and the Poem Dispenser
Development on both projects has not ended at this point. I would like to expand the capabilities of the bookBot Poet, for example by adding more complex sentence templates and enable it to express mood (to a certain extent). The next iteration of the Poem Dispenser is already in active development, albeit with a different focus. Every year, the university runs a Common Reading program through which new students are encouraged to read a pre-selected book; this is meant to create a shared experience and starting point for discussion for this group. As part of the Libraries' participation in the program, we will build another printer that would allow students to print short passages from the book. The excerpts will be chosen by other students which would hopefully make them more meaningful to the students than selections made by faculty or staff. While the printer won't offer the option to take selfies, it will allow students to listen to the quote they just printed; the recordings will come from an audio recording of the novel that was read by the book's author to help the students feel a certain connection with the writer.
Conclusion
The goal of the bookBot Poet was not to create a system that could fool human readers into thinking that its output has been created by another human being. Had this been the goal, the project would have been a complete failure. It cannot even compare to most systems that aim to do just that. Rather, it was meant to make those coming to the library curious, and perhaps have them ask themselves, “If this is not poetry, what makes a poem a poem?” Based on these criteria, I think the bookBot Poet has some merit. This holds especially true when the bookBot Poet is used in conjunction with the Poem Dispenser. People who would otherwise be hesitant to read poetry or who normally don't encounter it in their everyday lives are drawn to the concept and like the idea of getting “their own” poem on a slip of paper that they can put in their wallet. I attended the “Vandal Poem” project team's presentation at the Digital Library Federation's 2016 Forum where attendees had an opportunity to use the printer; the audience's response was very positive and many, myself included, got a poem printout. I have encountered similar reactions when showing the Poem Dispenser at various events. People would ask about the Dispenser and, after a short explanation, many would print a poem; the ratio of bookBot to human poems would be about equal.
In addition, the Dispenser (and, through it, the bookBot Poet) successfully fulfilled its role as an engagement tool for the Libraries. In its current iteration, it gave us an effective way of advertising National Poetry Month on campus, connected us with the Creative Writing Program, and helped advertise our making services. It is hoped that the Common Reading printer will be equally as effective.
Notes
- http://bregman.dartmouth.edu/turingtests/Literary2018
- http://bregman.dartmouth.edu/turingtests/node/12
- See https://www.lib.ncsu.edu/huntlibrary/bookbot.
- https://www.lib.ncsu.edu/spaces/commons-wall
- https://en.wikipedia.org/wiki/WebSocket
- https://pusher.com
- https://poetry.lib.uidaho.edu/index.php/labs/
- For more information on this issue see https://openenergymonitor.org/forum-archive/node/12311.html.
- http://phantomjs.org/