Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

人工知能句集 - Collection of Artificial Intelligence Haiku #71

Open
HylisWilk opened this issue Nov 21, 2021 · 3 comments
Open

人工知能句集 - Collection of Artificial Intelligence Haiku #71

HylisWilk opened this issue Nov 21, 2021 · 3 comments

Comments

@HylisWilk
Copy link

This will be my first NaNoGenMo submission.
It's a rule-based system for generating Haiku in Japanese.
A lot of the metrics for evaluating individual verses and entire haiku have to do with Japanese word embeddings and cosine similarity.

I'll be posting the code and final pdf on the https://github.com/HylisWilk/HaikuAI repository within the next few days.
(The repo is empty right now, but I'm already doing the finishing touches on everything).

Here's a teaser of a few of the haiku generated, along some (bad) free hand translation by myself:

弱い山
枯木を捨てる
空の海

Yowai yama
Kareki wo suteru
Sora no umi

(Weak mountain,
discarding dead trees,
the sea of heaven)

長い今朝
焚火を上る
暇の国

Nagai kesa
Takibi wo agaru
Hima no kuni

(Long morning,
Climbing the open fire,
In the land of leisure)

In total there'll be between 3 and 4 thousand haiku, most of which probably nonsensical, and I'll be updating this issue and the repo as I improve the results.

@hugovk hugovk added the preview label Nov 21, 2021
@enkiv2
Copy link

enkiv2 commented Nov 21, 2021 via email

@HylisWilk
Copy link
Author

Thanks!
For each haiku there's a seasonal word that kinda gives the haiku its tone, and I grab a few words with similar word embeddings (cosine similarity) to generate the rest of the poem. Sometimes it goes a little weird, but often it generates these nature-ish sentences.

@HylisWilk
Copy link
Author

So, the submission is ready on my repository now.
The full book can be found here.
The automatic translation (Google Translate/DeepL) is pretty wild most of the times, but they make the haiku sound kinda funny.

There's some patterns I need to work on for next time, because they appear repeated many times. Something about word embeddings falling too close to each other most likely.

I'll try to make a selection of the nicest haiku in it, or the funniest ones, and post here over time. Feel free to tell me if you found any you liked as well. Any feedback is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants