/Book-of-Knowledge

The Book of Knowledge project for knowledge representation using SPARQL and OWL files to find correlations between units available at UWA.

Primary LanguagePython

Book-of-Knowledge

Team

  • Ben Varian: 23210549
  • Mitchell Otley: 23475725

Setup python environment

  1. Make a python virtual environment
python3 -m venv venv
  1. install dependencies
pip install -r requirements.txt
  1. Activate environment (Linux + MacOS)
source venv/bin/activate
  1. Activate environemnt (Windows)
venv\Scripts\Activate.ps1

How to run web crawlers

  1. Navigate to the scraping_results folder
cd scraping_results
  1. run major crawler
python3 unit-crawler.py
  1. run unit crawler
python3 unit-crawler.py

How to create the knowledge graph + OWL file

  1. Navigate back to the root directory of the project
cd ..
  1. Run the create graph file
python3 create_graph.py

Upon successful completion this will create the handbook.ttl file in the root directory of the project.

  1. Populate the owl file with the rules and axioms
python3 create_onto.py
  1. Load all the data into the ontology
python3 load_onto.py

How to run queries

All of our queries are stored in one file and will print the results to the standard output.

python3 queries.py

How to run SHACL validation

The commands for the shacl validation are stored in the shacl_validate.py file. To run this file please run

python3 shacl_validate.py