Difference between OWLReady2 and RDFLib

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference between OWLReady2 and RDFLib

Shadi
Hi,

I am looking for an RDF/OWL based Domain Driven Development (DDD) framework.

I have an OWL ontology used as a TBox model and I want to build forms upon my RDF/OWL classes, properties and owl restrictions defined in the TBox. First, I want to load the schema of my ontology and then navigate through the classes and retrieve the associated properties and restrictions.

My question is what is the difference between OWLReady2 and RDFLib libraries. (the advantages and disadvantage of using them?)

Thank you in advance
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

Jiba
Administrator
Hi,

As the main author of Owlready, I am obviously not impartial. But here are some points:

Advantages of Owlready :
 * Work at the OWL level, and thus it has specific methods and classes for most OWL features (e.g. for some/only restrictions, etc)
 * Reasoning support, via the integrated reasoners
 * Faster quadstore and parser (espescially interesting if you are working on big ontologies)

Advantages of RDFlib :
 * Work at the RDF level, which might be interesting if you OWL ontologies are linked with non-OWL data
 * More widely spread

If you are working on big ontologies, the quadstore of Owlready is much better optimized, so you should go for Owlready. If you need complex OWL structure, such as combination of restriction with intersection etc, Owlready has also better support for that -- with RDFlib, you need to manage OWL construct as plain RDF triples.
On the contrary, if your ontologies are small and you just need to access them as RDF triples, RDFlib may be sufficient.

Jiba
rdk
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

rdk
Besides Jiba's explanation, RDFLib also allows you to:
* work with Python 2.6 and above (if you're working with IronPython, for instance, you're limited to Python 2.7)
* deal with different formats (RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, RDFa and Microdata)
* work with Jupyter Notebooks (trying to install owlready2 raises an error)

For reasoning, you can use EYE (requires N3 format).

On the other hand, Owlready2 is AWESOME and has been improving quickly!
(Thanks Jiba ;)
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

Shadi
Thank you Jiba and rdk for your responses.

Jiba, you mentioned that Owlready has specific methods and classes for most OWL features. regarding to documentation of Owlready I can use these methods to create the ontology but for navigating and accessing the content of the ontology like all hasvalues restrictions on a specific class I should use SPARQL queries. Is it correct?
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

Jiba
Administrator
No, Owlready has also simplified ways to access restrictions.

You can either access them as object in Class.is_a, or (for simple restriction) access them as class attributes with the following syntax : Class.property (by default, "some" restrictions are returned; this can be confidured on a per property basis for using "only").

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

mafi
In reply to this post by rdk
I use OWLReady2 from within Jupyter notebooks, what errors are you seeing?

A huge improvement (IMO ) for OWLReady2, would be to include a driver for RDFLib that allows one to bridge the OWL->RDF gap.  I'd like to work with ontologies but use RDFLib under the hood.

-M
rdk
Reply | Threaded
Open this post in threaded view
|

Re: Difference between OWLReady2 and RDFLib

rdk
Hi Mafi,

A few weeks ago I wasn't able to install it in Jupyter Notebooks: it was throwing an installation error (cannot recall exactly which).

Just made a new attempt with owlready2-0.15 and everything appears to be working well.