Giter VIP home page Giter VIP logo

msai-krr-group / contract-knowledge-base Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 957 KB

A functional knowledge base of popular contracts utilized in GitHub. Built for a class project in Knowledge Reasoning and Representation (KRR).

Home Page: https://share.streamlit.io/msai-krr-group/contract-knowledge-base/main/app.py

License: GNU General Public License v3.0

Python 98.53% CSS 1.47%
knowledge-base reasoning-machine streamlit-webapp zincbase logic-programming contracts license knowledge-graph semantic-web contract-knowledge

contract-knowledge-base's Introduction

contract-knowledge-base

A example of inference in a knowledge base with Zincbase and Graphviz.

KB_repo

About

  • What happens when you make a knowledge base from a set of contracts?
  • In this project, we build a knowledge base of popular licenses that people use with GitHub Repositories
  • The representation of each licence's goals are based on GitHub's interpretation
  • This project in no way represents actual advice, just an exercise in Knowledge Representation and Reasoning

What is Knowledge Representation?

  • Sometimes it works to hard-code any number of if-else-then conditions, but this requires an explicit declaration of each relationship and outcome
  • Instead, with knowledge represetation and reasoning, we specify a knowledge base of facts and rules, then allow the system to reason for the right answer
  • In this project, we specify types of contracts and types of contract goals but allow a system to reason that any particular repository extends certain types of terms and conditions
  • In addition to having greater flexibility, the knowledge base can return an audit trail of why it produces an answer

The App

The Code

  • We leverage concepts from knowledge reasoning and representation (KRR) and apply object-oriented programming to create a microtheory of contracts.

  • Given the micro theory of facts and rules, we build queries and allow the inference engine to provide answers.

Misc Setup

Zincbase

Streamlit

  • We use Streamlit to deploy application code
  • From terminal:
streamlit run app.py

A Snapshot of the Entire Knowledge Base

KB

contract-knowledge-base's People

Contributors

iryzhkov avatar justinhchae avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vishalbelsare

contract-knowledge-base's Issues

make buttons display info

Is your feature request related to a problem? Please describe.
buttons do not do anything

Describe the solution you'd like
currently, the app returns the types of terms and conditions for a given query as buttons. currently, the buttons do not do anything but it might be helpful if clicking on the button created some action where information about what that thing is. Ex. if I click on patent_use, then text appears that explains what that thing is.

Describe alternatives you've considered
None

Additional context
Add any other context or screenshots about the feature request here.
Screen Shot 2021-03-02 at 1 00 26 PM

button colors by type of thing

Is your feature request related to a problem? Please describe.
all the buttons for terms and conditions are the same, distinguish them

Describe the solution you'd like
the buttons for different things like rights and conditions are all the same color. make the different so that people can easily see which objects are rights and which are conditions.

Describe alternatives you've considered
do nothing

Additional context
consider the github UI which displays which terms and conditions are extended by a license.

add more license types to KB

Is your feature request related to a problem? Please describe.
There are only two licenses available in the KB, need more

Describe the solution you'd like
Add the license types and specs of all the available license that can be added in a github repo:
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository

Describe alternatives you've considered
Just stick to whatever can be a license in GitHub

Additional context
Will need to create new facts, test existing queries, and test app interface with new license types

explicitly identify what rights are not extended

Is your feature request related to a problem? Please describe.
The queries only return what is TRUE from the query, but there are some cases where the user wants to know what is not extended

Describe the solution you'd like
Similar to the GitHub UI, the Color green denotes what is allowed and the Color red dentoes what is not allowed. Perhaps return all the options and color code what is allowed in green while defaulting the rest of options to red.

Describe alternatives you've considered
Do nothing

Additional context
None

add grid layout when displaying results of queries

Is your feature request related to a problem? Please describe.
button layout

Describe the solution you'd like
currently the results of queries are displayed as buttons. the layout currently stacks the buttons vertically but it would be better if they are displayed in a grid layout of some kind.

Describe alternatives you've considered
do nothing

Additional context
make the look and feel nicer
Screen Shot 2021-03-02 at 1 11 50 PM

get actual license from an actual repo

Is your feature request related to a problem? Please describe.
how to move from dummy repo such as <github_repo> to an actual repo

Describe the solution you'd like
User inputs an actual github repo URL and the app identifies what type of license is in the repo. Then based on the knowledge base, return the terms and conditions of that repository.

Describe alternatives you've considered
None
Screen Shot 2021-03-02 at 1 02 57 PM

Additional context
Add any other context or screenshots about the feature request here.

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.