SP-GPT2: Semantics Improvement in Vietnamese Poetry Generation

Tuan Nguyen, Hanh Pham, Truong Bui, Tan Nguyen, Duc Luong +1 more
10/10/2021
11 citations
cs.CLcs.AIcs.LG

Official code: fsoft-ailab/Poem-Generator (35 stars, Python, MIT, last commit 2021-08-27).

Abstract

Automatic text generation has garnered growing attention in recent years as an essential step towards computer creativity. Generative Pretraining Transformer 2 (GPT2) is one of the state of the art approaches that have excellent successes.

Show full abstract

In this paper, we took the first step to investigate the power of GPT2 in traditional Vietnamese poetry generation. In the earlier time, our experiment with base GPT2 was quite good at generating the poem in the proper template. Though it can learn the patterns, including rhyme and tone rules, from the training data, like almost all other text generation approaches, the poems generated still has a topic drift and semantic inconsistency. To improve the cohesion within the poems, we proposed a new model SP-GPT2 (semantic poem GPT2) which was built on the top GPT2 model and an additional loss to constrain context throughout the entire poem. For better evaluation, we examined the methods by both automatic quantitative evaluation and human evaluation. Both automatic and human evaluation demonstrated that our approach can generate poems that have better cohesion without losing the quality due to additional loss. At the same time, we are the pioneers of this topic. We released the first computational scoring module for poems generated in the template containing the style rule dictionary. Additionally, we are the first to publish a Luc-Bat dataset, including 87609 Luc Bat poems, which is equivalent to about 2.6 million sentences, combined with about 83579 poems in other styles was also published for further exploration. The code is available at https://github.com/fsoft-ailab/Poem-Generator

View on arXivView PDF

Code Implementations(1)

MIT
3515Python, Jupyter NotebookJul 7, 20215 years agoMIT

Similar Papers

Cite this paper

@article{nguyen2021spgpt,
  title  = {SP-GPT2: Semantics Improvement in Vietnamese Poetry Generation},
  author = {Tuan Nguyen and Hanh Pham and Truong Bui and Tan Nguyen and Duc Luong and Phong Nguyen},
  year   = {2021},
  eprint = {2110.15723},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.15723}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.15723.svg)](https://codeofpaper.com/paper/2110.15723)

Discussion