1

I have an ontology with different type of events. Therefore I have three classes: A, B, C and a helper class Temp.

I want the reasoner to create a new individual as a subclass of C for every pair of individuals a (rdf:typeOf A) and b (rdf:typeOf B) found. This new Individuals should contain informations about a and b.

In the past I used a jena reasoner with an own rule file to get this result, but now I want to switch over to a standard OWL DL reasoner.

My initial idea is to link a und b such as:

a onto:hasB b

And ad give a the Type Temp with the following restriction for Temp:

hasbB some B

Now I want to create a new individual of type C with a restriction for Temp:

hasC some C

And over this new indivual I can access the informations of a and b.

My Problems are:

  1. How can I get the reasoner to connect a and b?
  2. I don't think the creation of C will work, since its a restriction for Temp, which will never be assigned as a type because of this restriction.

Or am I completly wrong with my approach?

Edit:

To clarify my goal with a better exmple:

I have an ontology with different type of events.

My goal is to connect certain individuals (events) which belong together by forming a new individual (event) describing this relation with the help of a reasoner.

E.g.:

  1. I read an event (individual) which describes an "Alarm" (type) into the ontology.
  2. I read an event (individual) which discribes a "PowerOutage" (type) into the ontology.

These Individuals aren't related at all at this moment. Now I want a reasoner to create a new event (individual) with the type "PowerManipulation". In fact I want an individual with the type "PowerManipulation" created for every pair (which isn't connected, yet) of individuals with the type "PowerOutage" and "Alarm" found. These new individuals should have references (properties) to the individual which caused their creation (an "Alarm" and a "PowerOutage").

Ontology before the reasoning:

(alarm1 rdf:type "Alarm")
(out1 rdf:type "PowerOutage")

What I want the ontology to look like after the reasoning

(alarm1 rdf:type "Alarm")
(out1 rdf:type "PowerOutage")
(man1 rdf:type "PowerManipulation")
(man1 ont:hasRealtadInd alarm1)
(man1 ont:hasRealtedInd out1)

Priviously I used Jena rules and the Jena reasoner to accomplish this task. But I want to switch over to a standard OWL DL reasoner.

Is it possible to accomplish this task with basic restrictions? Or do I need SWRL rules, or SPIN (see Williams answer below)?

ImmaCute
  • 57
  • 7
  • I'm not exactly clear what you're asking. You have classes A and B, and individuals a of type A and b of type B. a and b are related by hasB, i.e., "a hasB b". Now, that means that a is an instance of the class "hasB some B" (and a reasoner can confirm that). Now what do you want to do? Say that there's an instance c of type C that has some properties? What properties should it have? – Joshua Taylor Mar 30 '15 at 15:31
  • I added some information at the end of my post with a better example. I have unconnected individuals in my ontology. I want to create new individuals based on their existence with the help of a reasoner. This new individuals are meant to indicacate realtionships between the unconnected individuals and have a reference to them (property). My previous example was only my strategy to get to that goal. I hope my problem gets clear with the example ontology regarding events. – ImmaCute Mar 31 '15 at 15:26
  • **I want an individual .. created for every pair (which isn't connected, yet) of individuals.** That part about "not connected *yet*" may be very difficult. Reasoning tasks should not really depend on which inferences are drawn first. If you have Alarm1 and Alarm2 and PowerOutage1 and PowerOutage2, how many PowerManipulations do you want? 2 or 4? – Joshua Taylor Mar 31 '15 at 15:44
  • This is the part were I struggled in the past, too. Ideally I want to get two. I managed to get this result with "noValue" constructs and helper properties in Jena. But with every new individual added to the ontology there was the possibility to break up allready inferred relationships and create newly mixed "relationship pairs" (http://stackoverflow.com/questions/28745833/jena-continuous-reasoning-and-endurance-of-outcomes for reference). Would u suggest to move the creation of relations to the program logic? – ImmaCute Mar 31 '15 at 16:35
  • 1
    Well, the pairing process is arbitrary, so there's probably no way to specify it in a nice logical fashion. The results could be different each time, which is something we typically **don't** want from a deductive reasoner. It seems like it really would be picking pairs from a proverbial hat, so it probably does make more sense to have it be part of the program. – Joshua Taylor Mar 31 '15 at 16:43

1 Answers1

0

You can do this with SPIN constructors quite easily and SPIN inserts.

http://www.w3.org/Submission/2011/SUBM-spin-modeling-20110222/#spin-rules-construct

http://www.w3.org/Submission/2011/SUBM-spin-modeling-20110222/#spin-rules-update

SPIN and OWL can live happily together. Take a look at the groovy library that has extensions for both:

https://github.com/williamgreenly/lescot

Example below:

def model = new GroovyRdfModel()
model.add(""" some turtle data """)
model.add(""" some OWL rules """)
model.add(""" some SPIN rules """)
def inferredModelByOWLReasoning = model.owl()
def inferredModelBySPINRules = model.spin()
William Greenly
  • 3,914
  • 20
  • 18
  • Could you provide an actual example that would address the OP's issue? It's not really clear to me at the moment what OP is actually trying to infer. Without knowing that (and whether it requires any machinery beyond an OWL reasoner), it's hard to see whether this answer helps or not. Some code (even pseudo code) showing how this solves OP's problem would clarify. – Joshua Taylor Mar 30 '15 at 19:42
  • I want to create a new individual based on the existence of certain individuals. Lets say I have read in a mother and a father seperatly. Now, I want to get a child with links to their parents. My first step would be to create a link between the parents (property : hasChildWith). I don't really now if thats even possible with restrictions and a reasoner. I'll definitely will take a look into SPIN, tomorrow – ImmaCute Mar 30 '15 at 20:32