You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4a5c90b
Browse filesBrowse the repository at this point in the historyBrowse files
OWL 2 functional syntax files load, including the ORE corpus published as .owl (#311)
Every file loader handed its bytes to an Oxigraph RDF parser and routed
`.owl` to RDF/XML, so an OWL functional-syntax (OFN) document failed on its
first line with `Unexpected text event: 'Prefix(owl:='`. That is every file
of the ORE 2015 reasoner-competition pool, 1,920 OFN documents named `.owl`.
`src/ofn.rs` is a hand-written tokeniser and recursive-descent parser that
emits exactly the triples the W3C "OWL 2 Mapping to RDF Graphs (Second
Edition)" assigns: Table 1 for declarations, class and property expressions,
data ranges and axioms, Table 2 for annotations, and Section 2.3 for annotated
axioms in all three of its cases. SWRL `DLSafeRule`s become the `swrl:`
vocabulary `onto_rules_import` already reads. It adds no dependency; the
established Rust OWL library is LGPL and this crate is MIT. A construct it
does not translate fails the whole document with its name, count and first
line, and parsing continues past it so one error names every such construct.
Malformed input is a syntax error naming the line and what was expected.
`GraphStore` now decides the format in one place for every path that reads a
file, so `load`, `validate`, `convert`, `lint`, `batch`, `onto_load` with its
compile cache, `onto_validate` and `onto_convert` all reach the reader. A
document is OFN when its first token is `Prefix(` or `Ontology(`, whatever its
extension, and `.ofn` is accepted by name. Inline validation sniffs the same
way.
Measured against OWL API 4.5.29 on 93 ORE files (20 each from the dl, el and
pure_dl track lists spread across sizes from 10 KB to 22 MB, plus the smallest
files carrying each rare construct, 2.8 million triples in all): all 93 have
identical lean graphs once seven documented OWL API habits are undone, 38 with
no adjustment at all. The seven are listed in `src/ofn.rs` and none is a
defect in either reader: an owl:Thing-qualified cardinality written
unqualified, owl:distinctMembers for owl:members, type triples for undeclared
entities (115,749 triples over 53 files), rdf:List types on some list cells,
a copied list as a reification's annotatedTarget, some annotated axioms
written more than once, and one anonymous expression shared by two axioms
that differ only in annotations. The OWL API also sorts set operands and
reorders SWRL atoms; the reader keeps source order. A 94th sampled file could
not be compared because its IRI contains U+FFFD, which RFC 3987 forbids and
which Oxigraph rejects in the OWL API's own RDF/XML output too.
Over the pool, the 1,828 smallest files (every file up to 49 MB) were
validated: 1,821 read cleanly, 128 million triples, and the other 7 are
refused for IRIs RFC 3987 does not allow (U+FFFD, and `[` or `]` in a
fragment), each with the line and the IRI. The 92 files above 49 MB were not
run here.
`tests/ofn_reader_test.rs` holds each construct family against Turtle written
from the specification and compared after RDFC 1.0 canonicalisation, the
refusal and syntax-error contracts, every load path including the registry
cache, and an OWL API fixture that must agree once the documented
differences are undone and must disagree when any one rewrite is left out.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Claude dynamically decides the next tool call based on what the previous tool re
59
59
|`onto_query`| To verify structure, answer competency questions, explore the ontology |
60
60
|`onto_diff`| To compare against a reference or previous version |
61
61
|`onto_save`| To persist the ontology to a file |
62
-
|`onto_convert`| To convert between formats (Turtle, N-Triples, RDF/XML, N-Quads, TriG) |
62
+
|`onto_convert`| To convert between formats (reads Turtle, N-Triples, RDF/XML, N-Quads, TriG, JSON-LD and OWL 2 functional syntax; writes the first five) |
63
63
|`onto_clear`| To reset the store before loading a different ontology |
64
64
|`onto_marketplace`| To browse and install ontologies: 33 curated W3C/ISO/industry standards plus community packs from the open registry (`community/registry.json`, fetched at runtime; `community=false` for curated/offline only). Curated IDs always win over community IDs |
65
65
|`onto_plugin_list`| To discover installed WASM plugins (community `.wasm` tools in `~/.open-ontologies/plugins` or `./plugins`) and the tools each declares. Requires a build with `--features plugins`|
Copy file name to clipboardExpand all lines: docs/tool-reference.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ it withheld.
104
104
|`onto_coevolve_dependency_graph`| Build the shape→OWL-dependency map for a SHACL document. |
105
105
|`onto_communities`| Detect communities in the loaded entity graph and return a SKELETON per community: size, top members by degree, internal relations, and the bridges connecting it to other communities. |
106
106
|`onto_conservative_check`| Does adding these axioms change anything the ontology ALREADY said? Reasons base and base+extension to a fixpoint under one rule table and reports closure(base ∪ extension) minus closure(base), restricted to triples every name of which the base already used. |
107
-
|`onto_convert`| Convert an RDF file between formats: turtle, ntriples, rdfxml, nquads, trig |
107
+
|`onto_convert`| Convert an ontology file to turtle, ntriples, rdfxml, nquads or trig.|
108
108
|`onto_cq_run`| Run a batch of competency questions (CQs) against the loaded ontology (#29). |
109
109
|`onto_cq_verdicts_list`| List all stored verdicts for a CQ id, most-recent first. |
110
110
|`onto_crosswalk`| Look up clinical crosswalk mappings for a code and system (ICD10, SNOMED, MeSH). |
@@ -141,7 +141,7 @@ it withheld.
141
141
|`onto_lineage`| Get the compact lineage log for the current or specified session. |
142
142
|`onto_lint`| Check an ontology for quality issues: missing labels, comments, domains, ranges |
143
143
|`onto_lint_feedback`| Accept or dismiss a lint issue to improve future lint runs. |
144
-
|`onto_load`| Load an RDF file or inline Turtle content into the in-memory ontology store. |
144
+
|`onto_load`| Load an ontology file or inline Turtle content into the in-memory ontology store. |
145
145
|`onto_lock`| Lock IRIs to prevent removal during plan/apply. |
146
146
|`onto_map`| Generate a mapping config by inspecting a data file's schema against the currently loaded ontology. |
147
147
|`onto_marketplace`| Browse and install ontologies from the curated catalogue of 33 W3C/ISO/industry standards plus the open community-pack registry (community/registry.json, fetched at runtime; override with OPEN_ONTOLOGIES_COMMUNITY_REGISTRY). |
|`onto_diff`| Compare against a reference or previous version |
104
104
|`onto_save`| Persist the active ontology to a file |
105
-
|`onto_convert`| Convert between Turtle, N-Triples, RDF/XML, N-Quads, TriG |
105
+
|`onto_convert`| Convert between formats (reads Turtle, N-Triples, RDF/XML, N-Quads, TriG, JSON-LD and OWL 2 functional syntax; writes the first five)|
106
106
|`onto_clear`| Reset the in-memory store |
107
107
|`onto_pull`| Fetch ontology from a remote URL or SPARQL endpoint |
0 commit comments