contract-knowledge-base
A functional knowledge base of popular contracts utilized in GitHub. Built for a class project in Knowledge Reasoning and Representation (KRR).
Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.1%) to scientific vocabulary
Keywords
Repository
A functional knowledge base of popular contracts utilized in GitHub. Built for a class project in Knowledge Reasoning and Representation (KRR).
Basic Info
- Host: GitHub
- Owner: MSAI-KRR-Group
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://share.streamlit.io/msai-krr-group/contract-knowledge-base/main/app.py
- Size: 935 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
contract-knowledge-base
A example of inference in a knowledge base with Zincbase and Graphviz.

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
- Hosted on Streamlit
- App Link to A Contract Companion
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
- We use Zincbase to build and maintain a knowledge base and logic engine
- Reference to GitRepo: https://github.com/complexdb/zincbase
Streamlit
- We use Streamlit to deploy application code
- From terminal:
terminal
streamlit run app.py
A Snapshot of the Entire Knowledge Base

Citation (citations)
@software{zincbase,
author = {{Tom Grek}},
title = {ZincBase: A state of the art knowledge base},
url = {https://github.com/tomgrek/zincbase},
version = {0.1.1},
date = {2019-05-12}
}
GitHub Events
Total
Last Year
Dependencies
- altair ==4.1.0
- appnope ==0.1.2
- argon2-cffi ==20.1.0
- astor ==0.8.1
- async-generator ==1.10
- attrs ==20.3.0
- backcall ==0.2.0
- base58 ==2.1.0
- bleach ==3.3.0
- blinker ==1.4
- cachetools ==4.2.1
- cffi ==1.14.5
- chardet ==4.0.0
- click ==7.1.2
- cycler ==0.10.0
- decorator ==4.4.2
- defusedxml ==0.6.0
- entrypoints ==0.3
- gitdb ==4.0.5
- gitpython ==3.1.14
- idna ==2.10
- ipykernel ==5.5.0
- ipython ==7.21.0
- ipython-genutils ==0.2.0
- ipywidgets ==7.6.3
- jedi ==0.18.0
- jinja2 ==2.11.3
- joblib ==1.0.1
- jsonschema ==3.2.0
- jupyter-client ==6.1.11
- jupyter-core ==4.7.1
- jupyterlab-pygments ==0.1.2
- jupyterlab-widgets ==1.0.0
- kiwisolver ==1.3.1
- markupsafe ==1.1.1
- matplotlib ==3.3.4
- mistune ==0.8.4
- nbclient ==0.5.3
- nbconvert ==6.0.7
- nbformat ==5.1.2
- nest-asyncio ==1.5.1
- networkx ==2.5
- notebook ==6.2.0
- numpy ==1.20.1
- packaging ==20.9
- pandas ==1.2.2
- pandocfilters ==1.4.3
- parso ==0.8.1
- pexpect ==4.8.0
- pickleshare ==0.7.5
- pillow ==8.1.0
- prometheus-client ==0.9.0
- prompt-toolkit ==3.0.16
- protobuf ==3.15.3
- ptyprocess ==0.7.0
- pyarrow ==3.0.0
- pycparser ==2.20
- pydeck ==0.6.1
- pygments ==2.8.0
- pykqml ==1.1
- pyparsing ==2.4.7
- pyrsistent ==0.17.3
- python-dateutil ==2.8.1
- pytz ==2021.1
- pyzmq ==22.0.3
- requests ==2.25.1
- scikit-learn ==0.24.1
- scipy ==1.6.1
- send2trash ==1.5.0
- six ==1.15.0
- sklearn ==0.0
- smmap ==3.0.5
- streamlit ==0.77.0
- terminado ==0.9.2
- testpath ==0.4.4
- threadpoolctl ==2.1.0
- toml ==0.10.2
- toolz ==0.11.1
- torch ==1.7.1
- torchvision ==0.8.2
- tornado ==6.1
- tqdm ==4.58.0
- traitlets ==5.0.5
- typing-extensions ==3.7.4.3
- tzlocal ==2.1
- urllib3 ==1.26.3
- validators ==0.18.2
- wcwidth ==0.2.5
- webencodings ==0.5.1
- widgetsnbextension ==3.5.1
- zincbase ==0.10.1
- bs4 *
- eventlet *
- flask *
- flask_socketio *
- graphviz *
- pydot *
- redis *
- streamlit *
- zincbase *