I love songs with a story. On my last trip to New York, the first place I went to see was a facade of a certain Manhattan hotel, just because Leonard Cohen wrote an (in)famous song about it. I remember you well from the Chelsea Hotel…
It’s a beautiful piece inspired by Cohen’s relation with Janis Joplin. It’s about the power of art that transcends human imperfections (We’re ugly, but we have the music…). It also features a pretty specific account of physical affection that caused a minor scandal when the song came out.
I solemnly swear that I am up to no good
“Chealsea Hotel” is a great song with a great story. But what if I didn’t know about it when I came to New York?
For traveling song geeks like me, it would be useful to have a map showing places of interest from songs we like, so that we can discover those places when we travel. Let’s make one for Leonard Cohen!
Locating the songs
First, we will need the lyrics of Cohen’s songs. These can be easily found online. A Python library lyricsgenius makes it easy to download them for local processing.
For each song, we will extract the geographical references from the lyrics. Similarly to our earlier experiment with theater plays, we can use a Large Language Model to help with that. The prompt I used this time goes something like this:
Identify geographic locations (places, towns, cities) referenced in the song lyrics below. If there are multiple places refenced, respond with a single place that is featured most prominently.
The response should be extremely short, just indicate the place, town and the country, for example: "Warsaw, Poland” or "Melbourne, Australia"
If there are no geographical references in the lyrics, respond with just "Nope"
It works! ⬇️
Results
In total the script processed 362 songs, including 18 with locations found and 344 nopes. A few of of them turned out not to be songs but poems (from Cohen’s collection The Flame) which I manually filtered out.
GPT missed the somewhat hidden location reference in “Suzanne”. ChatGPT gets it right, but only if pressed with a little hint:
GPT: The song "Suzanne" by Leonard Cohen contains references to several geographical locations, but these are not precise towns or cities.
me: Try harder. What does "Our lady of the harbour" refer to ?
GPT: I apologize for the previous oversight. The line "Our lady of the harbour" in the song "Suzanne" by Leonard Cohen refers to the statue of the Virgin Mary that is often depicted as the protector of sailors. This location is likely Montreal, where Cohen wrote the song, and the statue might be referring to the Notre-Dame-de-Bon-Secours Chapel, commonly known as the "Sailors' Church”
The total cost of all the GPT calls was $1.70 (I made ~5 GPT calls for every song as I was iterating on the prompt).
Cartography of Leonard Cohen
The resulting songs are few enough that I could put them on a map manually. See a published version here.
It’s a modest map, but the pipeline can be easily extended:
add more artists beyond Leonard Cohen
automate creation of the map, and maybe make it into a globe. Like in this project showing famous people born in each place around the world
In other news
📄 Catching up on the weird world of LLMs – Introduction to Large Language Models like the one that identified location references in Cohen’s songs for us. Recent and insightful
Going deeper on Chelsea Hotel: Jeffrey Lewis’s 🎵 song about Leonard Cohen’s song about Chelsea Hotel, probably NSFW
Postcard from Faroe Islands
Rare moment of sunshine in the remote archipelago of 🇫🇴 Faroe Islands (autonomous territory of the Kingdom of Denmark). It’s cold and wet and very picturesque!
Have a great week 💫,
– Przemek