Skip to content

Use ohi with AWS Context Ontology Accelerator

Use ohi to load standard ontologies into AWS Context Ontology Accelerator (COA). It builds an ontology from your data, and based on loaded reference ontologies reuses existing terms instead of making up new ones.

ohi finds these ontologies, downloads them with their dependencies and pins their versions in a lock file. Everyone on your team then loads the same files. This guide uses W3C Organization and PROV-O.

To use other ontologies, search on ohi.dev or use ohi search.

  1. ohi add downloads the ontologies you choose as OWL Turtle (.ttl) files. It records them in ohi.yaml and pins the exact files in ohi.lock.json.
  2. You upload the files to COA, which calls them reference ontologies.
  3. COA builds its ontology from your data in a step called induction. During induction, it links your classes to matching terms in the reference ontologies with rdfs:subClassOf or SKOS match links. COA calls this grounding. A staff table can then point to an existing class instead of becoming a new Staff class.
  4. Because the lock file pins the exact files, anyone can run ohi sync to get the same ones and load them into another COA namespace or account.
  • ohi installed.
  • COA deployment.
  • A COA user with the platform-admin role, or namespace-owner on an existing namespace.
  • At least one data source registered in that namespace.
  1. Create a project that downloads OWL Turtle files into an ontologies folder:

    Terminal window
    ohi init coa-ontologies --default_format owl-turtle --to ontologies
    cd coa-ontologies
  2. Add your ontologies:

    Terminal window
    ohi add w3c/org@2014
    ohi add w3c/prov-o@2013

    Each one lands in its own folder, such as ontologies/w3c/org/2014/, along with any ontologies it depends on.

  3. Check that the files are there:

    Terminal window
    find ontologies -name '*.ttl'

    In PowerShell, use Get-ChildItem ontologies -Recurse -Filter *.ttl. You should see one file per ontology, plus one per dependency.

  4. Commit ohi.yaml and ohi.lock.json. Anyone who runs ohi sync in this folder then gets the same files, checked against the same checksums. See Manage ontology projects for more.

Skip this if you already have one.

  1. Log in to the COA console as a platform-admin user.
  2. Go to Administration > Namespaces > Create namespace.
  3. Enter required data and choose a language.
  4. Click Create namespace, Confirm namespace language, then click Confirm and create.
  1. In the COA console, open your namespace and go to Ontology > Induction.
  2. In the ontology upload area, upload each .ttl file from ontologies/.
  3. Check that they all appear on the Reference ontologies tab.
  1. On the Induction page, click Start induction.
  2. Leave Strategy as Table to Ontology.
  3. Under Data sources, select your data sources.
  4. Under Grounding ontologies (optional), select the reference ontologies you uploaded. If you have accepted an induction result in this namespace before, the console selects that one too. Leave it like that.
  5. Click Start induction.

Induce Ontology dialog

COA shows the ontology it suggests as a proposal. When induction finishes, open it. Classes that match your reference ontologies now link to their terms. In the example, those links point to IRIs starting with http://www.w3.org/ns/org# or http://www.w3.org/ns/prov#.

If nothing links:

  • Check that you selected the reference ontologies before starting induction.
  • Your tables may not match them. Try ontologies closer to your data.
  1. Find the latest version with ohi inspect <ontology_id>, for example ohi inspect w3c/org.
  2. Change the version in ohi.yaml and run ohi sync.
  3. Upload the new files, delete the old ones on Explorer > Ontologies, and run induction again.
  • To remove just the ontologies, delete them in Explorer > Ontologies.
  • To remove a test deployment, run make destroy-dev in your COA clone. It may take some time to delete.

NeverBlink, the team behind ohi, maintains this guide, not AWS. If something does not work, open an ohi issue or ask on Discord. For problems with COA itself, use the COA issue tracker.