A neural chatbot using sequence to sequence model with attentional decoder. This is a fully functional chatbot.
2017-08-26 11:38
561 查看
原项目链接: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!
一个使用序列的神经聊天者使用注意解码器对序列模型进行排序。 这是一个功能齐全的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!
相关文章推荐
- How to Build a Chat Bot Using Azure Bot Service and Train It with LUIS
- keras 2.0:Encoder-Decoder Sequence-to-Sequence Model for Neural Machine Translation
- Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model.
- (翻译)Sequence to Sequence Learning with Neural Networks
- SVN版本问题:svn: E155021: This client is too old to work with the working copy at
- svn: This client is too old to work with the working...
- The installer cannot read the mwinstall.dll file, This is probably due to a CD reader which can only read files with an eight.th
- flex结合svn时this client is too old to work with working copy错误解决方法。
- SVN:This client is too old to work with working copy…解决方法
- 小米手机调试报Installation failed with message Failed to establish session. It is possible that this issue
- VMware:This virtual machine is configured to run with 4 CPUs, but the host has only 2 CPU(s). The virtual machine cannot
- The model used to open the store is incompatible with the one used to create the store
- SVN:This client is too old to work with working copy…解决方法
- CoreDataErrorThe model used to open the store is incompatible with the one used to create the store
- coreData-reason = "The model used to open the store is incompatible with the one used to create the
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_8_apk was defined multiple times. It is possible that this issue is resolved by uninstalling a
- Sqlachemy的警告SAWarning: The IN-predicate on "sns_object.BIZ_ID" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate.
- The model used to open the store is incompatible with the one used to create the store
- Guid is not updated for cluster with specified cluster id; need to wait for hosts in this cluster to come up
- this bundle is invalid . new apps and app updates submitted to the app store must be built with publ