I want to make inferences such as the property represented by the grey-dotted line in this diagram:
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.
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)
andgoesWellWith 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
This ontology will classify the
PearKaleDelight
class as being a subclass ofBitterSweetCombination
.OWL is great for making inferences about ontologies themselves: classes, subclasses, properties, symmetry, reflexivity... When describing domain knowledge (such as food associations in your example), you'll be far better off working with custom inferences.
I suggest you took a look at SWRL to learn how to write such inference rules.
Here, you'll find an onotology I've written to answer your example.
The ontology holds two classes:
Ingredient
Taste
I've created three object properties:
tastes
: Links anIngredient
to itsTaste
;complements
: Symmetric, links twoTastes
together;goesWellWith
: Symmetric, links toIngredients
together.I've also created individuals just like in your example.
sweet
andbitter
: TwoTastes
thatcomplements
each other;pear
: AnIngredient
whichtastes
sweet
;kale
: AnIngredient
whichtastes
bitter
.Go to "Window" > "Tabs", and check "SWRLTab", then go to the newly created "SWRLTab".
You'll see that my ontology also includes a SWRL rule, which looks like
So, what does that mean?
And there you have it. Go back to the "Entities" > "Individuals" tabs, click on
pear
and start the reasoner.As you can see, the reasoner has successfully inferred that
pear goesWellWith kale
(and vice versa). You can click on the question mark icon next to the statement to see how the reasoner was able to infer the statement.