Expand description
Core data model and reasoner API for OntoLogos.
v0.4 provides an in-memory ontology representation with interned IRIs, typed entities, structured axioms, secondary indexes, and JSON v2 serialization.
§Start here — load and reason
Do not use Ontology::from_file or Reasoner::classify for file loading / reasoning.
ⓘ
use ontologos_parser::load_ontology;
use ontologos_rdfs::RdfsEngine;
let mut ontology = load_ontology(std::path::Path::new("ontology.owl"))?;
let report = RdfsEngine::new().materialize(&mut ontology)?;
println!("inferred {}", report.inferred_total());OWL RL saturation: ontologos_rl::RlEngine::new(1)?.saturate(&mut ontology)?
§Builder-only (no parser)
use ontologos_core::{Error, Ontology};
fn main() -> Result<(), Error> {
let ontology = Ontology::builder()
.class("http://example.org/Pizza")?
.class("http://example.org/Food")?
.subclass_of("http://example.org/Pizza", "http://example.org/Food")?
.build()?;
assert_eq!(ontology.axiom_count(), 1);
Ok(())
}Structs§
- AxiomId
- Stable identifier for a stored axiom.
- Axiom
Index - Secondary indexes over axioms for fast engine lookups.
- Axiom
Store - Storage for ontology axioms.
- Entity
Id - Stable identifier for an ontology entity. Opaque entity identifier (index into the entity registry).
- Entity
Record - A registered ontology entity with its interned IRI and kind.
- Entity
Registry - Registry mapping interned IRIs to typed entities.
- Intern
Pool - Deduplicating pool of absolute IRI strings.
- IriId
- Stable identifier for an interned IRI string.
- Limits
- Resource limits for ontology JSON deserialization.
- Ontology
- In-memory ontology with interned IRIs, typed entities, and indexed axioms.
- Ontology
Builder - Fluent builder for constructing ontologies in memory.
- Parse
Meta - Metadata from OWL file parsing (not serialized in JSON v2 snapshots).
- Parse
Meta Summary - User-facing parse metadata for CLI and Python bindings.
- Reasoner
- Main reasoner facade over profile-specific engines.
- Reasoner
Builder - Builder for constructing a configured reasoner instance.
- Reasoner
Config - Configuration options for the reasoner builder.
- Taxonomy
- Extracted class taxonomy from a classification run.
Enums§
- Axiom
- Supported axiom types in the 1.x reasoner.
- Entity
Kind - Kind of entity stored in the ontology registry.
- Error
- Errors produced by the core ontology model.
- OwlConstruct
- OWL 2 construct observed during parsing (for profile detection).
- Profile
- OWL profile selected for reasoning.
Type Aliases§
- Result
- Result type alias using [
Error].