基于神经网络的文本风格转换
Neural Network Based Text Style Transfer
DOI: 10.12677/CSA.2020.1010199, PDF,    国家自然科学基金支持
作者: 郝志峰:广东工业大学计算机学院,广东 广州;佛山科学技术学院,数学与大数据学院,广东 佛山;陈渝升*, 蔡瑞初, 温 雯, 王丽娟:广东工业大学计算机学院,广东 广州
关键词: 长短期记忆循环神经网络文本风格转换注意力机制序列到序列框架文本生成LSTM Text Style-Transfer Attention Seq2seq Text Generation
摘要: 文本风格转换在书面创作、品牌推广等许多方面具有良好的应用前景,近年来也逐渐成为研究热点。现有的文本转换工作对风格表示简单,无法适应文本风格差异较大的场景。本文提出一种基于注意力机制的风格表示方法,增加风格特征携带的信息量。文本的文本风格转换模型包括以下步骤:首先对输入句子的词序列与词性序列进行向量化,之后经过两个Bi-LSTM编码器分别计算文本的内容与风格特征序列,将内容序列作用于LSTM解码器生成词汇,而风格序列则经过本文提出的风格调整方法,对输出的词汇概率进行调整,最终输出为指定风格的句子。实验结果表明,对于不同类型的数据,模型的转换准确率与内容保存程度均有更好表现。
Abstract: The existing method has simple style representation, and cannot be adapted to datasets with large differences in text style. The article proposes a style representation method based on attention mechanism to increase the amount of information carried by style features. The text style conversion model of text includes the following steps: firstly vectorize the word sequence and part-of-speech sequence of the input sentence, and then calculate the content and style feature sequences of the text through two Bi-LSTM encoders respectively, and apply the content sequence to LSTM decoding. The generator generates vocabulary, and the style sequence is adjusted by the style adjustment method proposed in this paper to adjust the output vocabulary probability, and finally output a sentence with a specified style. The experimental results show that the model performs well for different types of data, indicating that the proposed model has good adaptability.
文章引用:郝志峰, 陈渝升, 蔡瑞初, 温雯, 王丽娟. 基于神经网络的文本风格转换[J]. 计算机科学与应用, 2020, 10(10): 1888-1899. https://doi.org/10.12677/CSA.2020.1010199

参考文献

[1] Kabbara, J. and Cheung, J.C.K. (2016) Stylistic Transfer in Natural Language Generation Systems Using Recurrent Neural Networks. Proceedings of the Workshop on Uphill Battles in Language Processing: Scaling Early Achievements to Robust Methods, Austin, TX, November 2016, 43-47. [Google Scholar] [CrossRef
[2] Xu, W., Rit-ter, A., Dolan, B., et al. (2012) Paraphrasing for Style. International Conference on Computational Linguistics, 2899-2914.
[3] Jang, S.W., Min, J. and Kwon, M. (2017) Writing Style Conversion using Neural Machine Transla-tion.
[4] Jhamtani, H., Gangal, V., Hovy, E., et al. (2017) Shakespearizing Modern Language Using Copy-Enriched Sequence-to-Sequence Models. Entropy (Type. Dist), 6, 6.06.
[5] Singh, A. and Palod, R. (2018) Sentiment Transfer Using Seq2Seq Adversarial Autoencoders. arXiv: Computation and Language.
[6] Zhang, Z., Ren, S., Liu, S., et al. (2018) Style Transfer as Unsupervised Machine Translation. arXiv: Computation and Language.
[7] Shen, T., Lei, T., Barzilay, R., et al. (2017) Style Transfer from Non-Parallel Text by Cross-Alignment. Advances in Neural Information Processing Systems, 6830-6841.
[8] Fu, Z., Tan, X., Peng, N., et al. (2018) Style Transfer in Text: Exploration and Evaluation. National Conference on Artificial Intelligence, 663-670.
[9] Yamshchikov, I.P., Shibaev, V., Nagaev, A., et al. (2019) Decomposing Textual Information for Style Transfer. arXiv: Computation and Language. [Google Scholar] [CrossRef
[10] Wang, Y., Wu, Y., Mou, L., et al. (2019) Harnessing Pre-Trained Neural Networks with Rules for Formality Style Transfer. Empirical Methods in Natural Language Processing, 3571-3576.
[11] Bowman, S.R., Vilnis, L., Vinyals, O., et al. (2015) Generating Sentences from a Continuous Space. arXiv preprint arXiv:1511.06349. [Google Scholar] [CrossRef
[12] Mueller, J., Gifford, D. and Jaakkola, T. (2017) Sequence to Better Sequence: Continuous Revision of Combinatorial Structures. International Conference on Machine Learning, 2536-2544.
[13] Zhang, Y., Sun, X., Xu, J., et al. (2018) Learning Sentiment Memories for Senti-ment Modification without Parallel Data. Proceedings of the 2018 Conference on Empirical Methods in Natural Lan-guage Processing, Brussels, 1103-1108. [Google Scholar] [CrossRef