古代中文诗歌的巅峰——中文格律诗,包括律诗和绝句,是中国古典诗词的奇葩。该文从已有的古今名诗中自动学习作诗知识,实现了一个中文格律诗的自动生成系统。该系统接收用户选择的表达其思路的若干个关键词作为输入,首先,利用相关词汇数据库和语言模型,实现了根据用户选定的关键词自动生成诗歌的第一句。其次,我们独创性地将格律诗的上下句关系映射为源语言到目标语言的翻译关系,设计了一个基于短语的统计机器翻译模型,从而把诗歌的第N-1句作为输入用以生成第N句。并提供了一个用户交互式的系统,使得用户可以在每一步都选择一个最佳诗句。最后,我们还精心设计了一套翔实的格律诗评测标准,并通过单句实验和全诗实验证明,该方法是诗歌产生的一个较好的方法。
Automatic poetry generation is considered difficult. In this paper, we propose a novel statistical approach for automatic generation of traditional Chinese metrical poetry from a few user-supplied keywords. A template-based model is used to automatically generate the first sentence of the poem. A phrase-based statistical machine translation model then generates additional sentences one-by-one. With our interactive model, the user can select the best sen- tence from the system's N-best output at each step. The approach has been evaluated on the generation of quatrains of 5- and 7-character lines. The evaluation metrics for single lines as well as for the whole generated poem suggest that this method is very promising.