Reuse of ontologies (Ontofox) and Owlready2

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

Reuse of ontologies (Ontofox) and Owlready2

Jean
Hi,

The web-based Ontology tool "Ontofox" (http://ontofox.hegroup.org) allows us to reuse an ontology (MIREOT “philosophy”) in its entirety or partially (e.g. only one class and its children).

This is relatively easy when ontologies are in the Ontofox store, but it is more difficult with ontologies only available on the web (and not stored in Ontofox). In this case, it is necessary to use a SPARQL endpoint (difficult to use: Has anyone ever successfully used this feature?).

I would like to know if it is possible to perform the same automated work with Owlready?

Thanks.
Jean.
Reply | Threaded
Open this post in threaded view
|

Re: Reuse of ontologies (Ontofox) and Owlready2

Jiba
Administrator
Hi,

Currently, Owlready still lacks some method for duplicating or copying a given entity from an ontology to another. Thus, you probably need to work at the RDF level for ontology reuse, until copying methods are added.

Best regards,
Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Reuse of ontologies (Ontofox) and Owlready2

Jean
Hi,
What do you mean by "you probably need to work at the RDF level"?
Thanks.
Jean.
gp
Reply | Threaded
Open this post in threaded view
|

Re: Reuse of ontologies (Ontofox) and Owlready2

gp
When working on a similar problem I indeed used rdflib (which owlready2 imports itself) to copy some properties of interest from one ontology to the other.
I then found it convenient to use the SPARQL queries handler of rdflib to retrieve the properties of interest. For property restrictions expect your queries to become complex though.
For very large ontologies you might also want to rely on a proper SPARQL queries handler, for instance by installing an instance of the JENA Fuseki server, or virtuoso.

I also achieved some similar result by reconstructing the properties of interest manually using owlready2, basically passing around the strings. This is more cumbersome though but saves you the sometimes difficult to write SPARQL queries.

In either case you will need to make use of the world functionality of owlready2 to make sure that you do not mix up your two (or more) ontologies.

Good luck,
G
Reply | Threaded
Open this post in threaded view
|

Re: Reuse of ontologies (Ontofox) and Owlready2

Jiba
Administrator
Hi,

As said by GP, you can access Owlready quadstore as an RDFlib graph and copy part of the graph.

Ontology reuse is not as trivial as it seems. For example, if class A is equivalent to B union C union D, and we want to reuse A, B and C, what should become the "equivalent to" relation? Shouls we ignore it (because D is missing) ? Should we simplify it as "A equivalent to B and C" ? Should we keep it intact, with D being an "empty" class ?

I'm thinking about adding ontology reuse facilities to Owlready but I still need to figure out how to do it properly.

Best regards,
Jiba