The application discloses a kind of based on template
sentence enhancement's
paraphrase sentence generation method, steps are as follows: step 1: obtain original
sentence, and obtain the target
paraphrase sentence of original sentence in parallel corpus, use the method of rule to retrieve 1 sentence from parallel predata with the highest similarity with target
paraphrase sentence as optimal sentence as reference;Step 2: different part-of-speech special symbols are used to replace
noun,
verb,
adjective and
adverb in optimal sentence to construct template sentence;Step 3: original sentence and template sentence are spliced through special symbol and joint, and the spliced sentence is used as the input of paraphrase generation model, and the paraphrase generation model outputs several paraphrase sentences;Step 4: the similarity of several paraphrase sentences and original sentence in grammatical structure and
semantics is calculated, and the highest similarity paraphrase sentence is used as the optimal paraphrase sentence of original sentence.The application avoids the information dependence of model
training phase in template sentence by masking the words of related part-of-speech in template sentence.