Skip to content

The Finnish Poem Generator. A computationally creative system that can generate Finnish poetry without training data.

License

Notifications You must be signed in to change notification settings

mikahama/keinoleino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keinoleino

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.

Installation

python3 -m pip install -r requirements.txt
python3 -m keinoleino.download

Usage

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

About

The Finnish Poem Generator. A computationally creative system that can generate Finnish poetry without training data.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages