0

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!

Lucas
  • 1
  • 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 Oct 01 '14 at 14:24
  • 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 Oct 07 '14 at 01:51
  • 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 Oct 07 '14 at 02:46
  • Oh, I got it now. Just did it. Also, I should say that Orange and Banana are disjoint from each other. – Lucas Oct 07 '14 at 19:37
  • 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 Oct 07 '14 at 19:56
  • Oh, the original problem isn't solved yet haha I just made it so the only fruits are either banana or orange. It still doesn't infer that every fruit Provide some Vitamin. I'm still searching for a solution to this. – Lucas Oct 07 '14 at 20:18
  • Did you say that Fruit is the *union* of Orange and Banana? By making them disjoint, you've said that nothing is both an orange and a banana, but you still haven't said that every fruit is a banana or an orange. You still need to say that **Fruit ≡ Orange ⊔ Banana**. – Joshua Taylor Oct 07 '14 at 20:26
  • I did! Or at least I think I did. Using protege, i wrote "Orange or Banana" in the equivalent classes field of the Fruit class. Like this: http://i.imgur.com/TKRJrYh.png This means every fruit must be a banana or an orange, right? – Lucas Oct 07 '14 at 20:41

1 Answers1

-1
<?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 -->