Awesome Open Source
Awesome Open Source

Hi there, I'm RyuzakiBot!

Looking for a free open source chatbot? RyuzakiBot is a simple retrieval-based chatbot made from scratch in Python3 using NLTK and scikit-learn. Try it out here: https://ryuzaki-bot.herokuapp.com/ Please notice that website is deployed on a free Heroku server and it would takes some time to load and to answer for the first time.

Using your own corpus

If you would like to train RyuzakiBot on a different subject, please just change corpus.txt file by your own. It is not difficult to create one, each corpus is just a sample of various input statements and their responses for the chatbot to train itself with. In the above example, it will be using the Wikipedia page for chatbots as its corpus.

API REST

RyuzakiBot uses microframework Flask and its extension that adds support for quickly building REST APIs: Flask-RESTful. You can make HTTPS requests to the API here: https://ryuzaki-bot-api.herokuapp.com/reply.json?q=what%20is%20a%20conversational%20bot? q= will hold query and all GET requests will return a JSON object.

Implementation

This chatbot is written in Python3 and mainly uses:

  • NLTK: is a natural language processing (NLP) and artificial intelligence library. NLTK is used for text pre-processing (removing noise, stop words, stemming and lemmatizing). Please visit https://www.nltk.org/ for more info.
  • scikit-learn: is a data mining and data analysis library. RyuzakiBot takes all last paragraph pre-processed documents, transforms them into numerical vectors with TF-IDF method and compares cosine from angles formed between all documents and the one from query with cosine similary numerical method. Please find all scikit-learn documentation here: https://www.nltk.org/

About the author

My name is Lucía Llavero Company and I'm a Spanish high-school software developer. Feel free to use this code for any purpose. I hope you find it useful!


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (54,525
python3 (1,645
chatbot (298
scikit-learn (207
api-rest (51
nltk (32