Text processing is one of the most common subjects of information technology. We have numerous tools for transforming, analysing and parsing text based data in various forms and channeling this information to the end user. Somewhere along the way with the exponential growth of software user base we noticed that the computer text tends to be rigid, unnatural and sometimes completely gibberish.
Companies started hiring product owners and professional translators to alleviate this problem, however with the source of the problem, the standardisation and strict following of principles still render many apps’ language uncanny.
There has been undoubtedly great progress in the computerisation of the linguistic and cognitive proficiency in the machines, however the machines have not yet replaced playwrights, songwriters, poets and sadly the journalists.
There is however one genre of art, specifically poetry that, in author’s humble opinion, would be suitable playground for actually passable computer generated poetry.
Namely Haiku.
The enigmatic poetry genre
from Japan’s heartland
There is an element of disassociation in the way haiku is formed. There is raw brevity and detachment that one can also feel in computer generated texts.
Knowing that I decided to make a tool that would allow for a creation of haiku with computer generated content.
The result of this endeavour is gem hiq which allows for generation of Haiku containing specified words (or just random Haiku).
The gem constructs the Haiku out of pre-made line snippets which in turn have been generated from a Tensorflow RNN model. The live text generation is on the roadmap, however, due to Ruby tooling for Machine Learning not being up to date, it may be realised as a part of a port to Python / JS.
You can try the tool yourself here