原项目链接: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!

A neural chatbot using sequence to sequence model with attentional decoder. This is a fully functional chatbot.的更多相关文章

  1. 【论文阅读】Sequence to Sequence Learning with Neural Network

    Sequence to Sequence Learning with NN <基于神经网络的序列到序列学习>原文google scholar下载. @author: Ilya Sutske ...

  2. PP: Sequence to sequence learning with neural networks

    From google institution; 1. Before this, DNN cannot be used to map sequences to sequences. In this p ...

  3. Paper Reading - Convolutional Sequence to Sequence Learning ( CoRR 2017 ) ★

    Link of the Paper: https://arxiv.org/abs/1705.03122 Motivation: Compared to recurrent layers, convol ...

  4. 深度学习方法(八):自然语言处理中的Encoder-Decoder模型,基本Sequence to Sequence模型

    欢迎转载,转载请注明:本文出自Bin的专栏blog.csdn.net/xbinworld.技术交流QQ群:433250724,欢迎对算法.技术感兴趣的同学加入. Encoder-Decoder(编码- ...

  5. [C5W3] Sequence Models - Sequence models & Attention mechanism

    第三周 序列模型和注意力机制(Sequence models & Attention mechanism) 基础模型(Basic Models) 在这一周,你将会学习 seq2seq(sequ ...

  6. ChatGirl is an AI ChatBot based on TensorFlow Seq2Seq Model

    Introduction [Under developing,it is not working well yet.But you can just train,and run it.] ChatGi ...

  7. sequence to sequence模型

    sequence to sequence模型是一类End-to-End的算法框架,也就是从序列到序列的转换模型框架,应用在机器翻译,自动应答等场景. Seq2Seq一般是通过Encoder-Decod ...

  8. Convolutional Sequence to Sequence Learning 论文笔记

    目录 简介 模型结构 Position Embeddings GLU or GRU Convolutional Block Structure Multi-step Attention Normali ...

  9. Paper Reading - Sequence to Sequence Learning with Neural Networks ( NIPS 2014 )

    Link of the Paper: https://arxiv.org/pdf/1409.3215.pdf Main Points: Encoder-Decoder Model: Input seq ...

随机推荐

  1. Java基础类库简介

    Java基础类库简介 一.常用的基础类库:11个jar(Java Archive,Java归档)包 作为java语言使用者,我们可以感受到java语言带来的优势(平台无关.面向对象.多线程.高效易扩展 ...

  2. Eclipse常用快捷键总结

    Eclipse常用快捷键总结 CTRL+C(复制).CTRL+X(剪切).CTRL+Z(撤销).CTRL+F(查找).CTRL+H(搜索文件或字符串).CTRL+Y(重做).CTRL+/(双斜杠注释) ...

  3. JS实现页面内跳转

    使用js($.ajax中)实现页面内跳转(即:描点平滑跳转)的方法(aa为跳转目的标签的id): 在网络上有很多资料所说的:animate方法我试了并不好使,不知道是啥原因,欢迎大家指正,附上网络方法 ...

  4. 泛型的 typeof

    static void Main(string[] args) { TestTypeOf<string>(); Console.ReadKey(); } static void TestT ...

  5. Mego开发文档 - 基础查询

    基础查询 Mego 使用语言集成查询(LINQ)从数据库查询数据.LINQ允许您使用C#(或其他.NET语言)根据派生的上下文和实体类编写强类型查询.将LINQ查询的表示传递给数据库提供者,翻译为数据 ...

  6. JS解析JSON字符串

    问题描述:后台需要传递给前台一些数据,用于页面数据显示,因为是一些Lable标签,所以数据传递到前台需要解析. 思路:因为数据比较杂乱,所以我选择传递的数据类型是Json格式,但是数据展示时需要解析成 ...

  7. oracle drop table(表)数据恢复方法

    今天不小心把系统用户表给drop掉了,正在运行的系统正式库啊,还好可以恢复 一.查看数据库回收站,看删除的表是否还在回收站select object_name,original_name,partit ...

  8. logback生成多个不同的日志文件

    用logback生成日志文件做日志分析,日志写到多个文件中 http://stackoverflow.com/questions/2488558/logback-to-log-different-me ...

  9. jvm学习记录-对象的创建、对象的内存布局、对象的访问定位

    简述 今天继续写<深入理解java虚拟机>的对象创建的理解.这次和上次隔的时间有些长,是因为有些东西确实不好理解,就查阅各种资料,然后弄明白了才来做记录. (此文中所阐述的内容都是以Hot ...

  10. Python3NumPy——数组(2)之数学空间与NumPy空间

    0 介绍 本文承接上一篇,文章采用新的阐述方式,将数学中的表达与NumPy中的函数关联起来. 采用这种方式,可以直接建立数学表达与计算系统的对应关系,更易理解. 由于博客编写时间有限,每次尝试一个知识 ...