← all repositories
lucasjinreal/tensorflow_poems

TensorFlow 1.x poet cranks out Tang-style verse, occasionally rhymes

A character-level LSTM trained on 40,000 Tang poems that generates Chinese poetry and the odd Jay Chou pastiche.

tensorflow_poems
Velocity · 7d
+1.1
★ / day
Trend
steady
star history

What it does

This is a straightforward LSTM/RNN language model built on TensorFlow 1.10 that learns from roughly 40,000 Tang dynasty poems, then generates new five-character quatrains on demand. It also does acrostic poems (藏头诗) where each line starts with a user-specified character, and has a half-baked mode for pop lyrics trained on 112 Jay Chou songs.

The interesting bit

The value is in the data curation, not the architecture. The author prepped the full Tang corpus, handled preprocessing, and shipped pretrained weights so you can run python3 compose_poem.py without training. For Chinese NLP circa 2017, that was genuinely useful glue work.

Key highlights

  • Character-level LSTM trained on ~40k Tang poems; generates five-character lines
  • Acrostic generation: specify starting characters, get a poem built around them
  • Pretrained model included; train.py and compose_poem.py are the only entry points
  • Also attempts pop lyrics generation (112-song dataset, results described as “a bit melancholy”)
  • Apache licensed, actively maintained through at least 2018 for API drift fixes

Caveats

  • Stuck on TensorFlow 1.10; the README explicitly notes API breakage as a maintenance burden
  • Lyric mode is starved for data (112 songs) and the author admits the output doesn’t match the target style
  • Last meaningful feature update was 2018; “under” version badge suggests it’s not tracking TF 2.x

Verdict

Worth a look if you need a working, pretrained Chinese poetry generator for demos or cultural NLP experiments. Skip it if you want modern transformer-based verse or a maintained TF 2.x/Keras codebase.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.