Patent ID: 11899699
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 8:
9. An electronic device, comprising:
at least one processor; and
a memory in communication with the at least one processor, wherein:
the memory stores thereon instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
input a target text into a text processing model, obtain a word sequence corresponding to the target text, and generate a semantic representation sequence corresponding to the word sequence;
make a prediction about each semantic representation vector in the semantic representation sequence respectively to obtain a prediction result; and
if the prediction result indicates that a word corresponding to the semantic representation vector is capable of triggering a generation of a keyword, output the keyword based on the semantic representation vector and the prediction result; and
wherein the at least one processor is further enabled to:
sequentially scan each semantic representation vector in the semantic representation sequence;
determine a state of the keyword indicator at a current moment based on a state of the keyword indicator at a previous moment, an embedded vector of a prediction result of the keyword indicator at the previous moment, and the semantic representation vector; and
determine, based on the state of the keyword indicator at the current moment, a probability of the semantic representation vector triggering a skill phrase; and determine, based on the probability, a prediction result of the keyword indicator, wherein the prediction result comprises: the semantic representation vector is incapable of triggering generation of a skill phrase, the semantic representation vector is capable of triggering generation of a skill phrase composed of consecutive words, or the semantic representation vector is capable of triggering generation of a skill phrase composed of non-consecutive words; and
wherein the at least one processor is further enabled to:
determine an initial hidden state of a decoder based on the semantic representation vector, an embedded vector of a prediction result of the keyword indicator, and a state of the keyword indicator; and
determine, for each decoding step, a hidden state of each decoding step based on the initial hidden state, and generate the keyword by decoding the hidden state of each decoding step.