OWL 的 EquivalentClass 与 SubClassOf

发布于 2024-10-02 20:47:44 字数 522 浏览 3 评论 0原文

等效类和子类有什么区别?在阅读 OWL Primer 时,我发现教程大量使用 SubClassOf 来声明新类,如下所示

SubClassOf(
  :Teenager
  DataSomeValuesFrom( :hasAge
    DatatypeRestriction( xsd:integer
      xsd:minExclusive "12"^^xsd:integer
      xsd:maxInclusive "19"^^xsd:integer
    )
  )
)

我可以改为这样写

EquivalentClass(
  :Teenager
  DataSomeValuesFrom( :hasAge
    DatatypeRestriction( xsd:integer
      xsd:minExclusive "12"^^xsd:integer
      xsd:maxInclusive "19"^^xsd:integer
    )
  )
)

吗?

What is the difference between EquivalentClass and SubClass of? While reading through OWL primer, i find the tutorial uses SubClassOf a lot to declare a new class, as follows

SubClassOf(
  :Teenager
  DataSomeValuesFrom( :hasAge
    DatatypeRestriction( xsd:integer
      xsd:minExclusive "12"^^xsd:integer
      xsd:maxInclusive "19"^^xsd:integer
    )
  )
)

Can I write

EquivalentClass(
  :Teenager
  DataSomeValuesFrom( :hasAge
    DatatypeRestriction( xsd:integer
      xsd:minExclusive "12"^^xsd:integer
      xsd:maxInclusive "19"^^xsd:integer
    )
  )
)

instead?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

泪是无色的血 2024-10-09 20:47:44

当声明 AB子类时,这限制 A 必须继承 的所有特征B但反之则不然。在您的示例中, A = TeenagerB = hasAge [12:19] (我自己的符号,但你明白了)。

这意味着 OWL 本体中 Teenager 的任何实例也必须具有属性 hasAge,其值在 [12:19] 范围内,但不是相反。具体来说,这并不意味着任何具有属性 hasAge 且值在 [12:19] 范围内的实例也是 Teenager< 的实例/代码>。为了清楚地说明这一点,请考虑类 Car 的一个实例(称为 c)。我们也可以这样说:

c。 hasAge 13

这表示 Car 的实例 c 已有 13 岁了。然而,通过上面定义 Teenager 的子类公理,推理者不会推断出 c 也是青少年(也许正如我们所希望的,如果青少年是,而不是汽车)。

使用等价时的区别在于,子类关系隐含双向。因此,如果我们改为包含第二个公理,将 Teenager 定义为 等价 具有属性 hasAge 且值在范围内的任何内容[12:19],那么推理机就会推断出汽车 c 也是 Teenager 的实例。

When stating that A is a subclass of B, this restricts A to necessarily inherit all characteristics of B, but not the other way around. In your example, A = Teenager, and B = hasAge [12:19] (my own notation, but you get the idea).

This means that any instance of Teenager in the OWL ontology must necessarily also have the property hasAge with a value in the range [12:19], but not the other way around. Specifically, this does not mean that any instance of something with the property hasAge with a value in the range [12:19] is also an instance of Teenager. To make this clear, consider an instance (called c) of class Car. We might also say that:

c . hasAge 13

This says that instance c of Car is 13 years old. However, with the subclass axiom defining Teenager above, a reasoner would not infer that c is also an instance of Teenager (perhaps as we'd want, if teenagers are people, not cars).

The difference when using equivalence is that the subclass relationship is implied to go in both directions. So, if we were to instead include the second axiom that defined Teenager to be equivalent to anything with the property hasAge with a value in the range [12:19], then a reasoner would infer that the car c is also an instance of Teenager.

花伊自在美 2024-10-09 20:47:44

同等类别可能具有相同的成员,例如,

:USPresident owl:equivalentClass :USCommanderInChief

都具有相同的个人(全部或部分美国总统)。因此,如果我们断言约翰·亚当斯是美国三军总司令,则可以推断约翰·亚当斯也是美国总统。

对于子类,我们表示层次结构。例如,GrannySmithApple 是 Apple 的一种。

Equivalent classes might have the same members, e.g.,

:USPresident owl:equivalentClass :USCommanderInChief

will both have the same individuals (all or some of the US presidents). So if we assert that John Adams was a USCommanderInChief it can be inferred that John Adams was also a US President.

With subclass, we're indicating a hierarchy. e.g., GrannySmithApple is a type of Apple.

云归处 2024-10-09 20:47:44
:USPresident owl:equivalentClass :USCommanderInChief .

是一样的

:USPresident rdfs:subClassOf :USCommanderInChief ;
:USCommanderInChief rdfs:subClassOf :USPresident .
:USPresident owl:equivalentClass :USCommanderInChief .

is the same as

:USPresident rdfs:subClassOf :USCommanderInChief ;
:USCommanderInChief rdfs:subClassOf :USPresident .
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文