Virtuoso SPARQL endpoints inference rules

白昼怎懂夜的黑 提交于 2019-12-11 01:35:47

问题


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"

QUESTION:

Is it possible to include external rules from other vocabularies? and if yes, how?


回答1:


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.

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:

  1. Need to invoke inference context
  2. Specific Rules (again, mappings to an Ontology where relation semantics are defined) to be invoked.


来源:https://stackoverflow.com/questions/36430656/virtuoso-sparql-endpoints-inference-rules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!