简体   繁体   English

使用 OWL 本体通过推理进行类传播

[英]Class propagation via inference using OWL ontology

I'm trying to write an ontology that will propagate certain classes between connected nodes.我正在尝试编写一个本体,它将在连接的节点之间传播某些类。 Such connection can be done by any property.这种连接可以由任何属性完成。 The propagation should be in the direction of the domains of such properties.传播应该在这些属性的域的方向上。

For example:例如:

Node A -(any property)-> Node B
Node B -(rdfs:type)-> Sensitive Element

Here we can see two nodes Node A and Node B connected by some property any property .在这里我们可以看到两个节点Node ANode B通过一些属性any property连接。 Node B is a Sensitive Element . Node BSensitive Element By being connected to Node B which is a sensitive element, I would like to infer that Node A is a sensitive as well:通过连接到敏感元素Node B ,我想推断Node A也是敏感元素:

Node A -(rdfs:type)-> Sensitive Element

That triple is the one I am trying to infer.这个三元组是我试图推断的那个三元组。 You can see that I have propagated the Sensitive Element class in the direction of the domain of any property .你可以看到我已经在any property的域的方向上传播了Sensitive Element类。

Is it possible to write an OWL ontology that would achieve such inference triple?是否有可能编写一个可以实现这种推理三重的 OWL 本体?

Extra info:额外信息:

  • As a reasoning engine I'm using Apache Jena with all its defaults作为推理引擎,我使用 Apache Jena 及其所有默认值
  • For convenience reasons I would like to obtain such result from inference rather than a SPARQL query为方便起见,我想从推理而不是 SPARQL 查询中获得这样的结果

If you a pair of individuals :NodeA and :NodeB in your knowledge base, then you can infer:如果您的知识库中有一对个体:NodeA:NodeB ,那么您可以推断:

:NodeA  owl:topObjectProperty  :NodeB .

Assuming your rule holds, and there exists a sensitive element, then every thing is a sensitive element.假设你的规则成立,并且存在敏感元素,那么每件事都是敏感元素。 This is probably not what you want.这可能不是您想要的。

An OWL ontology tells you something about the universe it describes, but it does not define the universe. OWL 本体告诉您有关它所描述的宇宙的一些信息,但它没有定义宇宙。 This means that if you do not describe a relation between A and B, it does not mean that there is no relation between them.这意味着,如果您不描述 A 和 B 之间的关系,并不意味着它们之间没有关系。 In fact, the way OWL semantics is defined, there is always a relation between any 2 entities.事实上,根据 OWL 语义的定义方式,任何 2 个实体之间总是存在关系。 Even if owl:topObjectProperty did not exist in OWL (which is the case in OWL 1), there would be existing, possibly unnamed, relations between A and B.即使owl:topObjectProperty在 OWL 中不存在(在 OWL 1 中就是这种情况),A 和 B 之间也可能存在未命名的关系。

What you most likely want is to express rules that only make use of named properties.您最可能想要的是表达仅使用命名属性的规则。 For this, you can use SPARQL construct, or a rule language on top of RDFS, for example.例如,为此,您可以使用 SPARQL 构造或基于 RDFS 的规则语言。

Another option could be to define one axiom per named property.另一种选择是为每个命名属性定义一个公理。 These axioms could easily be added programmatically.这些公理可以很容易地以编程方式添加。 Precisely, for every named property ppp , add:准确地说,对于每个命名属性ppp ,添加:

[]  a  owl:Restriction;
   owl:onProperty  ppp
   owl:someValuesFrom  :SensitiveElement;
   rdfs:subClassOf  :SensitiveElement .

This has the advantage that you can tune which property makes a thing sensitive or not.这样做的好处是您可以调整哪个属性使事物敏感或不敏感。

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

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