ontologos-facade 1.0.0

Unified OWL reasoner facade routing EL/RL/RDFS/DL
Documentation

ontologos-facade

Unified OWL reasoner routing for OntoLogos — one classify() entry for EL, RL, RDFS, DL, ALC, and SWRL.

Full guide: Facade API

Install

[dependencies]
ontologos-core = "0.9.0"
ontologos-parser = "0.9.0"
ontologos-facade = "0.9.0"

Bump all ontologos-* pins together. On main, use "1.0.0" for DL and the full engine set.

Quick start

Download family.owl first:

curl -L -o family.owl \
  https://raw.githubusercontent.com/eddiethedean/ontologos/main/benchmarks/data/family.owl
use ontologos_core::{Profile, Reasoner};
use ontologos_facade::ClassifyOutcome;
use ontologos_parser::load_ontology;

let ontology = load_ontology("family.owl".as_ref())?;
let mut reasoner = Reasoner::builder()
    .profile(Profile::Auto)
    .build(ontology)?;

match ontologos_facade::classify(&mut reasoner)? {
    ClassifyOutcome::Taxonomy(t) => println!("{}", t.subsumption_count()),
    ClassifyOutcome::Rdfs(r) => println!("{}", r.inferred_total()),
    ClassifyOutcome::Rl(r) => println!("{}", r.inferred_total()),
}

Example binary

From a clone:

cargo run -p ontologos-facade --example facade_auto -- benchmarks/data/family.owl

Related