06HouLuGuo 最近的时间轴更新
06HouLuGuo

06HouLuGuo

V2EX 第 425458 号会员,加入于 2019-06-28 17:32:08 +08:00
06HouLuGuo 最近回复了
2019-06-30 11:58:54 +08:00
回复了 aseec 创建的主题 问与答 想制作聊天机器人,有哪些不错的语料库呢?
#include<bits/stdc++.h>//主要是针对某网络社区小学生制作的
using namespace std;
int main(){
string a,ans[53]={"我在的呢!","我讨厌你说脏话!","你好呀,很高兴见到你!","你好呀,很高兴见到你!","我在的呢!","你猜","才不好笑","不要笑了","你很讨厌哎!","笑什么?","你很讨厌哎!","你很讨厌哎!","你很讨厌哎!","再聊一会呗,为什么不聊了","你可以和我日常聊天","你好呀,很高兴见到你!","你好呀,很高兴见到你!","你好呀,很高兴见到你!","你好呀,很高兴见到你!","迷你就是这样!","我是小星机器人","应该很好吧!","我是 2005 年 4 月 1 日生的,你猜我多少岁!","我也是呢!","谢谢你的评价!","我可以给你讲笑话","这是第 2 代!","会回复的!","我是 2004 年 4 月 4 日 4:44 生的,你猜我多少岁!","0 是介于-1 和 1 之间的整数。是最小的自然数,也是有理数。0 既不是正数也不是负数,而是正数和负数的分界点。0 没有倒数,0 的相反数是 0,0 的绝对值是 0,0 的平方根是 0,0 的立方根是 0,0 乘任何数都等于 0,除 0 之外任何数的 0 次方等于 1。0 不能作为分母出现,0 的所有倍数都是 0。0 不能作为除数。","为什么烦呢?","应该是的。","我是小星机器人!","你比我牛呢!","我知道的没你多啦!","我是小星机器人!","我的智商低,你的智商可高这呢!","我的智商低,你的智商可高这呢!","你猜!","我不是十万个为什么!","你猜!","你就是很帅呀","你就是很聪明呀","你就是很美呀","这个很难说!","你就这么直接吗?","我不知道!","你先说!","你很酷,总行了吧!","我很讨厌你为难我","你确定?我不信","我不知道","我搜集到的笑话:还没有呢 "};
string que[53]={"在","去","你好","nihao","人","还","233","啊哈","额","呵","em","哦","…","不聊了","help","Hi","hi","Hello","hello","迷你","你是谁","天气","大","爱","作品好","无聊","更新了吗","回复","岁","0","烦","大佬","叫","牛","知道","名字","智","iq","男","为什么","女","帅","聪","美","会","不会","怎么","说","酷","为难","已经","是不是","笑话"};
while(1){
int j=-1;
cout<<"你的想说的话:";
cin>>a;
for(int i=0;i<53;i++){
if(a.find(que[i])!=-1){
j=i;
}
}
if(j==-1)cout<<"小星机器人:不知道该怎么回答好"<<endl;
else cout<<"小星机器人:"<<ans[j]<<endl;
}
return 0;
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2761 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 06:11 · PVG 14:11 · LAX 22:11 · JFK 01:11
Developed with CodeLauncher
♥ Do have faith in what you're doing.