Giter Club home page Giter Club logo

chatbot-1's Introduction

chatbot

English | 简体中文

chatbot is a conversational dialog engine build in Go which makes it possible to generate responses based on collections of known conversations. The language independent design of chatbot allows it to be trained to speak any language. It’s much faster than ChatterBot, our benchmark on 120 million conversations:

  • ChatterBot takes 21s to answer
  • chatbot takes 18ms to answer

Project layout and command line tools

  • bot

    Conversational dialog engine

  • cli

    • train

      Train the given conversation data and generate corpus format file .gob

      • -d reads all json and yaml corpus files in the specified directory
      • -i read the specified json or yaml corpus files, splitting multiple files by commas
      • -o specify the output .gob file
      • -m print memory usage at regular intervals
    • ask

      An example question and answer command line tool

      • -v verbose
      • -c trained .gob file
      • -t data for several possible answers

Data format

The data format can be provided via yaml or json files, refer to the format in https://github.com/kevwan/chatterbot-corpus. Roughly, it is as follows.

categories:
- AI
- artificial intelligence
conversations:
- - What is AI?
  - Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
- - Are you sentient?
  - Sort of.

Example of a question and answer

user: how are you?
bot: I am doing well, how about you?
user: I'm doing well, thanks!
bot: That is good to hear

Acknowledgements

go-zero - https://github.com/zeromicro/go-zero

The MapReduce implementation of go-zero in core/mr package gives chatbot a huge performance boost!

ChatterBot - https://github.com/gunthercox/ChatterBot

I was using ChatterBot at first, but it responds too slow, so I decided to implement it myself. Thanks to ChatterBot, great project!

Give a Star! ⭐

If you like or are using this project to learn or start your solution, please give it a star. Thanks!

chatbot-1's People

Contributors

kevwan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.