Search code examples
rdfowlsemantic-webprotegerdfs

Inference on Complex Classes in Protege


I want to make inferences such as the property represented by the grey-dotted line in this diagram:

kale goes well with pear because it tastes bitter which complements pear's sweet

I have asserted a general axiom:

(hasTaste some Bitter) SubClassOf: goesWellWith some (hasTaste some Sweet)

where 'bitter' is of type Bitter and 'sweet' is of type Sweet.

I thought owl:someValuesFrom (or Manchester's "some") meant that at least one such relation must exist. Yet this does not happen after making the bold diagram assertions and the general axiom.

How can I make this work?

EDIT (Edit 2, I figured it out)

I just thought of a super-property chain that works! I just specify

hasTaste o complements o isTasteOf

as a super property chain of goesWellWith. In fact, by making hasTaste, hasTexture, etc...all sub-properties of of a general hasTrait, then I can replace hasTaste and isTasteOf with hasTrait and isTraitOf, respectively:

hasTrait o complements o isTraitOf

The result captures every permutation of food properties complementing each other.

enter image description here


Solution

  • In answering you question I will (1) explain why your approach fails and (2) provide a possible solution.

    Why your approach fails

    Reasoners in genereal only give feedback on inferences based on named classes, not anonymous classes. In your example (hasTaste some XXX) and goesWellWith some (hasTaste some YYY) are anonymous classes and therefore they will in general not form part of the reported inferences of a reasoner.

    A possible solution

    ObjectProperty: hasIngredient
        Characteristics: Transitive
        Domain: 
            FoodCombination    
        Range: 
            Food       
    
    ObjectProperty: hasTaste
        SubPropertyChain: 
            hasIngredient o hasTaste
        Characteristics: 
            Transitive
        Domain: 
            Food
        Range: 
            Taste
    
    Class: Bitter
        SubClassOf: 
            Taste
    
    Class: BitterSweetCombination
        EquivalentTo: 
            (hasTaste some Bitter)
             and (hasTaste some Sweet)
        SubClassOf: 
            TastyCombination
    
    Class: CulinaryDish
        SubClassOf: 
            FoodCombination
    
    Class: DespicableCombination
        SubClassOf: 
            FoodCombination
    
    Class: Food
        DisjointWith: 
            Taste
    
    Class: FoodCombination
        SubClassOf: 
            Food
        DisjointUnionOf: 
            DespicableCombination, TastyCombination
    
    Class: Kale
        SubClassOf: 
            Food,
            hasTaste some Bitter
        DisjointWith: 
            Pear
    
    Class: Pear
        SubClassOf: 
            Food,
            hasTaste some Sweet
        DisjointWith: 
            Kale
    
    Class: PearKaleDelight
        SubClassOf: 
            CulinaryDish,
            hasIngredient some Kale,
            hasIngredient some Pear
    
    Class: Sweet
        SubClassOf: 
            Taste
    
    Class: Taste
        DisjointUnionOf: 
            Bitter, Sweet
        DisjointWith: 
            Food
    
    Class: TastyCombination
        SubClassOf: 
            FoodCombination
    

    This ontology will classify the PearKaleDelight class as being a subclass of BitterSweetCombination.