Gershon, If your goal is to infer new facts, you should look into SPIN rules. Both SPIN rules and constraints are SPARQL based. The difference is that rules add new inferred triples, while constraints only check for conformance to the model and raise constraint violation errors/warning.
I have not seen examples of owl:complementOf in action. I don¹t think it is used much, probably for the reasons explained in my e-mail. I believe it would better suit a constraint checking use case then the inferencing use case. For example, you could say that class A is a complement of class B. Then, if there are triples {:X a :A. :X a :B.}, you would get a constraint violation. Of course, the same violation will be raised if you said that :A was disjoint with :B. If you are not specifically interested in using owl:complementOf and simply want an example of how one could infer that a drink that doesn¹t have caffeine or alcohol, then in SPIN you would attach to :Drink class a rule that uses SPARQL to looks for all drinks without caffeine and without alcohol and infer {?this a :HealthyDrink} triple. If you are looking for a more general rule that would work not just with drinks but other models you create and you want to use owl:ComplementOf to document the relationships between classes, then a rule would probably be attached to some high level class (may be owl:Thing) and it would look for all resources that are members of a class which subclasses are in the complementOf relationship. Then, if there is no triple indicating membership in one of those classes, infer that they are members of the other. Regards, Irene Polikoff From: Gershon Pollatschek <gersh...@gmail.com> Reply-To: <topbraid-users@googlegroups.com> Date: Tuesday, May 19, 2015 at 8:51 AM To: <topbraid-users@googlegroups.com> Subject: Re: [topbraid-users] Newbie question Hi Irene, all, I will definitively need to look at SPIN constraints. I do have a question regarding ComplementOf. I cannot find any working example of this in action and would really like to use this functionality. Thanks again for your assistance. Gershon Am Mittwoch, 13. Mai 2015 18:14:51 UTC+2 schrieb Irene Polikoff: > Gershon, > > You defined drink as a parent class for alcoholic and caffein classes. This > means that every member of these classes is also a member of the drink class. > You then said that healthy is an equivalent class to drink which means that > every member of the drink class is a member of the healthy class (and vice > versa). With this, beer, as a member of the alcoholic class, is a member of > the drink class and a member of the healthy class. > > You then said that healthy is disjoint with alcoholic and caffein. Since it > contradicts definitions described above, for the model to stay consistent, it > can only mean that alcoholic and caffein must have no members they can only > be empty sets. > > You also defined unhealthy as an intersection, so only those drinks that are > both alcoholic and have caffein would be inferred as unhealthy and you don¹t > have any of those. > > You could say that unhealthy is a union of alcoholic and caffein and drink is > a union of healthy and unhealthy. And healthy is a complement of unhealthy. > This would mean that any drink that is known to be a member of the healthy > class, can't be a member of the unhealthy class (and vice versa). > > But the open world assumption used in OWL will not allow you to infer that a > drink that is not explicitly specified to be a member of the unhealthy class, > must be a member of the healthy class. This is because in the open world, the > fact that we only know about {:milk a :drink} triple and do not have {:milk a > :unhealthy} triple doesn¹t mean that such triple may not be discovered in the > future. In other words, open world doesn¹t support negation as failure. As a > result, cardinalities, complements and a few other things are not as useful in > OWL as one may expect. > > I would recommend looking into SPIN > (http://www.topquadrant.com/technology/sparql-rules-spin/ and > http://spinrdf.org/spinstack.html) where inferences can use closed world > assumptions. > > Hope this helps, > > Irene Polikoff > > From: Gershon Pollatschek <gers...@gmail.com <javascript:> > > Reply-To: <topbrai...@googlegroups.com <javascript:> > > Date: Wednesday, May 13, 2015 at 7:41 AM > To: <topbrai...@googlegroups.com <javascript:> > > Subject: [topbraid-users] Newbie question > > Hello all, > > I am trying to create a sub-class, which includes all instances that are NOT > included in a sibling class. I tried ComplementOf and using "no NameOfSibling > and no NameOfSibling". Both did not perform as expected. In the example > attached, healty drinks are to be defined as drinks which have no caffeine or > alcohol. > > I checked all the messages in this group but could not find a solution. > > Could you please point me in the right direction? I am standing on the hosa, > as they say in german...:-) > > Thank you for your help. > Gershon > > -- > You received this message because you are subscribed to the Google Group > "TopBraid Suite Users", the topics of which include Enterprise Vocabulary > Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, > TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. > To post to this group, send email to topbrai...@googlegroups.com <javascript:> > --- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to topbraid-user...@googlegroups.com <javascript:> . > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to topbraid-users@googlegroups.com --- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to topbraid-users@googlegroups.com --- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.