Embeddings of Knowledge Graphs Containing Procedural Knowledge

Setup

  1. Clone the repository with git clone https://github.com/0x14d/embedding-operator-knowledge
  2. Open repository with cd embedding-operator-knowledge
  3. Python 3.9 is required (2 options)
    • Use the included dev container (requires Docker)
    • Install python manually
  4. Create virtual environment (optional)
    1. python -m venv ./venv
    2. source ./venv/bin/activate
  5. Install python3.9-dev with sudo apt install python3.9-dev
  6. Install requirements with pip install -r requirements.txt

How to:

Generating the embeddings:

In order to train the embeddings & prepare the evaluation either for LinkPrediction (hits@k & AMRI) or Matches (matches@k) and the amount of iterations required execute:

python -m knowledge_infusion.compare_methods.compare_methods --config LinkPrediction --iterations 30

Generating the evaluations

After generating the embeddings execute:

python -m knowledge_infusion.compare_methods.generate_output_files for hits@k and AMRI or python -m knowledge_infusion.compare_methods.generate_output_files for matches@k

This will generate the resulting tables for: