Font Size: a A A

Research And Implementation Of Chinese Couplet Generation System Based On Deep Neural Network

Posted on:2021-03-20Degree:MasterType:Thesis
Country:ChinaCandidate:J ZhangFull Text:PDF
GTID:2415330614463718Subject:Electronic and communication engineering
Abstract/Summary:PDF Full Text Request
The couplet is a unique art form in the Chinese traditional culture,which requires the antecedent clause(the first sentence in the couplet)and the subsequent clause(the second sentence in the couplet)follow some strict restrictions and reflects the beauty of Chinese language.The couplet plays an important role in expressing emotions on many festival occasions,which is loved by Chinese people.Creating couplets is a difficult task for ordinary people due to the strict format and content requirements of couplets.Therefore,generating couplets using computers gives the public the opportunity to create couplets.However,the meaning and context of natural language are very complex.For computers,even a very simple language cannot be accurately understood,thus automatic generation of couplets is a challenging task.With the technology of deep neural network,this thesis improves the attention mechanism-based Transformer model,and realizes the generation system of Chinese couplets based on the improved model.For performance evaluation,this thesis refers to three evaluation methods including BLEU,perplexity and artificial evaluation commonly used in machine translation to evaluate the results of all the models proposed.The performance of the model is directly proportional to the BLEU score and inversely proportional to the perplexity score.The main contributions are as follows:1)First,this thesis compares the Transformer based couplet generation model with the existing two schemes: the model based on Encoder-Decoder framework and the Encoder-Decoder framework with attention mechanism.Experimental results confirm the effectiveness of attention mechanism in couplet generation task.The model using attention-based Transformer is used as the baseline model and compared with the three improvement ways proposed in this thesis.2)Then,in order to utilize the linguistic knowledge of Chinese language,this thesis introduces pos(part-of-speech)features into the model.A couplet should be neat in antithesis,and the pos of words in the same position of the two sentences should be consistent.Existing work does not explicitly consider this constraint.In this thesis,a word vector training method combined with pos information is used.Specifically,the tapped pos corpus and original corpus are separated for word vector training.Then the obtained pos vector and word vector are fused in a certain way,and the neural network is trained using the fused word vector.Compared with the baseline model,the improved model improves the BLEU score on the test set by 0.059,and reduces the perplexity by 2.51.3)This thesis proposes a low-frequency word processing method,aiming at solving the problem of unregistered words and low-frequency words encountered in the process of model training and prediction.Specifically,through inferring the similarity between words,high-frequency words similar to unregistered words and low-frequency words are used to replace them.Under the condition of using this substitution mechanism,the size of the target dictionary is reduced by about 16%.Compared with the baseline model,the improved model improves the BLEU score on the test set by 0.004.4)Finally,to further improve the quality of the subsequent clause generated by the system.This thesis proposes a couplet polish-up mechanism,inspired by the way that poets iteratively modify when creating poetry.Specifically,in our work,the subsequent clause generated by the decoder is re-processed by attention mechanism,which includes self-attention calculation and contextual attention calculation.The results of experiments show that,compared to the baseline Transformer model,the model with polish-up mechanism improves the BLEU score on the test set by 0.038 and the perplexity decreases by 3.6.The results prove that the polish mechanism has a positive effect on the model.After adding three methods to the model at the same time,the BLEU score of the improved model was increased by 0.066,and the perplexity score was reduced by 5.33,which confirms the effectiveness of the method proposed in this thesis.
Keywords/Search Tags:couplet generation, Transformer, part-of-speech features, unregistered words, low-frequency words, polish-up mechanism
PDF Full Text Request
Related items