-
公开(公告)号:US11461549B2
公开(公告)日:2022-10-04
申请号:US16988907
申请日:2020-08-10
Inventor: Han Zhang , Dongling Xiao , Yukun Li , Yu Sun , Hao Tian , Hua Wu , Haifeng Wang
IPC: G06F40/274 , G06F40/56 , G06F40/30 , G06K9/62
Abstract: The present disclosure discloses a method and an apparatus for generating a text based on a semantic representation and relates to a field of natural language processing (NLP) technologies. The method for generating the text includes: obtaining an input text, the input text comprising a source text; obtaining a placeholder of an ith word to be predicted in a target text; obtaining a vector representation of the ith word to be predicted, in which the vector representation of the ith word to be predicted is obtained by calculating the placeholder of the ith word to be predicted, the source text and 1st to (i−1)th predicted words by employing a self-attention mechanism; and generating an ith predicted word based on the vector representation of the ith word to be predicted, to obtain a target text.
-
公开(公告)号:US20210232765A1
公开(公告)日:2021-07-29
申请号:US16988907
申请日:2020-08-10
Inventor: Han Zhang , Dongling Xiao , Yukun Li , Yu Sun , Hao Tian , Hua Wu , Haifeng Wang
IPC: G06F40/274 , G06F40/30 , G06F40/56 , G06K9/62
Abstract: The present disclosure discloses a method and an apparatus for generating a text based on a semantic representation and relates to a field of natural language processing (NLP) technologies. The method for generating the text includes: obtaining an input text, the input text comprising a source text; obtaining a placeholder of an ith word to be predicted in a target text; obtaining a vector representation of the ith word to be predicted, in which the vector representation of the ith word to be predicted is obtained by calculating the placeholder of the ith word to be predicted, the source text and 1st to (i−1)th predicted words by employing a self-attention mechanism; and generating an ith predicted word based on the vector representation of the ith word to be predicted, to obtain a target text.
-
公开(公告)号:US11562150B2
公开(公告)日:2023-01-24
申请号:US17031569
申请日:2020-09-24
Inventor: Han Zhang , Dongling Xiao , Yukun Li , Yu Sun , Hao Tian , Hua Wu , Haifeng Wang
Abstract: The present disclosure proposes a language generation method and apparatus. The method includes: performing encoding processing on an input sequence by using a preset encoder to generate a hidden state vector corresponding to the input sequence; in response to a granularity category of a second target segment being a phrase, decoding a first target segment vector, the hidden state vector, and a position vector corresponding to the second target segment by using N decoders to generate N second target segments; determining a loss value based on differences between respective N second target segments and a second target annotated segment; and performing parameter updating on the preset encoder, a preset classifier, and the N decoders based on the loss value to generate an updated language generation model for performing language generation.
-
-