Found Poem Generator – The Next Level

When the latest Ledbury Poetry Festival e-mail dropped into my inbox last week it set me thinking again about the ‘Found Poem’ Generator I had been working on using Python. The festival was announcing the debut of their collaboration between poet Sara Jane Arbury, Joined Up Heritage and Ledbury Poetry Festival who have created a poetic walk around eight key heritage sites in Ledbury using ‘found poetry’ comprising words from First World War poets and phrases contained in the buildings themselves.

Ledbury has quite a history with poetry, being the birthplace of Poet Laureate John Masefield and has close associations with the Dymock Poets.

With my current interest in ‘found poetry’, following the course I participated in on FutureLearn featuring Michael Simmons Roberts and Helen Mort, and my latent interest in Ledbury and the Ledbury Poetry Festival having lived in Ledbury for a short while, this set the thoughts rolling around in my head: what if I could extend my Found Poem Generator to create a display piece or interactive kiosk? Could this then be utilised as a poetry installation out in the real world?

So, in order to achieve this I need to:

  1. Output the created poems to a larger screen ie a graphical type large fonted output rather than  using the console window.
  2. Provide two methods of running:
    1. Auto-generate a new poem every 5 minutes or so
    2. Provide buttons for user input to create poems on demand
  3. Package the program up to be self-contained 
  4. Deploy the program onto some sort of platform that wasn’t my Mac laptop ie a Raspberry PI and large screen monitor or TV
  5. Make the program auto-run when the device is started / restarted

Further enhancements could then be:

  1. Use a text / csv file to load in the words and lines of the poems rather than the hardcoded ones used currently
  2. Check the first letter of each line to capitalise it for poems and un-capitalise it for haikus, and add commas to the end of lines if they are missing or remove for haikus.

Subscribe to my blog and watch out for these enhancements and future posts – coming soon!


Found Poem Generator – Introduction

“How do you go back to the beginning?
Short stories are the best,
It’s always one step behind me,
The fools in the hall.
When your life has already flown?
Our life, a wheel within a wheel.”

–  Shadow The Poet aka James Laurie

I recently undertook a course on learning Object Oriented Programming using Python. This is one of the many useful little courses provided by universities and hosted by the FutureLearn website which I occasionally frequent. I wrote about their Song Writing course featuring Martin Simpson a little while ago.

I spent a period of my life writing software using Borland Delphi, so I am familiar with Object Oriented Programming, or OOP as it is known using its TLA. My interest in this course was to get stuck into a language that is relevant to the hobbyist / creative and as pervasive as BASIC used to be back in the good old days of home computing. Python is built in to Linux, so features on many Raspberry Pi’s, and also is therefore MacOS and so fits the bill straight off. What also piqued my interest was that the course would teach using Python by using it to write a text-based adventure game, something I misspent an early part of my youth playing.

As I followed the course I had an idea of using what I had learnt so far to write a ‘Found Poem Generator’. Rather than creating dungeon rooms and items as Objects, I would create lines of a poem. These lines could then have attributes attached to them such as word count and syllable count, perhaps even metre or some other attribute. Once I had collected my lines, counted the words and syllables and fed them into the program I would then be able to generate poems. The results could then be edited and new poems would come into being. 

I felt there was precedent for this firstly as I sometimes do this anyway by looking at my book of fragments and pulling various lines out to create a new poem. Valerie Laws did something similar in 2002, although more organic than technological, by writing her lines on sheep and using the random wanderings and grouping of the sheep to create new poems.

Warm drift, graze gentle, White below the sky, Soft sheep, mirrors, Snow clouds.

– Valerie Law’s Sheep


At the moment the program can create a random poem based on my found lines which stored in one of its files. The command ‘poem’ followed by a number will cause it to generate a poem of that many random lines. I also store the number of words in the line and the number of syllables too as my next update will be to start incorporating standard poem forms into it. Haiku’s and other syllabic forms will probably be first.

The found lines are currently hardcoded into the program, as I still haven’t found out how to read data from a text file or spreadsheet yet using Python. In order to simplify things for myself I created a spreadsheet that I can use to hold my found lines. It has some text manipulation formulas in it that convert the lines I enter into the correct format for copying and pasting into the program file.

I have uploaded all this into a Dropbox folder here if you fancy a play with it, if you wouldn’t have a clue what to do with them then have a look at the FutureLearn course I did or look out for a future blog where I’ll try to explain.

“When your life has already flown?
Our life, a wheel within a wheel
The fools in the hall
The wind blows in gusts
Looking for that way home”

–  Shadow The Poet aka James Laurie


I Remember – Bromyard Folk Festival 2018

‘I Remember’, roughly recorded in the campsite of the Bromyard Folk Festival.

I don’t have any way of documenting the melodies for the songs I write, only the chords and lyrics, so recording them is my best option at the moment in case I forget the tune later.

The lyrics are based on the poem style of a pantoum, a form where the lines are repeated throughout the poem / song:

Stanza 1


Stanza 2


Stanza 3


Stanza 4


Front Room

Front room,
Drawing room or parlour.
Best room.
Now a store room.
I write at an old table,
With drawers and planks screwed down on top.
A phone, a mug and a crowbar
Are my companions.
The street is silent for a moment.
Unlike the time the neighbour’s dog
Barked for three nights long, three long nights.
The ink in my pen runs out
And as I return with a new cartridge
Aware of the headache arriving soon
I step on a splinter of wood
From the busted up wardrobe.
My bare foot bared,
The silence is over.


Learning Frailing Banjo Week 19

It’s week 19 and I’ve been practicing a new song ‘John Hardy’, one of the key priorities for me on the banjo is to learn the tunes and the words rather than having to depend on tabs and song sheets to remember them as I seem to have to do with the guitar. I have been practicing the first three lines of each verse (CC FC GG GG) and started by just playing the first string as the melody note for each chord. Once I had this cracked, as in I had learnt the order of the chords, I then looked again and practiced the melody strikes for each of those chords ie string 21 11 12 34 for each of those chords above. Looking at the tabs in Patrick Costello’s ‘The Outlaws and Sealawags Songbook’ there’s some funky hammer-ons and single note strikes at the end of each line to add in as well as soon as I am comfortable. That’s the great thing about learning these songs, they can be as simple or as complex as you like for your own stage of learning.

In this week’s video I also talk about making the melody notes sing and the twin trails of learning to play fast and also learning to play accurately as I fumble for the F chord.