摘 要: 针对客服机器人答非所问的情况,提出一种结合循环神经网络学习算法LSTM(Long Short-TermMemory)、词频-逆文档频率(Term Frequency-Inverse Document Frequency, TF-IDF)算法及余弦相似度算法的客服机器人设计方法。LSTM算法利用长短记忆法更有利于联系上下文进行分词,分词准确率更高。TF-IDF算法可以将非结构化的客户提问和问题库问题用结构化的向量表示出来。通过余弦相似度算法对客户提问标签和问题库标签进行匹配,可以将最优答复提交给客户。试验结果显示,客户提问与问题A的余弦相似度值只有0.52左右,而与问题B的余弦相似度值达0.81,因此可以很好地实现答复推荐。 |
关键词: 循环神经网络;LSTM;TF-IDF;标签;余弦相似度 |
中图分类号: TP183
文献标识码: A
|
基金项目: 江苏省高校哲学社会科学研究项目“SNS对高职学生社会认知能力影响机制研究——基于‘三元交互决定论’”(2019SJA0631);江苏省大学生创新创业训练项目“校园优聘”(202112920029Y);南京科技职业学院人文社科项目“基于SIVORS模型社交媒体信息传播规律研究”(NJPI-2021-ZD-06). |
|
Research on Intelligent Customer Service Robot based on Recurrent Neural Network and Cosine Similarity Algorithm |
CAI Faqun
|
(Nanjing Polytechnic Institute Nanjing, Jiangsu 210048, China )
295463913@qq.com
|
Abstract: In view of the fact that the customer service robot does not always give a relevant answer, this paper proposes a design method of customer service robot that combines recurrent neural network learning algorithm LSTM (Long Short-Term Memory), TF-IDF (Term Frequency-Inverse Document Frequency) algorithm and cosine similarity algorithm. LSTM algorithm with long and short memory method is more conducive to word segmentation from the context, which leads to higher accuracy. TF-IDF algorithm can express unstructured customer questions and question library questions with structured vectors. The cosine similarity algorithm is used to match the customer's question tag and the question library tag, and the optimal reply can be submitted to the customer. Test results show that the cosine similarity value between the customer's question and question A is only about 0.52, while the similarity value with question B is up to 0.81. Therefore, reply recommendation can be well realized. |
Keywords: recurrent neural network; LSTM; TF-IDF; tag; cosine similarity |