Skip to content

Commit

Permalink
Fixes dependency feature warning, adds documentation for crate featur…
Browse files Browse the repository at this point in the history
…es in README.
  • Loading branch information
filippodebortoli committed Nov 13, 2024
1 parent fc4aaca commit 3a6fdac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ rio_xml="0.8.4"
[features]
default = ["remote"]
remote = ["ureq"]
encoding = ["quick-xml/encoding"]

[dev-dependencies]
horned-owl = {path=".", features = ["remote"]}
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ Horned OWL
*Horned-OWL* is a library for processing and manipulating documents written using the [Web Ontology Language (OWL)](https://en.wikipedia.org/wiki/Web_Ontology_Language).

It extends the existing ecosystem of Rust crates for the Semantic Web and provides tools to interact with OWL ontologies within Rust applications.
It leverages the features of Rust to be performant and competitive against other libraries for ontologies manipulation, such as the [OWL API](https://github.com/owlcs/owlapi). Horned-OWL is aimed at allowing ontologies
It leverages the characteristics of Rust to be performant and competitive against other libraries for ontologies manipulation, such as the [OWL API](https://github.com/owlcs/owlapi). Horned-OWL is aimed at allowing ontologies
with millions of terms.


## Features

+ Supports the OWL 2 language as specified in the [W3C Recommendation](https://www.w3.org/TR/owl-overview/)
+ Supports the Semantic Web Rule Language as specified in the [W3C User Submission](https://www.w3.org/submissions/SWRL/)
+ Supports serialization/deserialization of the following OWL syntaxes:
+ Support for the OWL 2 language as specified in the [W3C Recommendation](https://www.w3.org/TR/owl-overview/)
+ Support for the Semantic Web Rule Language as specified in the [W3C User Submission](https://www.w3.org/submissions/SWRL/)
+ Support for serialization/deserialization of the following OWL syntaxes:
+ [x] RDF/XML
+ [x] OWL/XML
+ [x] Functional Syntax
+ [ ] Manchester Syntax
+ Provides a [visitor](https://en.wikipedia.org/wiki/Visitor_pattern) trait to navigate and manipulate ontologies
+ Provides traits and implementations for several types of ontologies
+ A [visitor](https://en.wikipedia.org/wiki/Visitor_pattern) trait to navigate and manipulate ontologies
+ Traits and implementations for several types of ontologies

## Features

+ `encoding`: enables the `encoding` feature for the [quick-xml](https://crates.io/crates/quick-xml) dependency, expanding support to non-UTF-8 encoded documents while parsing OWL/XML.
+ `remote`: enables the resolution of non-local imports while parsing RDF/XML.
## Performance

We test the performance of our crate in validating large ontologies (e.g. the Gene Ontology) against competing implementations based on the OWL API. Preliminary results are encouraging, showing a potential speedup of 20x-40x.
Expand Down
4 changes: 2 additions & 2 deletions src/io/owx/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn decode_expand_curie_maybe<'a, A: ForIRI, R: BufRead>(
// return it as as borrowed string.
// - in any other case, we need to perform a copy, otherwise the decoded
// string / unabbreviated IRI is not going to live long enough.
#[cfg(feature = "quick-xml/encoding")]
#[cfg(feature = "encoding")]
match r.reader.decode(val) {
Cow::Borrowed(b) => expand_curie_maybe(r, b),
Cow::Owned(o) => match expand_curie_maybe(r, &o) {
Expand All @@ -128,7 +128,7 @@ fn decode_expand_curie_maybe<'a, A: ForIRI, R: BufRead>(
},
}

#[cfg(not(feature = "quick-xml/encoding"))]
#[cfg(not(feature = "encoding"))]
match r.reader.decoder().decode(val) {
Ok(curie) => {
let cur = expand_curie_maybe(r, curie);
Expand Down

0 comments on commit 3a6fdac

Please sign in to comment.