0
votes

So, for example, I have a ontology with the classes Fruit and Vitamin. The class Fruit has only Orange and Banana as subclasses, and the class Vitamin has only VitaminC and VitaminB as subclasses. These subclasses are all disjoint from each other.

I also have a object property Provide, with the class Fruit as domain and Vitamin as range.

Then, I defined the restrictions: "Orange Provide some VitaminC" and "Banana Provide some VitaminB".

Is there a way so I can make a reasoner infer that "Fruit Provide some Vitamin" in this situation?

I'm using the owlapi to do this, but I also use Protege, so answers using any of those would be nice.

If this is not enough information, please let me know. Thanks!

1
There are different kinds of restrictions in OWL. Just saying "Orange Provide VitaminC" isn't clear enough. Did you write "Orange subClassOf (Provide only VitaminC)" or "Orange subClassOf (Provide some VitaminC)" or something else? You'll also haven't told us whether Orange and Banana are exhaustive subclasses of Fruit. If, for instance, x is a fruit, but isn't an Orange or a Banana, then we don't know whether it provides a vitamin. Then we shouldn't be able to infer that every fruit provides some vitamin, right?Joshua Taylor
Sorry it took so long for me to reply! And I'm sorry, I meant "Orange Provide some VitaminC". I didn't even notice the mistake. I'm going to edit it. Also, in this example I'm just supposing that there are only two fruits, Orange and Banana. It's a simple example because I just want to learn if there is a way do infer something about a class based on the restricions of it's subclasses. Not sure if I aswered your question.Lucas
You still haven't told us whether Orange and Banana are an exhaustive partition of Fruit. Just having the hierarchy Fruit -> Orange, Banana doesn't ensure that every fruit is either an orange or a banana. If there can be fruits that aren't oranges or bananas, then there could be fruits that don't provide vitamins. You need to add an axiom that says that every fruit is either an orange or a banana.Joshua Taylor
Oh, I got it now. Just did it. Also, I should say that Orange and Banana are disjoint from each other.Lucas
Glad to hear you got it working. Yes, you could add an axiom that Or. and Ba. are disjoint, though it's not necessary to get this particular result. If your solution works for you, you should post an answer and accept it (it's perfectly fine to answer your own question).Joshua Taylor

1 Answers

-1
votes
<?xml version="1.0"?>


<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!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#" >
]>


<rdf:RDF xmlns="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#"
     xml:base="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <owl:Ontology rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5"/>



    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Object Properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->




    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provide -->

    <owl:ObjectProperty rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provide"/>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideB -->

    <owl:ObjectProperty rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideB">
        <rdfs:subPropertyOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provide"/>
        <owl:propertyDisjointWith rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideC"/>
        <rdfs:domain>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideB"/>
                <owl:allValuesFrom rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Banana"/>
            </owl:Restriction>
        </rdfs:domain>
        <rdfs:range>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideB"/>
                <owl:allValuesFrom rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#B"/>
            </owl:Restriction>
        </rdfs:range>
    </owl:ObjectProperty>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideC -->

    <owl:ObjectProperty rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideC">
        <rdfs:subPropertyOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provide"/>
        <rdfs:domain>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideC"/>
                <owl:allValuesFrom rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Orange"/>
            </owl:Restriction>
        </rdfs:domain>
        <rdfs:range>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#provideC"/>
                <owl:allValuesFrom rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#C"/>
            </owl:Restriction>
        </rdfs:range>
    </owl:ObjectProperty>



    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Classes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->




    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#A -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#A">
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Vitamin"/>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#B -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#B">
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Vitamin"/>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Banana -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Banana">
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Fruit"/>
        <owl:disjointWith rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Orange"/>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#C -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#C">
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Vitamin"/>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Fruit -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Fruit">
        <owl:equivalentClass>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Banana"/>
                    <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Orange"/>
                </owl:unionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Orange -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Orange">
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Fruit"/>
    </owl:Class>



    <!-- http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Vitamin -->

    <owl:Class rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#Vitamin">
        <owl:equivalentClass>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#A"/>
                    <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#B"/>
                    <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#C"/>
                </owl:unionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>



    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // General axioms
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    <rdf:Description>
        <rdf:type rdf:resource="&owl;AllDisjointClasses"/>
        <owl:members rdf:parseType="Collection">
            <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#A"/>
            <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#B"/>
            <rdf:Description rdf:about="http://www.semanticweb.org/i.gurjanov/ontologies/2014/8/untitled-ontology-5#C"/>
        </owl:members>
    </rdf:Description>
</rdf:RDF>



<!-- Generated by the OWL API (version 3.5.0) http://owlapi.sourceforge.net -->