| Text filling,a significant research subject in the field of text generation,can be widely applied in practical prospects.Fill in the missing part by missing part of the surrounding environment(context)to generate a text that can highly restore the original semantics and coherent word order.It has important research value and is suitable for filling in part of image subtitles,historical document restoration,generation of hidden poems,and intelligence.Analysis and many other natural language generation programs.However,the current research on text infilling is still in the initial stage.The main reasons are that traditional algorithms often have problems such as data sparseness,inaccurate semantic feature vector representation,and lack of key information.The tasks related to text infilling cannot be completed well.Regarding the above-mentioned defects,this paper studies the text infilling method,which is based on deep learning,then,apply it in the applying task of ancient text restoration to improve the accuracy.This paper aiming at solving the inaccurate of text filling due to the insufficient of the text semantic information mining.In the first place,to express the semantic information of the text,this paper designs a semantic feature representation model that based on dynamic selection of sub-word and word level to research the semantic feature represent task,next,this paper come up with a text filling model of key semantic information selection mechanism to solve the inaccuracy text filling due to the insufficient text semantic information mining.The main innovations and contributions are as follows:1.As for the inaccurate expression of text semantic that result from lack of training sample to learn effective word level feature information,this article designs a semantic feature representation model that based on dynamic selection of sub-word and word level.First of all,on the basis of Skip-Gram,we programing a subword-level semantic feature vector representation model based on Bi-LSTM.Second,we design a new gated dynamic selection mechanism,which can combine sub-words and word-level feature vectors dynamically through calculating the weight coefficient of words,and get the final word vector feature representation.At last,obtain the final sentence semantic feature representation by the Bi-LSTM network.Experimental results show that the method proposed in this paper is better than other semantic representation methods.The mechanism provided by dynamic gating captures the semantic feature representation at the word level and improves the performance of downstream sentence-level tasks.2.To take advantage of the way above mentioned and solve the inaccurate filling by insufficient text semantic information mining,this paper carried out the following work.In view of the lack of key semantic information in text infilling,which results in weak semantic coherence of the filled text and inconsistent with the semantics of the original text,a text infilling model with a key semantic information selection mechanism is designed.Firstly,this paper uses the Bi-LSTM network to obtain context-hidden features.Then,an information selection mechanism is designed to obtain context-critical semantic features by calculating the semantic distribution weight of words in the text.Finally,design an information selection mechanism,obtain contextual key semantic features by calculating the semantic weight distribution of words in the text.Last,catch local context key information and global semantic information through multi-head attention mechanism to fill the missing parts individually.Experimental results show that the model proposed in this paper can improve the logic of semantics,thereby improving the quality of text filling,which is better than other text filling models.To sum up,this article solves the problems of inaccurate representation of text semantic features and poor filling effect from the aspects of perfecting the feature representation method and accurately locating key semantic information in the text filling model,and has achieved significant results.The text filling technology is applied to the ancient text restoration task to provide technical support. |