Search code examples
ontologyprotege

Can disjoint classes in an ontology share the same data properties?


I am currently writing my master's thesis on ontology-based knowledge bases in academic libraries. For this purpose, I am trying to model the domain knowledge of a specialised music library as an ontology into which the domain knowledge can later be transferred. I use Protégé (version 5.6.1) as a tool for this. However, I think I lack a certain basic understanding in some points. The question is whether disjoint classes can have common data properties.

An example: I have two classes: Library and Library Team. The class "Library" has, among other things, the data property "Phone number", which refers to the general service telephone number. The class "Library team" has, among other things, the data properties "Last name" and "First name", both of which are individual for this class. At the same time, there is also the data property "Telephone number", but this time it refers to the individual telephone numbers of the team members. The two classes are disjoint. This means that no individual of the Team member class can be an individual of the Library class at the same time. Nevertheless, the classes in my modelling currently share the Phone number property.

The question now is: Is this procedure permissible from an ontological point of view? Or would I have to model the "phone number" property separately for both classes?

I have used the two reasoners HermiT (version 1.4.3) and Pellet as a test, both of which issue an error when I create an individual of the "Library Team" class with the corresponding properties. I assume this is related to the disjointness of the classes, which a quick double check has confirmed. Nevertheless, it seems to me to make more sense to reuse properties of classes in other classes if possible instead of redefining them. If this is indeed not possible, I will have to restructure my entire ontology and right now I hope that this is not necessary.
Long story short: Can anyone explain my errors in reasoning?

Thanks in advance, Vera


Solution

  • Disjoint classes can share object and/or data properties.

    You seem to come from a programming object oriented background. In programming classes have attributes (or properties). However, in OWL (the ontology language) properties do not belong to classes, but are used to express relations between classes (object properties) or to express relations between classes and data types (data properties). I talk in some detail about the difference between OO and OWL here.

    There can be many reasons for inconsistencies and without seeing your ontology it is difficult to know their cause exactly. A guess is that you have domain and/or range restrictions on a property that is causing the issue.

    Say you have the class Library and Team, which are disjoint and you have a data property telephone and you have defined them as follows:

    DataProperty: telephone
    
    Class: Library 
       SubClassOf:
           telephone some xsd:string
    
    Class: Team 
       DisjointWith: Library
       SubClassOf:
           telephone some xsd:string  
    
      
    

    This by itself will not cause an inconsistency. However, when you define telephone as follows, it will cause an inconsistency:

     DataProperty: telephone
       Domain: Library, Team
    

    What the Domain: Library, Team axiom tells the reasoner is, whenever an individual is linked via telephone to another individual, it must infer that the first individual is of type Library and of type Team. Hence the inconsistency.

    There are 2 possible solutions:

    1. Remove the Domain: Library, Team axiom. This is by far the most common way to deal with it.

    2. In some cases I have found it useful to create a TelephoneDomain class which is defined to be equivalent to Library or Team. Then telephone is defined as follows:

      DataProperty: telephone
        Domain: TelephoneDomain
      

    The main advantage of having using (a) Domain: TelephoneDomain rather than (b)Domain: Library or Team is (a) will give me inferences but (b) will not because Library or Team is an anonymous class. See my StackOverflow answer wrt anonymous classes.