简体   繁体   中英

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 B is a Sensitive 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 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 .

Is it possible to write an OWL ontology that would achieve such inference triple?

Extra info:

  • As a reasoning engine I'm using Apache Jena with all its defaults
  • For convenience reasons I would like to obtain such result from inference rather than a SPARQL query

If you a pair of individuals :NodeA and :NodeB in your knowledge base, then you can infer:

: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. 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. In fact, the way OWL semantics is defined, there is always a relation between any 2 entities. 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.

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.

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:

[]  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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