3

Hi Semantic Web folks,

I dont expect to have <rdf:type rdf:resource='#Tsunami'> in the NamedIndividual: instance_Dromen after inferencing the below OWL code. Somehow there is something wrong with the disjointness between #Huis and #Auto or maybe I dont use complementOf in the right way? In the result of the inferencer the NamedIndividual: instance_Dromen has the following output:

--

<rdf:Description rdf:about="http://www.almfluss.com/rdf/0.1/Ontology.owl#instance_Dromen">
    <owl:sameAs rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#instance_Dromen"/>
    <rdf:type rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#Wielen"/>
    <rdf:type rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#Auto"/>
    <rdf:type rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#Onderstel"/>
    <rdf:type rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#Tsunami"/>
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <rdf:type rdf:resource="http://www.almfluss.com/rdf/0.1/Ontology.owl#Dromen"/>
  </rdf:Description>

The OWL code I use as input for the inferencer is:


<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY swrl "http://www.w3.org/2003/11/swrl#" >
    <!ENTITY swrlb "http://www.w3.org/2003/11/swrlb#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
    <!ENTITY Ontology201210 "http://www.almfluss.com/rdf/0.1/Ontology.owl#" >
]>

    <rdf:RDF    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
                xmlns="http://www.almfluss.com/rdf/0.1/Ontology.owl#" 
                xmlns:Ontology201210="http://www.almfluss.com/rdf/0.1/Ontology.owl#" 
                xmlns:owl="http://www.w3.org/2002/07/owl#" 
                xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
                xmlns:swrl="http://www.w3.org/2003/11/swrl#" 
                xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" 
                xmlns:xsd="http://www.w3.org/2001/XMLSchema#" 
                xml:base="http://www.almfluss.com/rdf/0.1/Ontology.owl#">

    <owl:DatatypeProperty rdf:about="#hasValue"/>

    <owl:Class rdf:about="#Dromen">
        <owl:equivalentClass>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="#Huis"/>
                    <rdf:Description rdf:about="#Auto"/>
                </owl:unionOf>
            </owl:Class>
        </owl:equivalentClass>
        <owl:equivalentClass>
            <owl:Class>
                <owl:complementOf rdf:resource="#Werkloos"/>
            </owl:Class>
        </owl:equivalentClass>
        <owl:equivalentClass>
            <owl:Class>
                <owl:complementOf rdf:resource="#Arbeidsongeschikt"/>
            </owl:Class>
        </owl:equivalentClass>

    </owl:Class>
    <owl:NamedIndividual rdf:about="#instance_Dromen">
                <rdf:type rdf:resource="#Wielen"/>
                <rdf:type rdf:resource="#Onderstel"/>
    </owl:NamedIndividual>

    <owl:Class rdf:about="#Huis">
        <owl:equivalentClass>
            <owl:Class>
                <owl:complementOf rdf:resource="#Tsunami"/>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>
    <owl:NamedIndividual rdf:about="#instance_Huis"/>

    <owl:Class rdf:about="#Auto">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="#Wielen"/>
                    <rdf:Description rdf:about="#Onderstel"/>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
        <owl:disjointWith rdf:resource="#Huis"/>
    </owl:Class>
    <owl:NamedIndividual rdf:about="#instance_Auto"/>

    <owl:Class rdf:about="#Werkloos">
        <owl:equivalentClass>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="#ZelfOntslag"/>
                    <rdf:Description rdf:about="#Ontslagen"/>
                </owl:unionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>
    <owl:NamedIndividual rdf:about="#instance_Werkloos"/>

    <owl:Class rdf:about="#Arbeidsongeschikt"/>
    <owl:NamedIndividual rdf:about="#instance_Arbeidsongeschikt"/>

    <owl:Class rdf:about="#Wielen"/>
    <owl:NamedIndividual rdf:about="#instance_Wielen"/>

    <owl:Class rdf:about="#Onderstel"/>
    <owl:NamedIndividual rdf:about="#instance_Onderstel"/>

    <owl:Class rdf:about="#Ontslagen"/>
    <owl:NamedIndividual rdf:about="#instance_Ontslagen"/>

    <owl:Class rdf:about="#ZelfOntslag"/>
    <owl:NamedIndividual rdf:about="#instance_ZelfOntslag"/>

    <owl:Class rdf:about="#Tsunami"/>
    <owl:NamedIndividual rdf:about="#instance_Tsunami"/>
    </rdf:RDF>

I hope somebody can help me.

Thanks in advance.

Regards, Martijn van der Plaat

3 Answers3

3

Your ontology is quite a mess, for example, you've said that Auto is disjoint from Huis, but that Dromen is equivalent to the union of Huis & Auto.

If you are writing it by hand, stop. Go get Protege 4 and use it to author your ontology. In addition to making it easier to write the ontology, it integrates with various reasoners so you can check consistency & satisfiability right in the GUI. And you'll also be able to use the explanation facility to tell you why a particular inference was made.

Lastly, it is almost always the case that you want subClassOf rather than equivalentTo. Equivalence goes both ways in the relation, which is not often what the author intended.

Michael
  • 4,858
  • 19
  • 32
  • Thank you for you answer. However, I dont want to use a tool like Protege. Im looking for a formal answer of my question: can you logically explain why the instance_Dromen individual got the rdf:type Tsunami after the reasoning process? The idea behind the unionOf Huis & Auto and the disjointess between Auto en Huis is because I want to create a situation that my individual could be of type rdf:Domen but never both type:Huis and type:Auto. – martijnplaat Oct 26 '12 at 08:32
1

I agree with what @Michael wrote. Just some general points about presenting OWL code as part of a (Stackoverflow) question:

  • use a human readable syntax, i.e. avoid XML and avoid RDF (you used both...) since both are unnecessarily verbose for a human-human communication
  • explain your intention behind each axiom in plain English
  • use English entity names (Dutch is not widely spoken among Stackoverflow users)
  • remove stuff that is irrelevant (e.g. SWRL namespace prefixes in this case)

After these changes you might be left with just a few lines of code and the problem with it might become immediately visible...

Kaarel
  • 10,554
  • 4
  • 56
  • 78
  • FWIW I don't think the fact that the entity names are in Dutch is particularly relevant here - but I agree with your general point that a more readable format would be good :) – Jeen Broekstra Oct 26 '12 at 23:55
1

Your instance_Dromen (call it i from now on, for brevity) is defined to be of type Wielen and of type Onderstel. The reasoning that leads to it being of type Tsunami is as follows:

  1. you have defined the class Auto to be equivalent to the intersection of Wielen and Onderstel, therefore i is inferred to be of type Auto.
  2. Since i is of type Auto, we know it is not of type Huis (since these two classes are defined as disjoint).
  3. Since Tsunami is defined as the complement of Huis (that is, everything that is not a Huis is a Tsunami), and i is not of type Huis, we can infer that i is a Tsunami.

Put more succinctly, the way your ontology is modeled leads to every Auto being a Tsunami.

Jeen Broekstra
  • 21,642
  • 4
  • 51
  • 73
  • Thank you! This is was exactly the answer i was looking for. This was not the behavior i had expected.. I agree that xml/rdf is not the best readable format, however this format is most widley used so in – martijnplaat Oct 27 '12 at 06:51
  • @martijnplaat, if you find my answer helpful, you could do me a real favor by voting it up and/or accepting it... – Jeen Broekstra Oct 28 '12 at 04:29
  • Sorry my reputation is only 11, I need 15 to vote up! Either way, I have accepted your answer. Actually, I have a follow up question, but therefore I have to start a new question page.. – martijnplaat Oct 28 '12 at 20:02