CPC G06F 16/3329 (2019.01) [G06F 16/335 (2019.01); G06F 40/20 (2020.01)] | 15 Claims |
1. A keyword generating method, comprising:
inputting a target text into a text processing model, obtaining a word sequence corresponding to the target text, and generating a semantic representation sequence corresponding to the word sequence;
making 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, outputting the keyword based on the semantic representation vector and the prediction result; and
wherein the making a prediction about each semantic representation vector in the semantic representation sequence respectively to obtain a prediction result comprises:
sequentially scanning, by a keyword indicator in the text processing model, each semantic representation vector in the semantic representation sequence;
determining 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
determining, based on the state of the keyword indicator at the current moment, a probability of the semantic representation vector triggering a skill phrase; and determining, 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 outputting the keyword based on the semantic representation vector and the prediction result comprises:
determining, by a decoder, an initial hidden state of the 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
determining, for each decoding step, a hidden state of each decoding step based on the initial hidden state, and generating the keyword by decoding the hidden state of each decoding step.
|