Skip to content

hschafer2017/MiniBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniBot Prototype

Live link

Dependencies

  1. Chatterbot
pip3 install chatterbot
  1. Chatterbot Corpus
pip3 install chatterbot-corpus
  1. Natural Language ToolKit (NLTK) To install stopwords in iPython shell (Windows & Windows Subsystem for Linux):
import nltk
nltk.download('stopwords')

To install NLTK stopwords on OS X:

  • Go to list of NLTK libraries
  • Download source of Stopwords Corpus into a zip file
  • Move unzipped stopwords folder to /User/USERNAME/nltk_data/corpus/
  1. Flask
pip3 install Flask
  1. A virtual environment of your choice (recommended)

Training using Chatterbot Corpus data

You can train the bot using Chatterbot Corpus data in multiple languages by downloading the corpus training data from the NLTK resource. Using the ChatterBotCorpusTrainer method, the chatbot will automatically be trained using this data each time to server is started.

Training using your own custom data set

The chatbot can also be trained using your own custom dataset. It can be trained using a JSON or .yml file containing sample conversations and responses.

Example in .yml format

- - Are you a bot?
  - Maybe, maybe not.

Two dashes indicate the user input, and one dash indicates possible bot responses. For a larger example of training using a .yml file, please see the training_data folder in this repository. The chatbot can be trained using a combination of corpus data and data from a .yml file.