OWL确切基数限制的含义 [英] Meaning of OWL exact cardinality restrictions
问题描述
我是使用 OWL的曼彻斯特语法的新手编码.我需要了解exactly
的作用.以下哪些限制是正确的:
I am a newbie coding with the Manchester syntax for OWL. I need to understand the role of exactly
. Which of these restrictions is correct:
(hasChild (A or B)) and (hasChild exactly 1 Thing)
(hasChild (A or B)) and (hasChild exactly 2 Thing)
(hasChild (A and B)) and (hasChild exactly 1 Thing)
(hasChild (A and B)) and (hasChild exactly 2 Thing)
当A
和B
等价且不相交时,您能解释一下吗?
Can you explain it when A
and B
are equivalent, and when they are disjoint?
推荐答案
The meaning of class expressions is defined in section 2.2.3 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics W3C recommendation.
在我所了解的曼彻斯特OWL语法中,问题中给出的四个类表达式的格式不太正确,因为hasChild (A or/and B)
确实需要为hasChild some/only (A or/and B)
.也就是说,我们仍然可以讨论各种组合的含义.
The four class expressions given in the question aren't quite well formed, as I understand the Manchester OWL syntax, as hasChild (A or/and B)
really needs to be hasChild some/only (A or/and B)
. That said, we can still discuss the meaning of the various combinations.
限制hasChild exactly 1 Thing
和hasChild exactly 2 Thing
分别表示通过hasChild
属性恰好与一个或两个其他个体相关的个体类别.由于限制中的类表达式为Thing
,因此查看不带类的版本可能更常见:hasChild exactly 1
和hasChild exactly 2
.
The restrictions hasChild exactly 1 Thing
and hasChild exactly 2 Thing
denote the classes of individuals which are related to exactly one or two other individuals by the hasChild
property, respectively. Since the class expression in the restriction is Thing
, it is probably more common to see the versions without a class: hasChild exactly 1
and hasChild exactly 2
.
表达式hasChild only X
表示个体的类别,使得 if 通过hasChild
属性与任何其他个体相关,而 then 是 X
的实例.并没有强加任何有个人的约束,只有如果有个人,那么他们一定是X
s.
The expression hasChild only X
denotes the class of individuals which are such that if they are related to any other individual by the hasChild
property, then the other individual is an instance of X
. It does not impose any constraint that there are such individuals, but only that if there are any, then they must be X
s.
表达式hasChild some X
表示通过hasChild
属性与至少个其他个体相关的个体类别,该个体是X
.并没有施加任何约束,即与hasChild
关联的其他每个人都是X
,而至少一个是.
The expression hasChild some X
denotes the class of individuals which are related to at least one other individual that is an X
by the hasChild
property. It does not impose any constraint that every other individual related by the hasChild
is an X
, just that at least one is.
当前问题中的类表达式格式不正确,应该为hasChild some (A or/and B)
或hasChild only (A or/and B)
.这意味着有许多情况需要考虑,但幸运的是其中一些情况有所减少.
The class expressions in the problem aren't well formed at the moment, and should either be hasChild some (A or/and B)
or hasChild only (A or/and B)
. This means that there are a number of cases to consider, but fortunately some of them condense down.
如果A
和B
是等效的,则(A or B)
和(A and B)
都等效于A
和B
.这意味着可以将问题中的表达式简化为两种情况,具体取决于左侧的限制是some
还是only
.
If A
and B
are equivalent, then both (A or B)
and (A and B)
are equivalent to A
and to B
. This means that the expressions in the question can be simplified into two cases, depending on whether the restriction on the left hand side should be some
or only
.
-
(hasChild some A) and (hasChild exactly 1 Thing)
此类表示由hasChild
属性与至少一个类型为A
的个体相关的个体的类别,并且通过hasChild
属性与另一个人完全相关(在左侧,该个人必须是A
类型的个人).
(hasChild some A) and (hasChild exactly 1 Thing)
This class expression denotes the class of individuals which are related by thehasChild
property to at least one individual of typeA
, and that are related to exactly one other individual by thehasChild
property (and by the left side, that one individual must be that individual of typeA
).
(hasChild some A) and (hasChild exactly 2 Thing)
此类表示由hasChild
属性与至少一个类型为A
的个体相关的个体的类别,并且通过hasChild
属性恰好与两个人相关(并且在左侧,这些人之一必须是类型为A
的人).
(hasChild some A) and (hasChild exactly 2 Thing)
This class expression denotes the class of individuals which are related by the hasChild
property to at least one individual of type A
, and that are related to exactly two individuals by the hasChild
property (and by the left side, one of these individuals must that individual of type A
).
(hasChild only A) and (hasChild exactly 1 Thing)
该类表达式表示通过hasChild
属性仅与A
类型的个体相关,并且通过A
类型与另一个人完全相关的个体的类别. hasChild
属性(在左侧,一个人的类型必须为A
).
(hasChild only A) and (hasChild exactly 1 Thing)
This class expression denotes the class of individuals which are related by the hasChild
property only to individuals of type A
, and that are related to exactly one other individual by the hasChild
property (and by the left side, that one individual must be of type A
).
(hasChild only A) and (hasChild exactly 2 Thing)
此类表示由hasChild
属性与某些类型为A
的个体相关的个体的类别,而这些个体与由A
类型的某些个体精确相关的个体的类别c7>属性(在左侧,这两个人都必须是A
类型的人).
(hasChild only A) and (hasChild exactly 2 Thing)
This class expression denotes the class of individuals which are related by the hasChild
property to some individual of type A
, and that are related to exactly two individuals by the hasChild
property (and by the left side, both of these individuals must that individual of type A
).
如果A
和B
不相交,则类表达式A and B
表示空类,因为A
和B
都不能同时存在.这意味着其中四个案例无法令人满意.
If A
and B
are disjoint, then the class expression A and B
denotes the empty class, since nothing can be both an A
and a B
. That means that that four of the cases are unsatisfiable.
涉及hasChild some (A and B)
的案例是无法令人满意的,因为没有A and B
与任何相关的内容.有两种情况:
The cases that involve hasChild some (A and B)
are unsatisfiable, because there are no A and B
s for anything to be related to. There are two such cases:
(hasChild some (A and B)) and (hasChild exactly 1 Thing)
(hasChild some (A and B)) and (hasChild exactly 2 Thing)
only (A and B)
和exactly n
的组合是不令人满意的,因为(只要n
不为0),它表示一个人必须与n
事物完全相关,并且每个n
事物必须为A and B
(不能有任何事物.这种情况有两种:
The combination of only (A and B)
and exactly n
is unsatisfiable, since (as long as n
is not 0), it says that an individual must be related to exactly n
things, and that each of those n
things must be an A and B
(of which there can be none. There are two such cases:
(hasChild only (A and B)) and (hasChild exactly 1 Thing)
(hasChild only (A and B)) and (hasChild exactly 2 Thing)
给定some
和only
的含义,其余情况都非常简单.尽管有四个类表达式,但只有两个不同的类.
The remaining cases are all fairly straightforward, given the meaning of some
and only
. Though there are four class expressions, there are only two distinct classes.
(hasChild only (A or B)) and (hasChild exactly 1 Thing)
(hasChild some (A or B)) and (hasChild exactly 1 Thing)
这是一类只有一个孩子的事物,必须是A
或B
.
This is the class of things that have exactly one child, which must be an A
or a B
.
(hasChild only (A or B)) and (hasChild exactly 2 Thing)
(hasChild some (A or B)) and (hasChild exactly 2 Thing)
这是一类具有恰好两个孩子的事物,每个孩子必须是A
或B
.
This is the class of things that have exactly two children, each of which must be an A
or a B
.
这篇关于OWL确切基数限制的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!