优点:使用长度路径 [英] PROTEGE: Using length path

查看:82
本文介绍了优点:使用长度路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用任意长度路径匹配在Protege SPARQL的查询"标签中?

is it possible to use Arbitrary Length Path Matching in protege SPARQL query tab?

推荐答案

您正在使用与SPARQL Query插件不同,Snap SPARQL Query插件支持查询推断的知识,但不支持属性路径.

Unlike the SPARQL Query plugin, the Snap SPARQL Query plugin supports querying over inferred knowledge, but does not support property paths.

来自 Snap-SPARQL:一种适用的Java框架 SPARQL和OWL (第4节):

From Snap-SPARQL: A Java Framework for working with SPARQL and OWL (section 4):

SPARQL 1.1包含属性路径表达式,该表达式允许 类似于正则表达式的属性路径.然而, Snap-SPARQL框架不支持这些功能.虽然这 在简单的限制下将是一个重大限制,它是 不清楚在OWL下它实际上有多少限制 包容制度.这是因为,财产动机之一 路径表达式是它们使查询能够被写入, 答案涉及某种传递性",例如{ ?x rdfs:subClassOf+ ?y }{ ?x :partOf+ ?y }.

SPARQL 1.1 contains property path expressions that allow regular-expression-like paths of properties to be matched. However, these are not supported by the Snap-SPARQL framework. While this would be a significant limitation under simple entailment, it is not clear how much of a limitation it actually is under the OWL entailment regime. This is because, one of motivations for property path expressions is that they enable queries to be written whose answers involve some kind of "transitivity" such as { ?x rdfs:subClassOf+ ?y } or { ?x :partOf+ ?y }.

在这些情况下,根据OWL限制机制,可传递性 根据语言的语义免费",例如 AB的子类,而BC的子类,则A是 也是C的子类.对于涉及选择的更复杂的情况 例如缺少属性路径表达式会带来一些不便 和诸如{ ?x rdfs:label | dce:title ?y }之类的查询将需要 如果可能的话,由用户编写.

In these cases, under the OWL entailment regime, transitivity comes "for free" according to the semantics of the language, for example if A is a subclass of B and B is a subclass of C, then A is also a subclass of C. For more complex cases that involve choices e.g. the lack of property path expressions imposes some inconvenience and queries such as { ?x rdfs:label | dce:title ?y }, will need to be written by the user, if possible.

让我们假设 i∈sub⊆sup .这两个插件都允许推断" i∈sup :

Let us suppose that i ∈ sub ⊆ sup. Both plugins allow to "infer" that i ∈ sup:

  • 使用SPARQL查询插件,您需要使用属性路径;
  • 使用Snap SPARQL查询插件,您不需要使用属性路径,实际上您不需要.

如果需要"SPARQL Query"视图作为"SPARQL Query"选项卡上的唯一视图,请选择" Window>将选定的选项卡重置为默认状态".

Choose Window > Reset selected tab to default state, if you need the "SPARQL Query" view to be the only view on the "SPARQL Query" tab.

这篇关于优点:使用长度路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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