kuakua_robot
kuakua_robot copied to clipboard
夸夸机器人
夸夸!!!
基于话题相似度的夸夸机器人
语料来自豆瓣表扬小组,详见https://github.com/xiaopangxia/kuakua_corpus
相似度采用TF-IDF、LSI、LDA等,搜索top4相似话题的回复,从中随机返回表扬语句,效果还不错。
食用方法
将sim_kuakua移动到项目文件夹,在你的项目内使用
from sim_kuakua import kuakuaChat
直接在项目中调用
input="" #输入语句
bot=kuakuaChat()
answerList=bot.answer_question(input)
会返回一个回答的List
启动服务器
bot=kuakuaChat()
bot.start_server()
这样会在5000端口启动一个服务器。
请求 /getKuakua ,附加payload sentence={输入}
样例: