Ever tried to teach a computer to write poetry in a language that has almost no digital linguistic resources? That’s exactly what we did.
I work at the Computational Philology Lab at Bashkir State University. While Russian and English have plenty of NLP tools, Bashkir – a Turkic language spoken in Russia – has close to none. So we decided to build something fun: a haiku generator.
The rules were simple
- First line: 5 syllables
- Second: 7 syllables
- Third: 5 syllables
- All output must be grammatically correct Bashkir
We built a dictionary of ~11,500 words and designed 90+ rhythm-grammar scenarios – templates that ensure syllable counts and grammatical agreement (cases, verb tenses, singular/plural). The algorithm randomly picks words and slots them into a scenario. Present tense appears more often than past, singular more than plural – just because it feels more natural for haiku.
What came out?
Mostly nonsense. But sometimes – pure accidental poetry.
Here’s one (translated):
Sovinformburo
takes from fire and buries. The word
fears the statue.
It reads like a surrealist miniature: war communiques, fire, burial, and a fearful “word” that brings to mind the Don Juan legend. A machine wrote this without any intent – yet it feels oddly coherent.
Another one:
Thousand cable workers
hang like leather. The ray, ah!
like tinder, does not obey.
You see contrast: dark, flexible cables vs. a straight, unbending ray of light. The computer accidentally discovered antithesis.
The unexpected part
We put the generator online as a joke. Then the media went wild. Radio, newspapers, TV – all wanted to talk about “computer haiku.” Nobody cared about our serious academic corpora or folklore databases. But a silly poetry bot? That got headlines.
Why this matters for programmers
- Low-resource languages need creative first steps. You don’t need giant transformers to have fun and learn.
- Randomness + constraints = emergent meaning. The human brain will find poetry even where none was intended.
- Grammar-first generation is possible with modest dictionaries and smart templates. Our 90 scenarios keep everything grammatical.
We’re not claiming real AI poetry. But watching a Bashkir-speaking machine accidentally write about excavators, grenade launchers, and frozen cellars? That’s entertainment – and a tiny step toward putting my language on the computational map.
👉 Want to try it? It’s online (in Bashkir, sorry). Each refresh gives you a new, never-before-seen haiku. Some are garbage. Some – just weird enough to be beautiful.
P.S. One journalist wrote we “decided to amaze the world.” We didn’t. But we’re glad it made people smile.
Top comments (0)