czs0x55aa / pytorch-chatbot

Seq2Seq chatbot implement using PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pytorch-chatbot

Seq2Seq chatbot implement using PyTorch
Feature: Seq2Seq + Beam Search + antiLM

Requirements

  • Python3
  • Pytorch 0.3

Corpus

Usage

Training

python train.py

Test

python console python console.py ./ckpt model

Beam Search Example:

me: hi .  
Bot: how can i help you ? score:-0.66  
Bot: where are you going to go ? score:-0.66  
Bot: i am sorry to hear that . what can i do for you ? score:-0.67  
Bot: where are you going ? score:-0.68  
Bot: how are you going to do that ? score:-0.72  

me: what's your name ?  
Bot: my name is sam . score:-0.46  
Bot: my name is mona white . score:-0.53  
Bot: my name is james . score:-0.57  
Bot: my name is zhuang lingy . how are you , miss kelly ? score:-0.57  
Bot: my name is zhuang lingy . how are you ? score:-0.61  

me: how old are you ?  
Bot: i am twenty-five years old . score:-0.85  
Bot: i am not sure . what about you ? score:-0.89  
Bot: i am going to have a picnic with my friends . score:-0.96  
Bot: i am going to buy a birthday party for you . score:-0.97  
Bot: 5 years old . score:-0.98  

Reference

About

Seq2Seq chatbot implement using PyTorch

License:GNU General Public License v3.0


Languages

Language:Python 100.0%