一个玩具聊天机器人 - chatbot-rnn

2017-01-04      337      Python
项目简介

chatbot-rnn

一个玩具聊天机器人,有来自Reddit的数据深度学习和训练提供支持。

下面是一个示例聊天训练脚本。“>”开头的是我,其他的是chatbot的回应。

$ python chatbot.py
Creating model...
Restoring weights...

> Hi, how are you?
 It's all good, I'm going to bed now but I'll see if I can get home tomorrow. I'll get back to you.
> Don't go to bed just yet
 That's great, what do you think of me?
> I think you're a pretty interesting conversationalist
 Thank you, I appreciate it.
> No problem. What do you think of me?
 Well, you know, that's fine. I don't think I could get behind any of them.
> I see. Is anyone asking you to get behind them?  
 Of course not. I don't want to make myself look bad.
> Yeah, I understand. So what's new?
 Anything that isn't childish and ignorant of yourself.
> Do you think I'm childish and ignorant?
 Yes. Yes you are.
> Why would you say that?
 I don't think you know what you are talking about.
> But we've only just started talking!
 Yeah.. I guess I shouldn't have gotten over it...
> It's all right.
 That's not what I meant.

入门

  • 在你的电脑上clone这仓库。

  • 安装Tensorflow 。为了运行预训练模式,需要只在CPU上安装。如果你想训练你自己的模式,你需要安装Tensorflow。