Ontologies with Python - subclass_of vs equivalent_to

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

Ontologies with Python - subclass_of vs equivalent_to

jritch33
This post was updated on .
Hi Jiba,

Reading your book "Ontologies with Python" and I love it. Excellent resource.

I have a (possibly silly) question to which a confident answer has been eluding me.

This is a screenshot from your book of the Bacterium ontology (let me know if it didn't come through).


Here you added restrictions to the Pseudomonas class:
-has_grouping some (InPair or Isolated)
-has_shape only Rod
-has_shape some Rod

How do I read these restrictions together? Are these unions? Intersections?

How is this different from writing an equivalency with the same restrictions i.e. equivalent_to = has_grouping some (InPair or Isolated) AND/OR has_shape only Rod AND/OR has_shape some Rod?

Many thanks,
Jordon
Reply | Threaded
Open this post in threaded view
|

Re: Ontologies with Python - only vs some

Jiba
Administrator
Hi Jordon,

Thank you for your feedback about the book!

The three restrictions are considered as parent classes in OWL, and they are related by intersections.

You can also write it as: SubClassOf (has_grouping some (InPair or Isolated)) AND (has_shape only Rod) AND (has_shape some Rod).

However, it is different from an equivalency, because equivalencies are bidirectonal while subclassOf is unidirectional. Here, the subclassOf means that all Pseudomonas are grouped in pair or isolated, and have rod shape.
The equivalency also means that everything that is grouped in pair or isolated, and has rod shape is a Pseudomonas, which is not the case here (there are other species of bacteria that are isolated or paired, and have a rod shape, not only Pseudomonas).

You can think to SubclassOf as an imply relation (=>) and equivalency as an equivalency relation (<=>).

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Ontologies with Python - only vs some

jritch33
Hi Jiba,

That's exactly what I was looking for. Thank you for helping me understand that distinction; fundamentally changes how I will keep using Owlready.

Many thanks!

Jordon