Coder Social home page Coder Social logo

kmtusher97 / knowledge-based-qa-system-with-python-and-prolog Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 12.0 398 KB

This project is a simple implementation of a knowledge-based system. It is a simple ChatBot. There is a prolog file that defines the knowledge base. The questions are handled with python. The key idea is mapping different questions for the same answer. The simplest way is finding keywords in the question. Using the keywords, a query is performed on the prolog knowledge base. Then the query result is shown with some prefix and suffix as the answer.

License: MIT License

Python 55.15% Prolog 44.85%
knowledge-based-systems python3 prolog prolog-application prolog-python chatbot chatbots python

knowledge-based-qa-system-with-python-and-prolog's Introduction

Knowledge Based QA System with Python and Prolog python prolog

A knowledge-based system (KBS) is a form of artificial intelligence (AI) that aims to capture the knowledge of human experts to support decision-making. Examples of knowledge-based systems include expert systems, which are so called because of their reliance on human expertise.

This project is a simple implementation of a knowledge-based system. It is a simple ChatBot. There is a prolog file that defines the knowledge base. The questions are handled with python. The key idea is mapping different questions for the same answer. The simplest way is finding keywords in the question. Using the keywords, a query is performed on the prolog knowledge base. Then the query result is shown with some prefix and suffix as the answer.

These types of chatbots can handle frequently asked questions in a system. For example, this program can be an extension of a university website that can handle general queries about the university.

Build linux


Install prolog

$ sudo apt install swi-prolog

To build and run the program, open terminal and change directory to the program directory. Then execute the following commands.

$ python -m vevn venv
$ souce venv/bin/activate
$ pip install -r requirements.txt
$ python main.py

This program can be built and run on windows too. First install prolog, pip. Then run the commands in the commands in the cmd terminal to build and run the program.

To create executable, run

$ pyinstaller main.py

Run the executable

./dist/main/main


LICENSE License: MIT


Copyright © 2020, Kamrul Hasan. Released under the MIT License. See more

knowledge-based-qa-system-with-python-and-prolog's People

Contributors

kmtusher97 avatar shounak00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.