如何建模一个类,它是Protege中另一个类的个体集合

时间:2022-07-04 18:06:54

I need to model following example in Protege:

我需要在Protege中为以下示例建模:

Suppose I have a class, Pride, which represents a collection of instances of another class, Lion. Is there any other way to do this without use of user defined object property with minimum cardinality?

假设我有一个类Pride,它代表另一个类Lion的实例的集合。没有使用具有最小基数的用户定义对象属性,还有其他方法可以做到这一点吗?

Furthermore, if a lion has color "Yellow" and is a member of a pride, then the reasoner should infer that the pride has color "Yellow". Is there any other to do this without defining a set of SWRL rules ?

此外,如果狮子的颜色为“黄色”并且是骄傲的成员,那么推理者应该推断骄傲的颜色为“黄色”。如果没有定义一组SWRL规则,还有其他任何事情吗?

1 个解决方案

#1


Is there any other way to do this without use of user defined object property with minimum cardinality?

没有使用具有最小基数的用户定义对象属性,还有其他方法可以做到这一点吗?

You will need to define some sort of membership property. It can be generic (e.g., hasMember), or more specific to the particular type (e.g., hasLion), but you'll need to define something to relate the collection to its instances. You do not required to use any cardinality axioms here, though you might want to say something like (Pride ⊑ ≥ hasMember 2).

您需要定义某种成员资格属性。它可以是通用的(例如hasMember),或者更特定于特定类型(例如,hasLion),但是您需要定义一些内容以将集合与其实例相关联。你不需要在这里使用任何基数公理,尽管你可能想说(Pride⊑≥hasMember2)。

Furthermore, if a lion has color "Yellow" and is a member of a pride, then the reasoner should infer that the pride has color "Yellow". Is there any other to do this without defining a set of SWRL rules ?

此外,如果狮子的颜色为“黄色”并且是骄傲的成员,那么推理者应该推断骄傲的颜色为“黄色”。如果没有定义一组SWRL规则,还有其他任何事情吗?

To make the properties of the members transfer to the collection, you don't have to use SWRL rules. You can use subproperty chain axioms. (You will need to do this for each property that you want to transfer over, though.) For instance, to express the fact that:

要使成员的属性转移到集合,您不必使用SWRL规则。您可以使用子属性链公理。 (但是,您需要为要转移的每个属性执行此操作。)例如,要表达以下事实:

        If a lion has color X and is a member of pride, then the pride has color X.

如果狮子的颜色为X并且是骄傲的成员,则骄傲的颜色为X.

You can use the axiom:

你可以使用公理:

        hasMember • hasColor ⊑ hasColor

hasMember•hasColor⊑hasColor

That means that whenever you have data like:

这意味着只要您拥有以下数据:

        P →hasMember L →hasColor C

P→hasMember L→hasColor C.

you can infer

你可以推断

        P →hasColor C

P→hasColor C.

For more on how that works, see Using Property Chains to get inferred Knowledge in an OWL Ontology(Protege).

有关其工作原理的更多信息,请参阅使用属性链在OWL本体(Protege)中获取推断的知识。

#1


Is there any other way to do this without use of user defined object property with minimum cardinality?

没有使用具有最小基数的用户定义对象属性,还有其他方法可以做到这一点吗?

You will need to define some sort of membership property. It can be generic (e.g., hasMember), or more specific to the particular type (e.g., hasLion), but you'll need to define something to relate the collection to its instances. You do not required to use any cardinality axioms here, though you might want to say something like (Pride ⊑ ≥ hasMember 2).

您需要定义某种成员资格属性。它可以是通用的(例如hasMember),或者更特定于特定类型(例如,hasLion),但是您需要定义一些内容以将集合与其实例相关联。你不需要在这里使用任何基数公理,尽管你可能想说(Pride⊑≥hasMember2)。

Furthermore, if a lion has color "Yellow" and is a member of a pride, then the reasoner should infer that the pride has color "Yellow". Is there any other to do this without defining a set of SWRL rules ?

此外,如果狮子的颜色为“黄色”并且是骄傲的成员,那么推理者应该推断骄傲的颜色为“黄色”。如果没有定义一组SWRL规则,还有其他任何事情吗?

To make the properties of the members transfer to the collection, you don't have to use SWRL rules. You can use subproperty chain axioms. (You will need to do this for each property that you want to transfer over, though.) For instance, to express the fact that:

要使成员的属性转移到集合,您不必使用SWRL规则。您可以使用子属性链公理。 (但是,您需要为要转移的每个属性执行此操作。)例如,要表达以下事实:

        If a lion has color X and is a member of pride, then the pride has color X.

如果狮子的颜色为X并且是骄傲的成员,则骄傲的颜色为X.

You can use the axiom:

你可以使用公理:

        hasMember • hasColor ⊑ hasColor

hasMember•hasColor⊑hasColor

That means that whenever you have data like:

这意味着只要您拥有以下数据:

        P →hasMember L →hasColor C

P→hasMember L→hasColor C.

you can infer

你可以推断

        P →hasColor C

P→hasColor C.

For more on how that works, see Using Property Chains to get inferred Knowledge in an OWL Ontology(Protege).

有关其工作原理的更多信息,请参阅使用属性链在OWL本体(Protege)中获取推断的知识。