Virtuoso SPARQL端点推断规则 [英] Virtuoso SPARQL endpoints inference rules
问题描述
使用在 Virtuoso 中托管的端点时(例如 DBpedia端点),可以使用一组预定义的规则(可通过
When using an endpoint that is hosted in Virtuoso, (like DBpedia endpoint), there are a predefined set of rules that can be used (accessible through the Inference rules link on the top right).
如果需要使用这些规则之一,可以在端点的查询空间中添加以下内容:
If I need to use one of these rules I can include as the following within the query space at the endpoint:
define input:inference 'ldp'
但是,当我尝试包含一个外部推理规则集(在上一个列表中未预定义)时,它会触发错误,如下所示:
However, when I try to include an external inference rules set, which is not predefined at the previous list, it triggers an error, as the following:
define input:inference <http://purl.org/goodrelations/v1>
Virtuoso 37000 Error SP031: SPARQL compiler: 'define input:inference refers to undefined inference rule set "http://purl.org/goodrelations/v1"
问题:
是否可以包含其他词汇中的外部规则?如果可以,怎么办?
Is it possible to include external rules from other vocabularies? and if yes, how?
推荐答案
DBpedia实例(和其他任何Virtuoso实例)都包含一个预加载的推理规则列表.自然,出于各种原因(安全性,合理使用等),我们不允许临时包含来自外部来源的推理规则.
The DBpedia instance (and any other Virtuoso instance, for that matter) includes a list of preloaded inference rules. Naturally, for a variety of reasons (security, fair use, etc.), we don't allow ad-hoc inclusion of inference rules from external sources.
注意:Virtuoso中的推理规则是规则和本体之间的映射(请参见
Note: An inference rule in Virtuoso is a mapping between a Rule and an Ontology (see Using British Royal Family Data Snippets — to demonstrate SPARQL Query Language-based Reasoning & Inference). It's the Rule Name that's used in the Inference Rule pragma of the query, which then indicates the following to the SPARQL processor:
- 需要调用推理上下文
- 要调用的特定规则(同样,是映射到定义关系语义的本体的映射).
这篇关于Virtuoso SPARQL端点推断规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!