在本体中使用域和范围的替代方法是什么?

What is the alternative to using domains and ranges within ontologies?

我正在使用 Protégé 5 构建本体。在谷歌上搜索域和范围的主题后,我发现域和范围不一定是关联两件事的正确方法。

[protege-owl] Specifying domain and range in object properties:

The important thing to remember is that OWL restrictions enable
inference. So what that means is that if you supply domain and range information for object properties, then those classes can be inferred based on the use of the property. In particular, domain and ranges
are NOT type checks in the sense of traditional programming
languages. They can only (sometimes) act that way if you have enough disjointness information to be able to create a logical inconsistency.

So, for example, let's assume that we have the following ontology

Class: Person
Class: Vehicle
Class: Engine
Property: hasEngine :domain Vehicle :range Engine

John isa Person
John hasEngine engine-1

At this point, inference will occur and conclude that John isa
Vehicle. This is not a type violation because the domain and range
information are used for inference. (If Person and Vehicle were
declared to be disjoint classes, then an inconsistent ontology would
result, which is closer to a classical type-checking result, but it
only applies if the classes really are disjoint).

那么,如果域和范围不好,那么我应该使用什么来模拟 类 事物之间的关系?

编辑: 我最初声明新版本中没有域/范围字段。发布此消息后,我几乎立即意识到这些字段实际上仍然可用。

您仍然可以在 Protege 5 中声明对象属性的域和范围。这是带有对象的 Protege 5 beta 的屏幕截图 属性 hasParent 它有一个域名 Human:

您也可以在 Web Protege 中执行相同的操作:

就是说,如果由于某种原因你不能使用 rdfs:domainrdfs:range 公理,你 can 使用限制和子类公理得到相同的效果。公理:

p rdfs:range R
p rdfs:domain D

相当于

⊤ ⊑ ∀p.R
⊤ ⊑ ∀p-1.D

或曼彻斯特语法

owl:Thing subClassOf p only R
owl:Thing subClassOf (inverse p) only D

我认为列表中的消息只是指出了用户在使用类型化编程语言 OWL 时遇到的常见陷阱之一;他们预计 "car72 hasSocialSecurityNumber xxx" 会不一致,因为 hasSocialNumber 的域是 Person 而 car72 的类型是 Car 。相反,car72 将被推断为具有 Car 和 Person 类型,这并不不一致,除非有其他公理使其不一致。