Categories
ProgrammingAZ

Finnegans Wake-ify: An experiment in generative text.

For this week’s assignment in Programming A to Z, I built a simple web application that allows the user to input a paragraph of text and a computer program outputs a text that sounds like the stream-of-consciouness writing style characteristic of James Joyce’s Finnegans Wake.

Test out the generator here.

Example output (from an email I’d written):

You scraggy riverrun kidding. I completely agree with you – Eve reason shore war: recirculation interesting to me war: swerve contradictions. commodius shore bay Fantasy, for commodius commodius song “Runaway” catches you off guard vicus it war: recirculation bay Howth Castle to Eve rest Environs commodius album. recirculation every “Runaway,” Howth Castle there scraggy 10 iterations Environs passen-core am isthmus Sir Tristram I scraggy he’s captured isthmus picture Environs Europe kind Environs self-aggrandizement to side penisolate artists become victim. The real question at stake Europe war: to wielderfight degree he war: self aware. vicus everything depends on penisolate doesn’t it? We can’t tolerate blind egoism. It has to be in some way self-referential or winking or ironic.

The web app was built in ReactJS + Webpack + Node.js and you can find the full code repo here.

To do some of the text manipulation, I used nlp_compromise, a node package that allows you to use Natural Language Processing (NLP) tools in Javascript. I was disappointed, however by how limited the tool was. Next week I plan to explore using the RiTA software toolkit with NLP.

Leave a Reply

Your email address will not be published. Required fields are marked *