Category: Uncategorized

WoolfBot Episode II: The Bot Wars; or, On Rhizomes, Markov Chains, and Twitterbots

Oops, I did it again. By which I mean spawned another robot child. This one’s a little different from its elder sibling, though. First off, it tweets about The Waves, not Mrs Dalloway. But more importantly, it doesn’t just spew out whatever I tell it to. Rather, the bot writes its own material. Kinda.

That’s only a half-truth. Rather, I wrote a program in Python (with a great deal of help from this tutorial by Robin Camille Davis and Mark Eaton for CUNY’s Journal of Interactive Technology and Pedagogy) using a package called Markovify to spit out Markov chain-generated remixes of The Waves.

A Markov chain is a type of mathematical model that passes from one state to another. These states can be anything – weather patterns, football scores, or the words in a novel – it doesn’t matter. What matters is that the data pass from state to state. A Markov chain models each possible transition in a set of data, based on what the last data point was. Or, more simply put, if you had a set of data that was a single sentence, ‘the cat sat on the hat, the bug sat on the rug’ then a diagram of that Markov chain would look like this:

created using AGL: see the code at

If you were to run Markovify on this teeny-tiny sample dataset, you might well get remixes that look like these:

the cat sat on the bug


the rug

Or, even

the mat the mat the mat the mat the mat the mat the mat

(That last one continues ad infinitum, but you’ll have to imagine it.)

But what happens when you run Markovify on a dataset that starts ‘The sun had not yet risen,’ and ends ‘The waves broke on the shore,’ and which has 77,462 words between these two sentences? You get a bot that tweets stuff like this:

All the right words, but not necessarily in the right order. And one of those words is ‘pimple.’ Who knew?

So, why The Waves, he asks rhetorically? Well, The Waves is unlike anything else Woolf wrote, and quite possibly unlike anything anyone else wrote. Woolf didn’t call The Waves, set of interwoven monologues from six speakers, punctuated with nine italicised interludes where no one seems to narrate, a novel. Instead, she called it ‘a new kind of play [. . .] prose yet poetry; a novel & a play.’

The Waves is linguistically interesting as well. While it has its fair share of striking, sui generis phrases – Jinny’s ‘fulvous dress’ springs to mind – it also repeats itself a fair bit. Certain phrases, like Bernard’s ‘butterfly powder,’ and Louis’ father, who is ‘a banker at Brisbane’ crop up again and again like leitmotifs, while each monologue is marked by the formula ‘X said’: ‘Bernard said,’ ‘Jinny said,’ ‘Susan said’ and so on. Take another look at the diagram: the repeated words ‘sat,’ ‘on,’ and ‘the’ each appear only once, but they have multiple arrows coming off of them: they act like nodes connecting all the other words. The Waves’ repeated formulas and motifs act in much the same way, becoming richly generative points in a reconfigured landscape.

Which brings me on to a broader point about using Markov chains as a way of reconfiguring texts. As human readers with human eyes and human brains, it’s hard for us to look at a text in the same way as a Markov chain does. We read sequentially, from left to right (in English, anyway), page after page. But my Markov chain bot reads The Waves like a network, one where any word can connect to any other word, no matter where it is in the text.

Rather than reading like a human, my bot reads rhizomically. For someone who’s read more Deleuze and Guattari than can be considered healthy (so, any Deleuze and Guattari…), that’s a terribly exciting prospect. Deleuze and Guattari open A Thousand Plateaus by loudly announcing the inadequacy of the book, which engenders a logic which they call ‘arborescent’ – tree-like. It’s a logic which is rigid, governed by temporality and cause and effect. It only moves in one direction, and that direction is predetermined, governed by the author of the book.

They contrast this with the rhizome, which is more akin to the roots of a plant, or a mycelium, the underground part of a fungus. This is a network which moves horizontally, along many lines at once, without privileging any set path or teleology.

Now, something has always bugged me about this. First off, trees don’t work like that: Deleuze and Guattari weren’t very good botanists. Second, they write about the inadequacy of arborescent thought in a book, printed on dead tree matter. While they encourage their readers to skip around from one chapter to another, you’re still reading a book written in characters that go from left to right, one page after the other.

(Even hypertext doesn’t quite cut it – you can move around in hypertexts far more easily than you can a physical book, but you’re still stuck putting one word after the other…)

But my Markov chain bot doesn’t read like that. It acts more like Deleuze and Guattari’s rhizomic reader than a human reader can. As readers, we can’t very easily get a handle on how Markovify does this – if you want to take a look at the data model that the bot generates, you can here, but it’s utterly unreadable. I can’t even begin to tell you how it works. But the tweets that it generates give us an insight into what it’s like to read rhizomically.

I’m just about done so I’ll leave you with my bot’s last words on the matter:

A Bot of One’s Own: Thoughts on my terrible robot child, and on Twitter bots more generally

For those of you fortunate enough not to have seen me in the past ten days or so, I’ve some news for you: I’m a parent now. Not of a human child but of a terrible robot child: @WoolfBot3000. If you’ve been cursed with my presence, then I can only apologise for harping on about it. My terrible robot child is a Twitter bot that’s set to tweet out a new opening to Mrs Dalloway every hour. You know the one – Mrs Dalloway said she would get the flowers herself. What an absolute hero.

Before we go any further, here’s some of my personal favourite WoolfBot utterances, partly to give you some idea of what the WoolfBot spits out, and partly just to show off:

My terrible robot child was surprisingly easy to make, even given that I’m the sort of humanities student whose eyes glaze over as soon as someone says ‘Javascript’. @WoolfBot3000 is run from a hosting platform called Cheap Bots Done Quick, created by George Buckenham, which does what it says on the tin. More specifically, it hosts bots like mine, like Thinkpiece Bot, like Infinite Deserts and like Soft Landscapes. All of these bots are created using a Javascript library called Tracery, developed by Kate Compton. Tracery is a tool for creating generative grammars with a minimum of fuss.

In simple terms, Tracery works a bit like Mad Libs: you give it a sentence structure with a set of placeholders, and lists of items to put in the placeholders. These items can get as long and complicated as you like, and you can nest placeholders inside items so a generated piece of text can theoretically stretch out forever. You can also set the code up to remember certain things, so that your text’s characters have a consistent name, or pronouns, for example.

A very stripped-down version of my code with most of the items missing (no spoilers!) looks like this:


“origin”: [“#[#setPronouns#]story#”],

“story”: “#title# #name# #verb1# #they# would #verb2# the #noun# #themselves#.”

“setPronouns”: [”[title:Mrs][they:she][themselves:herself]”,”[title:Mr][they:he][themselves:himself]”]

“name”: [“Dalloway”, “Ramsay”]

“verb 1”: [“said”, “pledged”]

“verb 2”: [“get”, “requisition”]

“noun”: [“flowers”, “Lighthouse”]


Most of it’s pretty self-explanatory: “origin” is at the root of Tracery’s grammar and governs what the output contains, while “story” is what determines the Tweets that you see. Items marked “name” slot neatly into the placeholder marked #name# and so on. “SetPronouns” determines whether my person is a man or a woman (or indeed non-binary) and governs how the person is referred to throughout the sentence.

So that’s how my robot child generates text. It’s not particularly advanced, but it gives me a chuckle every so often.

There’s definitely room to improve though. Right now, WoolfBot more or less tweets what I tell it to, but that’s it. It’s bound by the limits of my imagination and by what Woolf titbits I can dredge up. Right now, I’m trying to puzzle out some Python to create a new terrible robot child witha measure of artificial intelligence, so that it can write its own Woolfy creations. The details would depend on the flavour of machine learning/artificial intelligence I’d use, but essentially the new bot would teach itself to write by reading Woolf over and over. Which is really a good idea for students, come to think of it.

This brings me on to a broader point about Twitter bots and the digital humanities. Right now, as far as I’m aware, the digital humanities seem to view the ‘digital’ part as anterior to the ‘humanities’ part. Typically, no matter how invested in methodology or the act of analysis by digital means, the digital humanities tend to view its tools and methods as shedding light on an object – a text, images, an archive – that’s already been made.

Which is no bad thing: methodologies such as Franco Moretti’s distant reading wouldn’t be possible without computer-based corpus analysis to power through vast numbers of texts and pull out data, while in my own field, the Modernist Archives Publishing Project is making the Hogarth Press’s archive freely and readily available. But digital humanities scholarship has tended to ignore the generative potential of computing technologies – their ability to create something new.

My terrible robot child might not be very clever at the moment, but hopefully it’s doing the tiniest bit to tip the scales. Watch this space for more.

Hello, World?

This isn’t a ‘Hello, World’ post, exactly. More of a ‘Long time no see’ post, really. I’ve had this blog for a good long while: I used to review books here. I tried to write a review a week, every week for a year, but it turns out it’s rather hard. Woolf managed to write two a week in her early years: the first few volumes of her Collected Essays are pretty much all review after review after review. She went on to write some other stuff, also. But then, she never had to put up with Will Self: his was my last review. Go figure.

There’s probably a good post to be written about the anatomy of academic blogs’ ‘Hello, World’ posts. I’m not sure where this would fit in because, as I said, this isn’t really a ‘Hello, World’ post. That was probably my review of Beast by Paul Kingsnorth. But it’s definitely an academic blog. Or at least the blog of an academic. I’m at the University of Glasgow, doing a PhD on Virginia Woolf and institutional power, although I’ve been lured somewhat by the siren call of the archives, drawn into a tangled web of unspooled microfilm. I’d like to try to use this blog to try and talk about my work to a wider audience. That’s the plan, anyway. Or I could always go back to badmouthing Will Self.

So, not quite ‘Hello, World,’ but ‘Long time no see.’

A Book A Week #24 | Ashland & Vine, by John Burnside

Ashland & Vine, by John Burnside

Carbondale, Alabama. Jean Culver watches her father get shot, on the intersection of Ashland and Vine. So begins Culver’s tale, told to Kate Lambert, and so begins Ashland & Vine. It’s a tale that spans much of the landscape of 20th century America, taking in World War II and Korea, the Cold War and Vietnam, anti-war protesters and the Weather Underground. She tells her story to the grieving Lambert on the condition that she sobers up — if Lambert can go a day without drinking, Culver will tell her a story; another day, another story — like a Scheherazade for the self-help generation.

Lambert isn’t listening to Culver out of her own curiosity — rather, she begins talking to her in an attempt to collect testimony for an oral history project cooked up by her film studies professor boyfriend Laurits, who claims to be Estonian, and uses this to harangue his friends on “their” American history. He isn’t Estonian, but he is a cliché.

Ashland & Vine, by John Burnside

Ashland & Vine, by John Burnside

Lambert teeters on the brink of alcoholism, driven to the precipice by grief, but even in this fraught state, she never forgets her impeccable array of literary references, never forgets to ensure that everything is imbued with a Lit-101 significance. The sound of chopping wood brings forth a Proustian remembrance of woods past:

“As a child I convinced myself that the woods around our house went back to a time before the settlers arrived; ancient Iroquois lands, full of blue jays and cardinals and families of tender, sweet-lipped deer. They were my own private, haunted realm when I was a child, my small promise of heaven and, at the same time, proof of the history my father claimed as his own, for was he not at least part Native American and therefore entitled to look at those woods in a different way from his neighbours? Now, like the house, those woods are gone…”.

And so on.

Similarly, she sobers up to break out of the “tedium of the self. Not myself, but the self as random burden, imposed on a whim by some malevolent visitor from an old fairy tale.” Culver masquerades as a Scheherazade-figure, but Lambert fancies herself an existential philosopher.

For someone so insistent on telling her story, very little happens to Jean Culver herself. She watches as her father is shot in broad daylight, and seems not really to be affected by it. Her brother fights in the D-Day Landings and in France, before joining the CIA at the height of the Cold War. Her genius sister is swept up in the 1960s anti-Vietnam protests and in the Students for a Democratic Society movement, before disappearing off the map as a member of the Weather Underground. Culver herself sits in middle America, chopping wood and drinking endless cups of herbal tea. She narrates her story in an unaffected, encyclopaedic prose that conveys powerful emotion and grand historical narratives, talking about the Weather Underground with the same flat affect as the Shipping Forecast.

John Burnside is one of Ireland’s most accomplished authors and critics, and the premise for Ashland & Vine is a fascinating one. However, his attempt to read post-War American history is an attempt that falls flat, reading more as exposition than exploration, a lecture rather than a fairy tale.

John Burnside, Ashland & Vine, Jonathan Cape (London: 2016)

Jonathan Cape provided me with a review copy of Ashland & Vine.


Follow my blog with Bloglovin