C hinese O ld P oem E ditor - A modern IDE for writing classical Chinese poetry.

For macOS and Windows binaries, download the latest version on Releases page. Download link
First, install node.js, including npm.
cd into the project directory, and type npm install . This will install all the dependencies.
Finally, npm start to run the app.

Click on left side of a cell to edit its contents. The tonal pattern hints will be shown on the right. Select rhyming dictionary and verse form from the tool bar. New cells will be automatically added once you filled up empty cells, or, you can manage them by clicking Cells from the menu bar. Add comments/title/attribution to your poem by preceding a line with a octothorpe ( # ). 
Before you fill in a character, its correct tonal pattern is shown on the right in the corresponding position. After you do so, a color-coded icon is shown on the upper right corner, indicating the tonal pattern of the character, and whether it is acceptable, along with a line pointing to the error message if it is not. The checker follows the general rule of "One, Three, Five, No," yet also ensures that "Solar Flat" and "Three, Level Temperature" errors do not occurred. The rhyme of the poem is automatically inferred, and checked against each character that needs to rhyme.

You can open the rhythming dictionary as well as Kang Xi dictionary by clicking on < button on the right side of the tool bar. Type a character in the search bar, and it will be highlighted if it is in the current rhythm group. Press Enter to jump to the rhythm group it belongs to. Click on a character in the group to show its definition in Kang Xi dictionary.
You can see how your poem compares to those of Tang dynasty poets choosing from Analysis menu on the menu bar.
A 1024D feature vector is generated for each of 256 Tang dynasty poets by applying bag-of-words model to their poems in Quan Tang Shi . A similar vector is generated for the user's poem. UMAP is used to reduce the dimension to 2, so the user can see where their poem lies in feature space among Tang dynasty poets. A list of nearest-neighbors are shown on the top left.
(Note on performance of the BOW model: When used on 24153 poems of 64 most prolific poetry of Tang Dynasty, a classifier powered by finding nearest-neighbor of BOW vectors give a Top-1 accuracy of 33.4%, Top-5 accuracy of 65.6%, and Top-10 accuracy of 79.8%.)
The above picture shows the results of the operation in Li Shangyin's "Leaving the Seating in the Seating of the Du Workers' Seating". The poem should be a work by Yishan imitating Du Fu's style. The algorithm operation results show that both of them are within the top ten similarities in the poetry styles.
The above picture shows the results of the operation on Li Shangyin's "Han Stele". The poem should be a work by Yishan imitating Han Yu's style. The algorithm operation results show that both of them are within the top ten similarities in the poetry styles.
For each line in the user's poem, Quan Tang Shi is searched to find lines that are the most similar to it. This might help the user write better poems, as it shows how the great masters from the past delivered similar meanings.
The above picture shows the results of the operation on the poem "Qihuai" by Huang Jingren of the Qing Dynasty. The first two couplets of the poem should be used as Li Yishan, which is for the correct exploration of the algorithm.
Characters that are not filled or violent tonal rules in the current poetry are automatically replaced with suggested edits. Optionally uses Duality/Single and Standalone. The poetry style (poetry style) can also be selected from those of Tang Dynasty poets. Although this functionality can also be used to generate entire poetry (and it does so pretty well), such use is not encouraged as it does not coincide with the purpose of the software as an editor. Check out this project of mine for a full Chinese poetry generator.
![]() | ![]() |
|---|---|
![]() | ![]() |
All suggestions and pull requests are welcome!