Getting Started¶
Five-minute success paths for common goals.
Crates.io only (no clone)¶
Use any OWL file on disk — no repository clone or benchmark download required.
Add to Cargo.toml:
src/main.rs:
use ontologos_parser::load_ontology;
use ontologos_rdfs::RdfsEngine;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut ontology = load_ontology(std::path::Path::new("ontology.owl"))?;
let report = RdfsEngine::new().materialize(&mut ontology)?;
println!(
"inferred {} axioms ({} → {})",
report.inferred_total(),
report.initial_axiom_count,
report.final_axiom_count
);
Ok(())
}
Place your OWL file at ontology.owl, then cargo run.
For OWL RL saturation, add ontologos-rl = "0.5.0" and see OWL RL saturation.
I want to try it from a clone¶
- Clone and download benchmarks:
git clone https://github.com/eddiethedean/ontologos.git
cd ontologos
./benchmarks/scripts/download.sh
- Run the builder example:
- Build the CLI and inspect an ontology:
cargo build -p ontologos-cli --release
./target/release/ontologos profile benchmarks/data/family.owl
./target/release/ontologos materialize benchmarks/data/family.owl
I want RDFS materialization¶
Follow RDFS materialization. Prefer CLI materialize over classify — both run the same engine in v0.4.
I want OWL RL saturation (v0.4 headline feature)¶
Follow OWL RL saturation or run:
OWL RL is not available in the CLI until v0.5 — use the library or Python profile="rl".
I'm integrating in Rust¶
Read Choosing an API then the guide for your workflow:
| Goal | Guide |
|---|---|
| Build ontologies in code | First ontology |
| Load OWL files | Load an OWL file |
| RDFS materialization | RDFS materialization |
| OWL RL saturation | OWL RL saturation |
| JSON snapshots | JSON snapshot v2 |
I'm evaluating vs ELK / reasonable¶
See Comparison with existing tools and Conformance coverage.
I'm using Python¶
from ontologos import Reasoner
# Always set profile= — default "auto" fails in v0.4
Reasoner("ontology.owl", profile="rdfs").classify()
See Python guide.
Full learning path¶
See the documentation index.