News

Haiku at Innovation Week, The Royal Danish Library

Posted by: DIGHUMLAB , June 24, 2019

INNOVATION WEEK: The Royal Danish Library welcomed visitor from The National Library of Scotland

During Innovation Week May 20-25, 2019 at The Royal Danish Library, Martin Shatwell from The National Library of Scotland visited IT Development in Aarhus and participated in the events and activities during the whole week. 

During the week, Martin took the opportunity to work with an advanced technique for generating haiku poems from digitised text collections. He obtained several exciting results and shares his thoughts and experiences about the week – as well as his favourite haiku generated by the program – below.

Interview with Martin Shatwell, National Library of Scotland

Why did you come to Aarhus to participate in The Royal Danish Library’s Innovation Week?

“Initially, I was asked by my manager if I’d like to go to Denmark and work with developers at the Royal Danish Library. It wasn’t really a difficult question to answer; I figured it’d give me a chance to meet people who work in a similar field to myself, and I’d get to see how they might approach tasks in ways I wouldn’t necessarily have considered before. I’d also never seen or travelled to Denmark.”

What did you work with?

“Before going to Denmark, Stuart Lewis, the Director of Digital at National Library of Scotland (NLS), seemed keen for me to work with data from NLS, and Sarah Ames (Digital Scholarship Librarian) had asked, providing it was possible, if could I work with text/transcription data. As such, I figured I’d look into natural language processing (NLP) techniques and decided to see if I could generate haikus using NLS ocr transcriptions of digitised materials. Generating haikus isn’t the most useful application of transcription data (to say the least), but trying to reach this goal would allow me to learn a plethora of NLP techniques that could be applied in difference circumstances.”

What results did you reach?

“Out of the haikus I generated this is the one I was happiest with. When it’s first read, it has this slight air of profundity and melancholy that is soon lost when you realise it doesn’t make sense.

As I said previously the haiku is just a way to implement the techniques I learnt about; on the NLP side I looked into tokenizing, stemming, lemmatisation, part of speech tagging, sentiment analysis etc. I also looked into text generation techniques, but I only had time to implement Markov chains from bi-grams; I’m pretty happy with the algorithm I came up with for generating the transition matrix though. If I do get time in the future to look into text generation, I’d like to try and implement a recurrent neural network of long short-term memory units. At the start of the week, I also spent time experimenting with topic modelling, and I did learn how Latent Dirichlet Allocation (LDA) can be used for this, but, unfortunately, my implementation was a bit sloppy, and I didn’t have the time to reset and try again; this is something I’d also like to experiment with if I ever get time to work on it.”

What were your main takeaways from working here that you can (or be inspired to) use at your own workplace?

“On the practical side, I can see a lot of uses for the NLP techniques I was able to learn; my first thought would be to use it in combination with topic modelling to automatically generate semantic indexing of digitised content.”

How did you find the environment (socially, workspace, events etc.)?

“I liked the office and workspace in Aarhus; it might be due to my familiarity to my office in Edinburgh, but I think I prefer the workspace in Aarhus – there is more natural light, and the building is situated in a good location on the edge of the university park. Socially, everyone made me feel welcome. On a personal note, what I found particularly refreshing was the ability to have engaging discussions about different development technologies and approaches; the beer was good too.”

Overall, how will you rate the experience in working with The Royal Danish Library in Aarhus?

“I really enjoyed my time working alongside the developers in Aarhus; as I’ve said previously, everyone was really friendly and I was able to learn a lot of techniques/technologies new to me.

Before taking part in innovation week, I hadn’t really grasped what it was. I saw it as a chance to meet and socialise with other developers and an opportunity to visit Denmark; which I did enjoy doing. Looking at it retrospectively, I think I can see wider benefits of it. Library developers are, I feel, in a somewhat unique position. They work with and are aware of the vast resources a library has to offer users and they also use and work with new digital tools and software. Giving the developers time (without the pressure of having to deliver a product) to experiment and try things out might lead to new and innovative ways to interact and work with the library’s collections; this will help retain current library users and attract new users.”