原项目链接:https://github.com/chiphuyen/stanford-tensorflow-tutorials/tree/master/assignments/chatbot

一个使用序列的神经聊天者使用注意解码器对序列模型进行排序。 这是一个功能齐全的chatbot。

这是基于Google 翻译 Tensorflow 模型 https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/

Chip Huyen 等人的序列到序列模型(2014)

由Chip Huyen创建为作业3的起始代码,CS 20SI 课程:“用于深度学习研究的 TensorFlow ” cs20si.stanford.edu

详细的任务讲义和培训时间的信息可以在 http://web.stanford.edu/class/cs20si/assignments/a3.pdf 找到

A neural chatbot using sequence to sequence model with attentional decoder. This is a fully functional chatbot.

This is based on Google Translate Tensorflow model https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/

Sequence to sequence model by Cho et al.(2014)

Created by Chip Huyen as the starter code for assignment 3, class CS 20SI: "TensorFlow for Deep Learning Research" cs20si.stanford.edu

The detailed assignment handout and information on training time can be found at http://web.stanford.edu/class/cs20si/assignments/a3.pdf

Sample conversation

HUMAN ++++ hi

BOT ++++ hi . what ' s your name ?

HUMAN ++++ i'm chip

BOT ++++ please .

HUMAN ++++ please what?

BOT ++++ i don ' t know what to say .

HUMAN ++++ where are you from?

BOT ++++ california .

HUMAN ++++ do you like california?

BOT ++++ i ' m okay .

HUMAN ++++ i like california a lot

BOT ++++ of what ?

HUMAN ++++ i live here

BOT ++++ and what is it ?

HUMAN ++++ california

BOT ++++ i don ' t know what to say .

HUMAN ++++ i'm a student here

BOT ++++ and get it out of here .

HUMAN ++++ what do you like to do in your free time?

BOT ++++ and what about the gun ?

HUMAN ++++ do you have a gun?

BOT ++++ yes .

HUMAN ++++ you're dangerous!

BOT ++++ i ' m not .

HUMAN ++++ do you go hunting?

BOT ++++ i can do .

HUMAN ++++ what do you hunt?

BOT ++++ virgin .

HUMAN ++++ that's very bad

BOT ++++ and you in love ?

HUMAN ++++ no i'm not

BOT ++++ please - -

HUMAN ++++ okay, i am

BOT ++++ and you are good .

HUMAN ++++ yeah i am good too.

BOT ++++ good good to you .

HUMAN ++++ are you in love?

BOT ++++ i ' m ready .

HUMAN ++++ ready for what?

BOT ++++ for what ?

HUMAN ++++ for what?

BOT ++++ i don ' t know what to say .

HUMAN ++++ tell me

BOT ++++ i can do it .

HUMAN ++++ okay, tell me what you're ready for

BOT ++++ i ' m doing you .

HUMAN ++++ no you're not

BOT ++++ please !

HUMAN ++++ this is a strange conversation

BOT ++++ i don ' t know what to say .

HUMAN ++++ are you a guy?

BOT ++++ of what ?

HUMAN ++++ are you a boy?

BOT ++++ i ' m fine .

HUMAN ++++ are you a man?

BOT ++++ i ' m a little .

HUMAN ++++ what's your name?

BOT ++++ chris -

HUMAN ++++ chris who?

BOT ++++ cornelius .

HUMAN ++++ so i guess you're a guy.

BOT ++++ i am .

HUMAN ++++ okay

BOT ++++ okay ?

HUMAN ++++ do you have a girlfriend?

BOT ++++ i ' m sure .

HUMAN ++++ what's her name?

BOT ++++ let ' s talk about something else .

See output_convo.txt for more sample conversations.

Usage

Step 1: create a data folder in your project directory, download the Cornell Movie-Dialogs Corpus from https://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html Unzip it

Step 2: python data.py

This will do all the pre-processing for the Cornell dataset.

Step 3: python chatbot.py --mode [train/chat]

If mode is train, then you train the chatbot. By default, the model will restore the previously trained weights (if there is any) and continue training up on that.

If you want to start training from scratch, please delete all the checkpoints in the checkpoints folder.

If the mode is chat, you'll go into the interaction mode with the bot.

By default, all the conversations you have with the chatbot will be written into the file output_convo.txt in the processed folder. If you run this chatbot, I kindly ask you to send me the output_convo.txt so that I can improve the chatbot. My email is huyenn@stanford.edu

If you find the tutorial helpful, please head over to Anonymous Chatlog Donation to see how you can help us create the first realistic dialogue dataset.

Thank you very much!

最新文章

  1. ArrayList LinkedList源码解析
  2. 顶点着色器详解 (Vertex Shaders)
  3. 一款很实用的jQuery鼠标悬浮有动画效果的响应式瀑布流插件
  4. group by语句
  5. css中的选择器
  6. WordPress插件:幻灯片Meta Slider
  7. YARN应用程序开发流程(类似于MapReduce On Yarn)本内容版权归(小象学院所有)
  8. PHP+Mysql-表单数据插入数据库及数据提取完整过程
  9. ZOJ 3723 (浙大月赛)状压DP
  10. HTTP简单的解析协议
  11. FormData可实现异步传输二进制文件(即异步文件上传)
  12. css媒体查询:响应式网站
  13. 模板std::mutex用法:
  14. Linux 链路聚合
  15. centos下删除MYSQL 和重新安装MYSQL
  16. 原生javascript实现extend
  17. Python3爬虫知识点总结
  18. CentOS 7下Samba服务部署
  19. centos 断网
  20. Ubuntu16.04安装mac主题之图标居中(百度经验)

热门文章

  1. CSS揭秘(三)形状
  2. SQL Server(MySql)中的联合主键(联合索引) 索引分析
  3. myeclipse的导航器
  4. Centos7.x:开机启动服务的配置和管理
  5. SpringBoot应用的启动方式
  6. SpringMvc采用 http+json 实现前后端交互
  7. GIT入门笔记(18)- 标签创建和管理
  8. CentOS 6.5 Tomcat安装及配置
  9. 深入理解JavaScript的this指向问题
  10. 南阳OJ-14-会场安排问题---区间不相交