Pregunta

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

¿Fue útil?

Solución

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.

Otros consejos

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.

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top