简体   繁体   English

OWL对称或反向对象的三元组如何填充?

[英]How the Triples for OWL Symmetric or Inverse object property is populated?

Whether the Graph DB dataload engine creates additional Triples for the inserted Triples which have OWL Symmetric or Inverse object property in the RDFS model? Graph DB数据加载引擎是否为RDFS模型中具有OWL对称或反向对象属性的插入三元组创建其他三元组?

Let's assume the model and individuals given below, 让我们假设下面给出的模型和个体,

RDFS model: RDFS模型:

I have the classes Male and Female, and an object property “hasMarried” with domain as Male and Range as Female. 我有Male和Female类,以及一个对象属性“ hasMarried”,其域为Male,Range为Female。 The characteristic of “hasMarried” is set as “Symmetric”. “ hasMarried”的特征设置为“ Symmetric”。

Triples: 三元组:

:Male1 rdf:type :Male :男性1 rdf:类型:男性

:Female1 rdf:type :Female :女性1 rdf:类型:女性

:Male1 :hasMarried :Female1 :男1:已婚:女1

Question here is while Inserting the above Triples in Ontotext, would it generate additional triple as follows based on the Model definition for the “Symmetric” object property, 这里的问题是,在将上述三元组插入到Tototext中时,是否会根据“对称”对象属性的模型定义,按以下方式生成其他三元组,

:Female1 :hasMarried :Male1 :女1:已婚:男1

If the above is not happening, would SPARQL query answer for the following query by inferencing the “Symmetric” object property in the referenced RDFS model? 如果上述情况没有发生,SPARQL查询是否可以通过推断引用的RDFS模型中的“对称”对象属性来回答以下查询?

Select ?s ?o 选择?s?o

WHERE { :Female1 :hasMarried ?o } 在{{Female1:has已婚?o}

Expected answer: 预期答案:
:Female1 :Male1 :女1:男1

Yes this is what you are going to get. 是的,这就是您要得到的。 Note that you will need the owl horst optimized ruleset when creating the repository(the rdfs ruleset will not be enough). 请注意,在创建存储库时,您将需要owl horst优化的规则集(rdfs规则集还不够)。

To the first question: Yes, :Female1 :hasMarried :Male1 would follow. 对于第一个问题:是, :Female1 :hasMarried :Male1将紧随:Female1 :hasMarried :Male1

To the second question: The WHERE clause of your SPARQL query does not contain ?s . 第二个问题:SPARQL查询的WHERE子句不包含?s For the SPARQL Query Select ?s ?o WHERE { ?s :hasMarried ?o } with enabled reasoning you should get two answers (:Female1, :Male1) and (:Male1, :Female1) 对于启用了推理功能的SPARQL查询Select ?s ?o WHERE { ?s :hasMarried ?o } ,您应该得到两个答案(:Female1,:Male1)和(:Male1,:Female1)

Two remarks: 两句话:

  1. RDFS does not support "symmetric properties", you'll need OWL for example. RDFS不支持“对称属性”,例如,您需要OWL。
  2. Defining domain and range as you did will also entail the following two triples: :Male1 rdf:type :Female . :Female1 rdf:type :Male 像您那样定义域和范围还需要以下两个三元组:Male1 rdf:type :Female . :Female1 rdf:type :Male :Male1 rdf:type :Female . :Female1 rdf:type :Male

In general it doesn't make much sense to define two different (and possibly disjoint!) properties as domain and range of a symmetric property. 通常,将两个不同的(并且可能不相交!)属性定义为对称属性的域和范围没有多大意义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM