Keinoleino is an artificially intelligent poet who can write poetry in Finnish automatically. It is a computationally creative system capable of natural language generation in Finnish.
This is a refactored and updated (Python 2 to Python 3) version of the Finnish Poem Generator described in:
Hämäläinen, M. (2018). Harnessing NLG to create Finnish poetry automatically. In Proceedings of the ninth international conference on computational creativity. Association for Computational Creativity (ACC).
@inproceedings{hamalainen2018harnessing,
title={Harnessing NLG to create Finnish poetry automatically},
author={H{\"a}m{\"a}l{\"a}inen, Mika},
booktitle={Proceedings of the ninth international conference on computational creativity},
year={2018},
organization={Association for Computational Creativity (ACC)}
}
This code used to be very much integrated with the Poem Machine and it used an old version of HFST, Syntax maker and Omorfi. I have updated the code and it should work as before.
python3 -m pip install -r requirements.txt
python3 -m keinoleino.download
To create a poem about a dog (koira), run:
from keinoleino import create_poem
print(create_poem("koira"))
>> koira, tuo vähä piski
>> miten kuuliainen on piski?
>> toivonko minä, kun piski jää ?
>> olen pikkuinen
>> vaikka piskit eivät päättäisi valikosta, sinä koittaisit piskiä
>> oletko normaali?
>> valikot ovat valikkoja