US 11,928,434 B2
Method for text generation, device and storage medium
Jiachen Liu, Beijing (CN); Xinyan Xiao, Beijing (CN); Hua Wu, Beijing (CN); and Haifeng Wang, Beijing (CN)
Assigned to BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed by BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed on Aug. 9, 2021, as Appl. No. 17/444,693.
Claims priority of application No. 202010991790.X (CN), filed on Sep. 21, 2020.
Prior Publication US 2021/0374349 A1, Dec. 2, 2021
Int. Cl. G06F 40/56 (2020.01); G06F 40/295 (2020.01); G06N 5/022 (2023.01); G06N 20/00 (2019.01)
CPC G06F 40/295 (2020.01) [G06N 5/022 (2013.01); G06N 20/00 (2019.01); G06F 40/56 (2020.01)] 16 Claims
OG exemplary drawing
 
1. A text generation method, comprising:
obtaining corpus data;
labeling the corpus data to obtain a first constraint element;
obtaining a first generation target; and
generating a first text matching the first generation target by inputting the corpus data and the first constraint element into a generation model;
wherein generating the first text matching the first generation target by inputting the corpus data and the first constraint element into the generation model comprises:
obtaining a first sub model matching the first generation target from the generation model according to the first generation target; and
inputting the corpus data and the first constraint element into the first sub model, and generating the first text by the first sub model,
after generating the first text matching the first generation target, the method further comprises:
obtaining a second sub model associated with the first sub model, wherein corpus data of the second sub model is the first text;
labeling the first text to obtain a second constraint element corresponding to the second sub model; and
generating a second text by inputting the first text and the second constraint element into the second sub model.