OWL属性限制与SHACL [英] OWL Property Restrictions vs. SHACL

查看:504
本文介绍了OWL属性限制与SHACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OWL属性限制 SHACL ,有没有理由再选择OWL方法?

Given a choice between OWL Property Restrictions and SHACL, is there any reason to choose the OWL approach any more?

特别是在基数约束方面,我想知道SHACL是否被认为可以取代OWL.语法看起来与我不经意间类似.

Particularly with respect to cardinality constraints, I'm wondering whether SHACL is considered to supercede OWL. The syntax appears similar, to my casual inspection.

我可能错过了OWL基数约束的目的.作为本体的一部分,它们应促进推理(与验证无关).但是基数约束如何促进推理呢?

I am probably missing the purpose of OWL cardinality constraints. As part of an ontology, they should facilitate inferencing (a separate concern from validation). But how do cardinality constraints facilitate inferencing?

推荐答案

OWL和SHACL之间的区别如下表所示.

The differences between OWL and SHACL are presented in the table below.

|               OWL                  |              SHACL                |
|------------------------------------|-----------------------------------|
| Based on open world assumption     | Based on closed world assumption  |
|------------------------------------|-----------------------------------|
| Designed for inferencing           | Designed for validation           |
|------------------------------------|-----------------------------------|
| Computationally cheap              | ?                                 |
| (typical problems are decidable)   | ?                                 |
|------------------------------------|-----------------------------------|
| A lot of inferences                | One have to define a lot          |
| almost "out of the box"            | of ad-hoc constraints manually    |
|------------------------------------|-----------------------------------|
| Is useful as documentation for RDF |                                   |

关于OWL中的基数约束,这些约束允许在某些情况下在某些方面关闭世界,以便获得更多的推论.

As to cardinality constraints in OWL, these constraints allow to close the world in some respects in some cases, in order to get additional inferences.

基数约束的逻辑在OWL和SHACL中是相反的.非正式地:

The logic of cardinality constraints is opposite in OWL and in SHACL. Informally:

  • 在SHACL中,

  • In SHACL,

ex:PersonShape a sh:NodeShape ; sh:targetClass ex:Person ; sh:path ex:parent ; sh:minCount 1 .

ex:PersonShape a sh:NodeShape ; sh:targetClass ex:Person ; sh:path ex:parent ; sh:minCount 1 .

意味着如果某人是一个人,那么他/她必须至少有一个父母.

means that if somebody is a person, then he/she has to have at least one parent.

在OWL中,

ex:Person owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty ex:parent ; owl:minCardinality "1" ] .

ex:Person owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty ex:parent ; owl:minCardinality "1" ] .

意味着如果某人至少有一个父母,那么他/她就是一个人.

means that if somebody has at least one parent, then he/she is a person.

来自 TopBraid营销材料:

SHACL与RDF Schema和OWL有何不同? RDFS和OWL是为开放世界"设计的,其中可以从语义Web上的许多地方收集数据.多年来,这个设计目标引起了很多挫败感,因为它甚至无法检查最明显的完整性约束,例如属性是否具有一定数量的值.相比之下,SHACL则假设「封闭世界」符合典型企业使用者的期望.此外,OWL已针对某些类型的分类问题进行了优化,但不能用于执行数据验证所需的例行操作,例如数学计算或文本操作. SHACL更具表现力.此外,它与SPARQL无缝集成以表达几乎任意条件.顺便说一句,用SHACL语句增量扩展RDFS或OWL模型是很好的,同时支持两个领域.

How is SHACL different from RDF Schema and OWL? RDFS and OWL were designed for an "Open World" in which data may be assembled from many places on the Semantic Web. This design goal has caused a lot of frustration over the years, because it made it impossible to check even the most obvious integrity constraints, such as whether a property has a certain number of values. In contrast, SHACL assumes a "Closed World", aligning with the expectations of typical business users. Furthermore, OWL has been optimized for a certain type of classification problems, yet it could not be used to do routine operations necessary for data validation such as mathematical computations or text operations. SHACL is much more expressive. Further it seamlessly integrates with SPARQL to express almost arbitrary conditions. BTW it is perfectly fine to incrementally extend an RDFS or OWL model with SHACL statements, supporting both worlds.

另请参见: http://spinrdf.org/shacl-and-owl.html

这篇关于OWL属性限制与SHACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆