A method and device for establishing a keyword generation model. The method comprises: obtaining sample data, the sample data comprising sample text and Mi sample keywords of the sample text (S110); determining, according to the sample text and the Mi sample keywords, Mi text-keyword pairs corresponding to the sample data, wherein the ith text-keyword pair in the Mi text-keyword pairs comprises the sample text and the ith sample keyword (S120); and establishing a keyword generation model according to the Mi text-keyword pairs and an encoder-decoder model, wherein the encoder-decoder model comprises an encoder model and a decoder model, and the keyword generation model is used for representing the mapping relationship between a word sequence in the sample text and word sequences in the sample keywords (S130). The method and device for establishing a keyword generation model can establish a model capable of effectively extracting text keywords.
展开▼
机译:建立关键字生成模型的方法和装置。该方法包括:获取样本数据,该样本数据包括样本文本和样本文本的M i Sub>个样本关键字(S110);根据样本文本和M i Sub>个样本关键字,确定样本数据对应的M i Sub>个文本-关键字对,其中,M个中的第i个文本-关键字对 i Sub>个文本-关键字对包括样本文本和第i个样本关键字(S120);根据M i Sub>个文本-关键词对和编码解码器模型建立关键词生成模型,所述编码解码器模型包括编码器模型和解码器模型,所述关键词生成模型为用于表示示例文本中的单词序列与示例关键字中的单词序列之间的映射关系(S130)。建立关键词生成模型的方法和装置可以建立能够有效提取文本关键词的模型。
展开▼