简体   繁体   English

通过owl max限制保护意外行为

[英]Protege unexpected behavior with owl max restriction

I am creating an ontology in Protégé modelling desserts. 我正在Protégé建模甜点中创建本体。 There are two main base classes Dessert and Ingredient and a hasIngredient property to connect them. 有两个主要的基本类,甜点和成分,以及一个hasIngredient属性来连接它们。 An example of a dessert looks as follows; 一个甜点的例子如下:

NeapolitanIceCream subclass of Dessert
    hasIngredient exactly 1 IceCream
    hasIngredient exactly 1 wafers
    hasIngredient only (IceCream or Wafers)

And I have 2 primitive classes SimpleDessert and ComplexDessert 我有2个原始类SimpleDessert和ComplexDessert

SimpleDessert subclass of Dessert and (hasIngredient max 3 Ingredient)

ComplexDessert subclass of Dessert and (hasIngredient min 5 Ingredient)

SimpleDessert(min) performs as expected but ComplexDessert(max) has no subclasses when I run the reasoner. 当我运行推理程序时,SimpleDessert(min)的性能符合预期,但是ComplexDessert(max)没有子类。 My understanding of the Open World Principle thought that the exactly 1 clauses and the only clause make it clear that there are only these two possible ingredients and the quantity is clear. 我对开放世界原则的理解认为,恰好1子句和only子句清楚地表明只有这两种可能的成分,数量也很明确。 I'm probably missing something obvious but would love any help here. 我可能缺少明显的东西,但希望在此提供任何帮助。

This axiom may not mean what you want it to mean: 该公理可能并不意味着您想要的意思:

SimpleDessert subclass of Dessert and (hasIngredient max 3 Ingredient) 甜点和(具有最多3种成分的成分)的SimpleDessert子类

This says that "if something is a SimpleDessert, then it is a Dessert and has at most three ingredients. It does not say that "if something is a Dessert and has at most three ingredients, then it is a SimpleDessert." 这表示“如果 某物是一个SimpleDessert, 那么它是一个甜点,并且最多具有三个成分。 不是”如果 某物是一个Dessert,并且它最多具有三个成分, 那么它就是一个SimpleDessert。”

I you want to say the latter, then you need the subclass axiom in the other direction: 我想说后者,那么您就需要另一个方向的子类公理:

Dessert ⊓ ≤ 3 hasIngredent.Ingredient ⊑ SimpleDessert 甜品⊓≤3 hasIngredent.Ingredient⊑SimpleDessert

In Protege, you do that using the General Axioms tab. 在Protege中,您可以使用General Axioms选项卡进行此操作。 (See my answer to owl protege how can I describe a class that has just some properties? for an example and screenshots.) (有关示例和屏幕截图,请参见owl protege的 回答如何描述一个仅具有某些属性的类?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM