This guide will help you navigate the repository and set up the project efficiently.
- Pre-requisites
- Project Layout
- Installing Protege (Ontology Editor)
- Installing Neo4j Desktop (GraphDB)
- Running the Dashboard and Evaluation
- Running the Evaluation
- Ontology Guidance
- Knowledge Graph Guide
Ensure the following are installed:
- Python 3
- Neo4j
- Protege
- Clone the repository.
- Install Protege (Ontology Editor).
- Install Neo4j Desktop (GraphDB).
- Run the dashboard and evaluation.
Installation guides based on your OS:
For beginners: Getting Started with Protege
Download Neo4j Desktop: Neo4j Download
Navigate to the working directory:
cd csonto/target/csonto/
Install Python dependencies:
pip install -r requirements.txt
Ensure the Neo4j database is running, then launch the dashboard:
streamlit run streamlit_app.py
Access the dashboard using the link provided in the terminal.
Navigate to the evaluation directory:
cd evaluation/
Run the following scripts to evaluate the ontology and knowledge graph:
python3 modelEval.py
python3 ontologyEval.py
python3 kgEval.py
python3 ML-LinkPredict.py
Navigate to the ontology directory:
cd csonto/target/csonto/src/ontology/
Open the csonto-edit
files with Protege to view or modify the ontology.
Navigate to the scripts directory:
cd csonto/target/csonto/src/scripts/
Key scripts:
- StatusChecker: Checks policy statuses within the ontology.
- OntologyBuilder: Builds and evolves the ontology.
- Onto_Definitions & Updates: Defines and updates ontology instances.
In the Neo4j Browser, execute the following Cypher query for a full graph view:
MATCH (n:CyberSecurityScore)<-[r:REPORTS_TO]-(m) RETURN n, r, m
UNION
MATCH (n)<-[r:PART_OF]-(m) RETURN n, r, m
For a focused query on core CSKG elements:
MATCH (n:CyberSecurityScore)<-[r:REPORTS_TO]-(m) RETURN n, r, m
Use these queries to analyze and visualize different aspects of the CSKG.