Skip to content

使用 Pytorch 实现并使用康奈尔电影台词库训练的聊天机器人

License

Notifications You must be signed in to change notification settings

luoyeguigen35/dumb-chatbot

 
 

Repository files navigation

DUMB 聊天机器人

DUMB 聊天机器人全称Dumb Unique Maladroit Bot. 是使用 Pytorch 实现并使用康奈尔电影台词库训练的聊天机器人.

TODO:

断点续训功能, 做到间断性训练.

Github 链接

博客文章链接

Requirements

  • Python 2.7
  • Pytorch 0.4.1
  • festival (Linux Environment)
  • say (macOS Environment)

训练资源

使用方法

数据清洗

python preprocess.py

这个脚本会在./data目录创建dialogue_corpus.txt.

训练模型

python train.py

调参可以在config.json里面进行. 用我自己的电脑(GTX970M)训练的话, 大概需要四个半小时. 使用CPU训练请至少准备一个星期时间.

测试和运行

python chatbot.py

测试样例

> hi .
bot: hi .
> what is your name ?
bot: vector frankenstein .
> how are you ?
bot: fine .
> where are you from ?
bot: up north .
> are you happy today ?
bot: yes .

虽然能回答一些简单的问题, 但还是特别蠢.

参考文献

About

使用 Pytorch 实现并使用康奈尔电影台词库训练的聊天机器人

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%