问题
I want to be able to infer which ingredients go well together given...their properties and which properties complement each other.
I have an ontology like,
owl:Thing
Ingredient
Kale
Pear
Taste
Bitter
Sweet
owl:topObjectProperty
hasTaste
tasteComplements
goesWellWith
Individuals: (*would rather work with just classes)
kale a Kale
pear a Pear
bitter a Bitter
sweet a Sweet
I've asserted,
Kale subClassOf hasTaste some Bitter
Pear subClassOf hasTaste some Sweet
Bitter subClassOf tasteComplements some Sweet
tasteComplements a owl:SymmetricProperty
goesWellWith a owl:SymmetricProperty
And a general axiom:
(hasTaste some Bitter) SubClassOf: goesWellWith some (hasTaste some Sweet)
First of all, I'd like Protege to be able to infer that also Sweet tasteComplements some Bitter
. Although I understand why symmetric properties in existential restrictions don't work that way. So I'll settle for
sweet tasteComplements bitter
bitter tasteComplements sweet
But surprisingly neither of these are inferred. I must manually specify one of them first, then the other is inferred.
More importantly I want to infer:
Kale goesWellWith some Pear
Pear goesWellWith some Kale
while failing in this, I'd at least like:
kale goesWellWith pear
But this is not inferred either. From my general axiom, it should be the case that since kale a Kale
, there necessarily must be at least one triple:
kale hasTaste [b] <!-- where [b] is of type Bitter -->
Therefore, we have should another triple too:
kale goesWellWith [y]
where
[y] hasTaste [s] <!-- and [s] is of type Sweet -->
[y] is pear <!-- the only available option in this case -->
kale goesWellWith pear
How can I make these inferences happen between individuals as expected? Something between classes would be even better.*
More generally, I'd like to be able to assert:
if XXX tasteComplements YYY then:
(hasTaste some XXX) SubClassOf: goesWellWith some (hasTaste some YYY)
Is there some sneaky way to achieve this with rolification like in this answer? (I'd rather avoid SWRL rules...)
* NOTE
I would rather infer triples between classes rather than individuals, although I know of no way to make this logically happen. Individuals feel like a laundry list/dump of every concept in my ingredients & properties taxonomy with no hierarchy -- redundant and impossible to keep organized. Ideally this taxonomy will provide an interface for someone to describe the characteristics of ingredients that complement each other.
来源:https://stackoverflow.com/questions/51683587/trouble-inferring-properties-for-classes-individuals-in-protege-5-owl