Search code examples
xmlrdfowlinference-engine

Why does my OWL inferencer not give me the results I expected?


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


Solution

  • 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.