Code Monkey home page Code Monkey logo

chinese-poem-generator's Introduction

Chinese-poem-generator

Chinese poem generator with LSTM network

Results

Trained on one GTX1080 for 12 hours. Went through 35% of the data and both loss and validation loss settled. See full training output here

Findings

The first few epochs started with random(very rare) charaters, with no or random punctuations. It figured out how to add punctuations into sentences after 5 epochs- one comma and one period.

After around 30 epochs the charaters used start to have a theme.

Adding dropout layer helped improve the issue of overfitting - because punctuations were so frequent comparing to other charaters, it was just generating lines of punctuations with no other contents.

Future Works

  • Does it start to rhyme at some point?
  • Group training data into catagories (5 words, 7 words, etc...)
  • Try GAN network.

Sample Acrostic Poem with different diversity level

卢夜发海与,本子自日言。伟年流客风,挂亦发子到。逼风风里帝,
凉掩思月不。凉若群水清,送归风横春。给不秋常堪,你花自风此。

卢声将日长,本阁身莫醉。伟树里峰行,挂水身如身。逼君僧远不,
凉花枝文衣。凉深咏山将,送照丹复风。给居秋万天,你竹掩云花。

卢下常半雪,本飘欲以僧。伟思还皆轻,挂酒怜鼓会。逼爱有此同,
凉闻未物为。凉余盘物远,送来应山人。给江衣松处,你见分白满。

卢不临里自,本月闲庭外。伟公中重阁,挂足枝易筵。逼堂色物况,
凉隔盘太采。凉二如不水,送浮高兰坐。给青见回生,你陵沙绝鬓。

卢黄池随方,本诗还泥与。伟西人夫月,挂山新三明。逼僧暗已时,
凉书河引贤。凉断尘酒金,送起钟上不。给若馆师穷,你晓求使不。

卢光谢华起,本年灵苔对。伟更应苦珠,挂文忆翠恩。逼暗地临风,
凉何可此好。凉游乡时柳,送飘田流对。给松和处幽,你二形静洞。

卢神霄官长,本迸忘柳阴。伟学园溪连,挂燕北阴性。逼皆欢得生,
凉隔所世何。凉所分绕禽,送恨有怀忧。给程托间雄,你空爱船变。

卢灯定逐久,本日果忘能。伟迷甘闲村,挂钟黄色颂。逼闻海每尘,
凉来盈室欢。凉看景情怜,送经万睡起。给关老舞常,你重国攀白。

卢度罗萝持,本诸发雨白。伟岸金玉汉,挂嗟随迟荒。逼若前履折,
凉园已意晚。凉翠亭薄身,送馀鸣露回。给清残狠边,你云论愁欢。

chinese-poem-generator's People

Contributors

elvisun avatar spiderpan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.