没有合适的资源?快使用搜索试试~ 我知道了~
《基于规划的神经网络中文诗歌生成》 中国诗歌生成是自然语言处理领域的一项极具挑战性的任务。这篇论文提出了一种新颖的两阶段诗歌生成方法,首先根据用户的写作意图规划诗歌的子主题,然后使用改进的循环神经网络编码器-解码器框架逐行生成诗歌。这种方法基于规划的特性可以确保生成的诗歌具有连贯性和与用户意图的一致性。 在传统的中国诗歌中,它是中国文化的重要遗产。两千多年的历史中,无数优美的诗篇赞美了英雄人物、美丽风景、爱情与友情等。唐诗、宋词等不同类型的古典诗歌各有其特定的结构、韵律和声调模式。例如,四言诗是中国古代最受欢迎的诗歌形式之一,其规则包括:诗由四行组成,每行五或七个字;每个字有平声(平调)或仄声(仄调)之分;对联的第二行和最后一行的末尾字必须属于同一韵部(王,2002年)。严格的规定使得优秀的四言诗充满了节奏美。 近年来,自动诗歌生成的研究引起了广泛的关注。传统的统计方法和早期的机器学习模型尽管取得了一定的成果,但往往难以捕捉到诗歌内在的韵律和意境。随着深度学习的发展,尤其是循环神经网络(RNN)和Transformer等模型的出现,诗歌生成技术有了显著的进步。然而,这些模型在生成诗歌时,可能会导致语义的不连贯和整体结构的松散。 本文提出的规划基
资源推荐
资源详情
资源评论
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/release/download_crawler_static/86279655/bg1.jpg)
Chinese Poetry Generation with Planning based Neural Network
Zhe Wang
†
, Wei He
‡
, Hua Wu
‡
, Haiyang Wu
‡
, Wei Li
‡
, Haifeng Wang
‡
, Enhong Chen
†
†
University of Science and Technology of China, Hefei, China
‡
Baidu Inc., Beijing, China
xiaose@mail.ustc.edu.cn, cheneh@ustc.edu.cn
{hewei06, wu hua, wuhaiyang, liwei08, wanghaifeng}@baidu.com
Abstract
Chinese poetry generation is a very challenging task in natural language processing. In this paper,
we propose a novel two-stage poetry generating method which first plans the sub-topics of the
poem according to the user’s writing intent, and then generates each line of the poem sequentially,
using a modified recurrent neural network encoder-decoder framework. The proposed planning-
based method can ensure that the generated poem is coherent and semantically consistent with the
user’s intent. A comprehensive evaluation with human judgments demonstrates that our proposed
approach outperforms the state-of-the-art poetry generating methods and the poem quality is
somehow comparable to human poets.
1 Introduction
The classical Chinese poetry is a great and important heritage of Chinese culture. During the history
of more than two thousand years, millions of beautiful poems are written to praise heroic characters,
beautiful scenery, love, friendship, etc. There are different kinds of Chinese classical poetry, such as
Tang poetry and Song iambics. Each type of poetry has to follow some specific structural, rhythmical
and tonal patterns. Table 1 shows an example of quatrain which was one of the most popular genres of
poetry in China. The principles of a quatrain include: The poem consists of four lines and each line has
five or seven characters; every character has a particular tone, Ping (the level tone) or Ze (the downward
tone); the last character of the second and last line in a quatrain must belong to the same rhyme category
(Wang, 2002). With such strict restrictions, the well-written quatrain is full of rhythmic beauty.
In recent years, the research of automatic poetry generation has received great attention. Most ap-
proaches employ rules or templates (Tosa et al., 2008; Wu et al., 2009; Netzer et al., 2009; Oliveira,
2009; Oliveira, 2012), genetic algorithms (Manurung, 2004; Zhou et al., 2010; Manurung et al., 2012),
summarization methods (Yan et al., 2013) and statistical machine translation methods (Jiang and Zhou,
2008; He et al., 2012) to generate poems. More recently, deep learning methods have emerged as a
promising discipline, which considers the poetry generation as a sequence-to-sequence generation prob-
lem (Zhang and Lapata, 2014; Wang et al., 2016; Yi et al., 2016). These methods usually generate the
first line by selecting one line from the dataset of poems according to the user’s writing intents (usually
a set of keywords), and the other three lines are generated based on the first line and the previous lines.
The user’s writing intent can only affect the first line, and the rest three lines may have no association
with the main topic of the poem, which may lead to semantic inconsistency when generating poems. In
addition, topics of poems are usually represented by the words from the collected poems in the training
corpus. But as we know, the words used in poems, especially poems written in ancient time, are different
from modern languages. As a consequence, the existing methods may fail to generate meaningful poems
if a user wants to write a poem for a modern term (e.g., Barack Obama).
In this paper, we propose a novel poetry generating method which generates poems in a two-stage
procedure: the contents of poems (“what to say”) are first explicitly planned, and then surface realization
(“how to say”) is conducted. Given a user’s writing intent which can be a set of keywords, a sentence or
This work is licensed under a Creative Commons Attribution 4.0 International License. License details: http://
creativecommons.org/licenses/by/4.0/
arXiv:1610.09889v2 [cs.CL] 7 Dec 2016
![](https://csdnimg.cn/release/download_crawler_static/86279655/bg2.jpg)
静夜思 Thoughts in a Still Night
床前明月光光光, (P P Z Z P) The luminous moonshine before my bed,
疑是地上霜霜霜。 (* Z Z P P) Is thought to be the frost fallen on the ground.
举头望明月, (* Z P P Z) I lift my head to gaze at the cliff moon,
低头思故乡乡乡。 (P P Z Z P) And then bow down to muse on my distant home.
Table 1: An example of Tang poetry. The tone is shown at the end of each line. P represents the
level-tone, and Z represents the downward-tone; * indicates that the tone can be either. The rhyming
characters are in boldface.
even a document described by natural language, the first step is to determine a sequence of sub-topics for
the poem using a poem planning model, with each line represented by a sub-topic. The poem planning
model decomposes the user’s writing intent into a series of sub-topics, and each sub-topic is related to
the main topic and represents an aspect of the writing intent. Then the poem is generated line by line,
and each line is generated according to the corresponding sub-topic and the preceding generated lines,
using a recurrent neural network based encoder-decoder model (RNN enc-dec). We modify the RNN
enc-dec framework to support encoding of both sub-topics and the preceding lines. The planning based
mechanism has two advantages compared to the previous methods. First, every line of the generated
poem has a closer connection to user’s writing intent. Second, the poem planning model can learn from
extra knowledge source besides the poem data, such as large-scale web data or knowledge extracted from
encyclopedias. As a consequence, it can bridge the modern concepts and the set of words covered by
ancient poems. Take the term “Barack Obama” as the example: using the knowledge from encyclopedias,
the poem planning model can extend the user’s query, Barack Obama, to a series of sub-topics such as
outstanding, power, etc., therefore ensuring semantic consistency in the generated poems.
The contribution of this paper is two-fold. First, we propose a planning-based poetry generating
framework, which explicitly plans the sub-topic of each line. Second, we use a modified RNN encoder-
decoder framework, which supports encoding of both sub-topics and the preceding lines, to generate the
poem line by line.
The rest of this paper is organized as follows. Section 2 describes some previous work on poetry
generation and compares our work with previous methods. Section 3 describes our planning based
poetry generation framework. We introduce the datasets and experimental results in Section 4. Section 5
concludes the paper.
2 Related Work
Poetry generation is a challenging task in NLP. Oliveira et al. (2009; 2012; 2014) proposed a poem
generation method based on semantic and grammar templates. Netzer et al. (2009) employed a method
based on word association measures. Tosa et al. (2008) and Wu et al. (2009) used a phrase search
approach for Japanese poem generation. Greene et al. (2010) applied statistical methods to analyze,
generate and translate rhythmic poetry. Colton et al. (2012) described a corpus-based poetry generation
system that uses templates to construct poems according to the given constrains. Yan et al. (2013)
considered the poetry generation as an optimization problem based on a summarization framework with
several constraints. Manurung (2004; 2012) and Zhou et al. (2010) used genetic algorithms for generating
poems. An important approach to poem generation is based on statistical machine translation (SMT).
Jiang and Zhou (2008) used an SMT-based model in generating Chinese couplets which can be regarded
as simplified regulated verses with only two lines. The first line is regarded as the source language and
translated into the second line. He et al. (2012) extended this method to generate quatrains by translating
the previous line to the next line sequentially.
Recently, deep learning methods achieve great success in poem generation. Zhang and Lapata (2014)
proposed a quatrain generation model based on recurrent neural network (RNN). The approach gener-
ates the first line from the given keywords with a recurrent neural network language model (RNNLM)
(Mikolov et al., 2010) and then the subsequent lines are generated sequentially by accumulating the sta-
tus of the lines that have been generated so far. Wang et al. (2016) generated the Chinese Song iambics
剩余10页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/283f3f6969f54316a1caac3c45699df5_weixin_35751194.jpg!1)
13572025090
- 粉丝: 200
- 资源: 313
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)