GithubHelp home page GithubHelp logo

fcmam5 / kr-and-expert-system Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 16.0 6 KB

Knowledge representation and expert systems examples

Python 67.30% JavaScript 31.94% Shell 0.75%
python knowledge-base knowledge-representation expert-system

kr-and-expert-system's Introduction

Knowledge representation examples

This repository contains some programming exercises for Ontologies and Knowledge representation class in University. It contains until the moment two examples:

Expert System for children Diabetes Diagnosis

Built with Python, using PyKnow library. And there's a tiny Node/Express server for offering a Web api

Usage

  • First install pyknow Python package, and Express and python-shell for Node.js, then lunch the server (main.js) in order to use the Web API. All this could be done with this command: pip install pyknow && npm install && node main.js
  • Then open your browser, and past this URL for example.
localhost:3000/res/api?age=3
                        &glycemie=2
                        &shakiness=True
                        &hunger=True
                        &sweating=True
                        &headach=True
                        &diabetic_parents=False
                        &pale=False
                        &urination=False
                        &thirst=False
                        &blurred_vision=False
                        &dry_mouth=False
                        &smelling_breath=False
                        &shortness_of_breath=False

Now you can play with each parameter

  • age = [int from 0 to 5]
  • glycemie= [ int mmol/l ]
  • Signs, like shakiness, hunger, sweating..= [Boolean: True/False]

Or You can use the python file directly just introduce your facts manually

Change

# ligne 102
engine.declare(Personne(age= int(sys.argv[1]),
                        glycemie=int(sys.argv[2]),
                        shakiness= bool(sys.argv[3]),
                        hunger= bool(sys.argv[4]),
                        sweating= bool(sys.argv[5]),
                        headach= bool(sys.argv[6]),
                        diabetic_parents = bool(sys.argv[7]),
                        pale= bool(sys.argv[8]),
                        urination = bool(sys.argv[9]),
                        thirst = bool(sys.argv[10]),
                        blurred_vision = bool(sys.argv[11]),
                        dry_mouth = bool(sys.argv[12]),
                        smelling_breath = bool(sys.argv[13]),
                        shortness_of_breath = bool(sys.argv[14]),
                        ))

To (for example)

# ligne 102
engine.declare(Personne(age= 2,
                        glycemie=True,
                        shakiness=True,
                        hunger= True,
                        sweating= True,
                        headach= True,
                        diabetic_parents = False,
                        pale= False,
                        urination = False,
                        thirst = False,
                        blurred_vision = False,
                        dry_mouth = False,
                        smelling_breath = False,
                        shortness_of_breath = False,
                        ))

kr-and-expert-system's People

Contributors

fcmam5 avatar nilp0inter avatar

Stargazers

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

Watchers

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