…or 55 places the sun won’t shine on

This assignment is meant to be an entry to the National Novel Generation Month contest. The premise is quite simple: use code to generate a novel of 50k+ words, and submit the novel and code. I will explain in more detail below. As finals are kind of creeping in, I found humor and comfort in this project. Honestly, I never expected it to be so entertaining and exceptionally comical in a not so obvious way (my roommates did not share the feeling). I wanted my NaNoGenMo (National Novel Generation Month) entry to have a magical realism style to it. In a sense, I took this project as a building block towards my final project, and I shall publish a blog post on that next week.

In any case, I decided to use train GPT-2 on a corpus of text that consisted of several short stories from Jorge Luis Borges, such as “The Aleph”, in addition to two novels from Gabriel Garcia Marquez : “A hundred years of solitude” and “Love in times of cholera”. I also attempted adding work from Isabel Allende, as well as Jose Saramago. I had only read these authors in spanish before, and though I found Allende captivating in english as well, it did not feel the same. With Saramago, on the other hand, once I added “Blindness” to the mix the resulting text seemed quite violent. I might use it for my final, however for this long text it seemed unnecessary.

After tuning the model to my taste, (you can find my notebook on the Github repository) I decided to produce several short stories with the same starting prompt: “The sun had not shone on that part of the town for many years.” and cut them off at 55. I later proceeded to fix the style (too many random “/n” popped in the middle of a sentence) using the Atom editor to replace these characters with a standard “space” character. I also trimmed extra words at the end of each small story until I reached a punctuation mark. That way they would appear to be tidier, more of a short story, and less like the author fainted mid-sentence.

In the GitHub repository you’ll find a compiledText.txt which contains the corpus. Novel.pdf contains “55 places the sun won’t shine on”, and you can also see the google collab notebook and the zipped trained model. I leave you with some extracts from the novel:



The sun had not shone on that part of the town for many years. The marble houses were on fire. In an instant panic spread through the places where gringos were hiding, dragging their feet and bent over by their neighbors, and the panic became a dragon’s tail as one compact wave ran against another which was spinning in the opposite direction to the direction of the others.  At nightfall the survivors were lying face down on the ground, covered with a compact universe of tiny yellow flowers, and the only animal that could think of after all was a maneater. They slept in rectangular arrangements, facing each other in silence. On Friday the same men slept in identical arrangements under the same palm roof, but one night they slept in the same place, under the same bed, and on Saturday they were on the point of perishing under the lash of death. By dawn, they had killed two birds. They had killed a mule and a calf. They each had killed a mule and a calf. It seemed impossible to imagine the number of possible consequences.




The sun had not shone on that part of the town for many years. On the following day, however, the inhabitants of Macondo woke up in a kind of angelic stupor that had them ringed by earrings, bracelets, and rings made of bone in order to guess distances and render aid in the building of the church. The inhabitants of Macondo who stayed in the Community until the end of the year 1894 were on the verge of forgetting their sense of social well-being because they could not sleep and felt tormented by the notion of parchments rotting with the irremediable plague of insomnia. José Arcadio Buendía, without giving up his science, continued his work as if it were the only thing left in the whole town, the decisive in that respect owing not to the natural forces but to the supernatural proliferation of the village.