摘要
针对传统的聊天机器人对话生成机制词识别率低的情况,电网企业设计一种基于seq2 seq和Attention模型的聊天机器人对话生成机制。采用最大匹配分词算法对语义匹配,由于中文领域中存在词语具有多种意思的情况,根据语义匹配结果,寻找对话中的相似词语,对聊天机器人的对话关键词进行拓展。在此基础上,利用seq2 seq模型对词向量编码和分解,结合词向量编码和分解结果与语义匹配结果,生成聊天机器人对话中的特征向量,并利用Attention模型查找聊天对话中相似成分和相异成分,根据相似度最高的问题对应的答案反应出去,进行对话,以此完成基于seq2 seq和Attention模型的聊天机器人对话生成机制的研究。实验对比结果表明,此次设计的对话生成机制比传统的生成机制词的识别率高,能够识别正确的语句,保证在实际对话中做出正确的反应。
Aiming at the low recognition rate of words in traditional chat robot dialogue generation mechanism,a chat robot dialogue generation mechanism based on seq2 seq and Attention model is designed.According to the results of semantic matching,similar words in conversation can be found,and the key words of chat robot can be expanded.On this basis,seq2 seq model is used to encode and decompose word vectors.Combinning word vector coding and decomposition results with semantic matching results,feature vectors in chat robot dialogue is generated,and Attention model is used to find similar and different components in chat dialogue,and corresponding questions according to the highest similarity are answered to dialogu.The dialogue generation mechanism of chat robot based on seq2 seq and Attention model is completed.The experimental results show that the designed dialogue generation mechanism has a higher recognition rate than the traditional generation mechanism,and can recognize the correct sentences to ensure the correct response in the actual dialogue.
作者
吴石松
林志达
WU Shisong;LIN Zhida(Southern Power Grid Digital Grid Research Institute Co.,Ltd.,Guangzhou 510000,China;China Southern Power Grid Co.,Ltd.,Guangzhou 510663,China)
出处
《自动化与仪器仪表》
2020年第7期186-189,共4页
Automation & Instrumentation
基金
中国南方电网有限责任公司科技项目(No.090000KK52170124)。