Giter VIP home page Giter VIP logo

chatbot's Introduction

Get Data

  • $git clone https://github.com/songys/Chatbot_data.git

    (Chatbot_data by songys, MIT License)

  • para_kqc_sim_data.txt

    (paraKQC by warnikchow, Creative Commons Attribution Share Alike 4.0 International License)

  • python get_CLS.py


Training

  • python train_model.py

    (train paraphrase detection task using para_kqc_sim_data.txt)


Run Chatbot

before running, you must execute get_CLS.py and train_model.py

  • python main.py

Chatbot process

  1. input sentence
  2. get input sentence`s CLS token using pretrained BERT model
  3. calculate cosine similarity of input sentence and CLS tokens in Chatbot_data
  4. get Chatbot_data`s indexs that have top n similarity
  5. detect input sentence and top n data are similar (using trained model in train_model.py)
  6. at least one question is similar, answer will be question`s answer that has the highest confidence
  7. all question is not similar, answer "잘 모르겠어요."

chatbot's People

Contributors

ddooom avatar

Watchers

 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.