Font Size: a A A

Research On Generalized Model Of Chinese Couplet Based On Recurrent Neural Networks

Posted on:2019-12-23Degree:MasterType:Thesis
Country:ChinaCandidate:Y Y ZhuFull Text:PDF
GTID:2405330548958937Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Couplet is one of the best known traditional Chinese cultures.Chinese couplet pays attention to the neat antithesis,peace and harmony.The first sentence and the second one of a couplet must have the same number of characters,and the architectural consistency,as well.It can be said that Chinese couplet culture is the perfect crystallization of Chinese traditional culture and also is a gem of the Chinese language,with very strong sense of beauty,widely loved by people.In order to make lovers and beginners more easily to learn the knowledge of couplets,and further to carry forward and inherit the Chinese culture,the problem of automatic generation of couplets has attracted much attention in recent years.The problem of sequence generation is to generate output sequences based on a given input sequence.There are many applications for sequence generation,such as document summarization,machine translation,question answering system and so on.The couplet generation problem is also a typical sequence generation problem.Aiming at the problem of couplet generation,Encoder-Decoder model is proposed.Encoder is to transform the input sequence into a fixed length vector,and decoder is to transform the generated vector into the output sequence.The encoder and decoder could be selected as different models.They can be combined freely according to personal preferences and experimental result.Generally,we can choose recurrent neural network(RNN),convolutional neural network(CNN),bi-directional current neural bidirectional network(BiRNN)and variants of RNN such as gate recurrent unit(GRU)and long-term memory neural network(LSTM)and so on.Researchers can choose RNN as encoder and BiRNN as decoder,or choose CNN as encoder and LSTM as decoder.In the paper,we choose BiGRU as encoder and GRU as decoder.In this theis,a Chinese couplet generation model based on deep learning is designed and implemented.Within the model,BiGRU is chosen as the encoder,and GRU as the decoder,respectively.The couplets are represented by word vectors.There are two main innovations of this model.Couplet generation problem is different from other natural language understanding problems,when training the word vector,not only the context in the same sentence should considered,but also the counterpart of the word in counterpart of the line should be considered.Aiming at this characteristic of couplet generation,we trained our own word vectors,which are called the couplet character vectors.Secondly,this paper introduces two attention mechanisms(AM)in the model,the first is the conventional method,which weighted different words in the first sentence as the AM inputs of the different words in the second sentence connection.Because the effects of "attention" to the corresponding position words are different,this AM works.In order to further enhance the coherence of the overall context,second attention mechanism for the couplet generation problem is introduced in this paper.The corresponding document vector information trained by doc2 vec is added to the AM in the decoding process.The experimental results show that the effect of the model is improved after considering the corresponding relationship in the process of training the word vector.After adding the document vector of the first sentence of antithetical couplet to the decoding process,the effect of the model is also improved.In summary,the this paper,firstly,the data are collected and processed,including couplet data and symmetrical sentence in ancient poems,and then the local database of couplets is established.Secondly,two versions of the character vectors are trained by using word2 vec.One is a character vector which only takes into account the relationship between the words in the same sentence,the other character vector considered the relationship between the words in the counterpart sentence.And they are applied to the initialization of the model,respectively.Then the document vectors of first sentences of the antithetical couplet are trained,which are applied to decoding process as “attentions”.Therefore,a Chinese couplet generation model based on deep learning techniques is realized.Finally,the results on the test dataset are evaluated by several automatic evaluation methods and manual evaluation,showing that our proposed model is effective.The establishment of the automatic couplet generation model can help the couplet lovers to generate the reference couplet,so that the beginners can learn the couplet better,and appreciate the charm of Chinese language art,further love and carry forward the Chinese classic culture.
Keywords/Search Tags:Word vector, Document vector, Chinese couplets, Recurrent neural network, Gate recurrent unit, Attention mechanism
PDF Full Text Request
Related items