摘要
计算机写诗是实现计算机写作的第一步。目前计算机写诗普遍存在主题不明确、诗的内容与写作意图不一致的问题。为改善这些问题,效仿古人写诗的过程,提出了一种两个阶段生成古诗的方法。第一阶段获取写诗大纲,采用TextRank算法对用户输入文本提取关键词,并提出一种基于注意力机制的序列到序列神经网络模型用于关键词扩展;第二阶段根据写诗大纲生成每一行诗句,并提出一种包含双编码器和注意力机制的序列到序列神经网络模型用于古诗生成。最后通过对实验结果的评估验证了提出方法的有效性。与基准方法相比,该方法生成的古诗的主题意义更加明确,诗所表现的内容和写作意图更加一致。
Computer poetry generation is the first step towards computer writing. At present,there are many problems in computer poetry writing,such as unclear theme,the content of poetry is inconsistent with the writing intention. For solving these problems,this paper followed the process of writing poem by the ancient Chinese poet and proposed a method for generating Chinese poem with two stages. The first stage extracted the outline. During this process,it used TextRank algorithm to extract keywords from user input text,and proposed an attention-based sequence to sequence neural network model for expanding keyword.The second stage generated each line of poem based on the outline of poem. During this process,it proposed a sequence to sequence neural network model with dual-encoding and attention mechanism for generating Chinese poem. At the end,this paper verified the effectiveness of this approach by evaluation. Compared with baseline approach,the theme of the Chinese poem generated by this approach is more explicit,and the contents expressed by the poem are more consistent with the writing intention.
作者
黄文明
卫万成
邓珍荣
Huang Wenming;Wei Wancheng;Deng Zhenrong(College of Computer&Information Security,Guilin University of Electronic Technology,Guilin Guangxi 514004,China;Guangxi Colleges&Universities Keys Laboratory of Cloud Computing&Complex Systems,Guilin Guangxi 514004,China)
出处
《计算机应用研究》
CSCD
北大核心
2019年第12期3539-3543,共5页
Application Research of Computers
基金
广西高校云计算与复杂系统重点实验室资助项目(yf17106)
广西自然科学基金资助项目(2018GXNSFAA138132)
桂林电子科技大学研究生教育创新计划资助项目(2018YJCX55)
关键词
关键词扩展
注意力机制
序列到序列
神经网络模型
古诗生成
keywords expansion
attention mechanism
sequence to sequence
neural network model
Chinese poem generation