Re: [Owlim-discussion] Owlim-lite Inference
Hi Stefano, OWLIM uses a rule-based inferencer. The rule of interest to you from the owl-horst rule-set is: Id: owl_EquivClassBySubClass xy [Constraint y != x] yx [Cut] --- xy So a query such as: SELECT * { ?x owl:disjointWith :MyClass } should return all classes disjoint with :MyClass, including those that are equivalent with the disjoint classes (either becase they have been declared that way or because they mutually subclass each other). However, there is no means available for inferring disjointness, so this will only report what has been explicitly asserted as disjoint to :MyClass. With the owl2-rl rule-set, there is a way to infer disjointness, but only with the declaration of a set of mutually disjoint classes using OWL2-RL. The relevant rules are: Id: owl_allDisjClasses1 x x m --- xm [Context ] Id: owl_allDisjClasses2 xm [Context ] m n [Constraint n != ] - xn [Context ] Id: owl_allDisjClasses3 xm [Context ] xn [Context ] mi nj[Constraint j != i] --- ij What these 3 rules do is to infer disjointness between all pairs of classes from a set of AllDisjointClasses. So if you had a set of disjoint classes (person, dog, metro) and person equivalent-to human, then the sparql query for finding classes disjoint with dog should return metro, person and human. I hope this helps, barry Barry Bishop OWLIM Product Manager Ontotext AD Tel: +43 650 2000 237 email: barry.bis...@ontotext.com skype: bazbishop www.ontotext.com On 25/09/12 19:28, Stefano Ortona wrote: Hello Marek, I'm retrieving this discussion cause i have a similar issue. I'd like to query my sparql endpoint in order to find all disjoint classes for a given class. In particular i have A equivalent B and B disjointWith C, when i query for all the disjoint class of A i'd like also C to be returned. Is there a way to do that? Thank you, Best, Stefano On 06/lug/2012, at 16.28, Marek Šurek wrote: Hi Stefano, its certainly possible and this kind of work relies on TRREE reasoner. There is no default ruleset as long as I know(but in openrdf-workbench the choosen ruleset in selectbox is during creating new repository "Empty" which is not good for you ). I don't know how you've created your repository. Did you use openrdf-workbench or did you create it manually throught openrdf-console? My guess is that you use openrdf-workbench. In that case you should create repository in this way : 1. Deploy openrdf-sesame.war and openrdf-workbench.war (e.g. copy these two files into .../tomcat/webapps/ directory). 2. Run Tomcat 3. Open web browser and go to : http://localhost:8080/openrdf-workbench 4. Go to Create New Repository 5. Choose Owlim DB and write database name 6. Click Next and then you will see Ruleset option with many rules to choose. As Damian said, in your case you should not choose Empty or RDFS ruleset... Let's try OWL2-QL, which definitely contain equivalentClass rule 7. Then you try to do the same thing with this newly created repository and you should recieve results that you expect Best regards, Marek ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Owlim-lite Inference
Hello Marek, I'm retrieving this discussion cause i have a similar issue. I'd like to query my sparql endpoint in order to find all disjoint classes for a given class. In particular i have A equivalent B and B disjointWith C, when i query for all the disjoint class of A i'd like also C to be returned. Is there a way to do that? Thank you, Best, Stefano On 06/lug/2012, at 16.28, Marek Šurek wrote: > Hi Stefano, > its certainly possible and this kind of work relies on TRREE reasoner. > There is no default ruleset as long as I know(but in openrdf-workbench the > choosen ruleset in selectbox is during creating new repository "Empty" which > is not good for you ). I don't know how you've created your repository. Did > you use openrdf-workbench or did you create it manually throught > openrdf-console? My guess is that you use openrdf-workbench. In that case you > should create repository in this way : > 1. Deploy openrdf-sesame.war and openrdf-workbench.war (e.g. copy these two > files into .../tomcat/webapps/ directory). > 2. Run Tomcat > 3. Open web browser and go to : http://localhost:8080/openrdf-workbench > 4. Go to Create New Repository > 5. Choose Owlim DB and write database name > 6. Click Next and then you will see Ruleset option with many rules to choose. > As Damian said, in your case you should not choose Empty or RDFS ruleset... > Let's try OWL2-QL, which definitely contain equivalentClass rule > 7. Then you try to do the same thing with this newly created repository and > you should recieve results that you expect > > Best regards, > Marek > > > ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Owlim-lite Inference
Hi Barry, Marek, Thanks both of you for the answer, using the rule-set OWL2-QL everything worked as expected, so thanks for the answer. Best, Stefano On 09/lug/2012, at 07.39, Barry Bishop wrote: > Hi Stefano, Marek, > > The reasoner in OWLIM-Lite is 'built-in' and will be used whenever the > rule-set configuration parameter is set to anything apart from 'empty', see: > > http://owlim.ontotext.com/display/OWLIMv51/OWLIM-Lite+Configuration#OWLIM-LiteConfiguration-ConfigurationParameters > > When instantiating OWLIM-Lite using the Sesame API, if not specified then the > rule-set defaults to 'OWL-Horst'. When using the Sesame workbench, the > default value in the drop-down list is 'OWL-Horst-optimized'. > > When OWL-Horst (or OWL-Horst-optimized) is selected then the following rule > will derive the equivalence of classes only if they are already sub-classes > of each other: > > Id: owl_EquivClassBySubClass > xy [Constraint y != x] > yx [Cut] > --- > xy > > There is nothing that works the other way round, i.e. if you specify that C1 > and C2 are equivalent then C2 equivalent C1 is not derived using this rule > set. > > OWL2-RL and OWL2-QL (or their optimized versions) do have this feature by way > of the following two rules present in both rule-sets: > > Id: scm_eqc1 > c1 c2[Constraint c1 != c2 ] > --- > c1 c2 > c2 c1 > > Id: scm_eqc2 > c1 c2[Constraint c1 != c2 ] > c2 c1 > --- > c1 c2 > > > So if you declare C1 equivalent to C2 then the inferencer will determine that > C2 is equivalent to C1 (and that they are subclasses of each other). Also, if > you declare that C1 and C2 are subclasses of each other then the inferencer > will determine that they are equivalent. > > I hope this helps, > barry > > Barry Bishop > OWLIM Product Manager > Ontotext AD > Tel: +43 650 2000 237 > email: barry.bis...@ontotext.com > skype: bazbishop > www.ontotext.com > On 06/07/12 17:28, Marek Šurek wrote: >> Hi Stefano, >> its certainly possible and this kind of work relies on TRREE reasoner. >> There is no default ruleset as long as I know(but in openrdf-workbench the >> choosen ruleset in selectbox is during creating new repository "Empty" which >> is not good for you ). I don't know how you've created your repository. Did >> you use openrdf-workbench or did you create it manually throught >> openrdf-console? My guess is that you use openrdf-workbench. In that case >> you should create repository in this way : >> 1. Deploy openrdf-sesame.war and openrdf-workbench.war (e.g. copy these two >> files into .../tomcat/webapps/ directory). >> 2. Run Tomcat >> 3. Open web browser and go to : http://localhost:8080/openrdf-workbench >> 4. Go to Create New Repository >> 5. Choose Owlim DB and write database name >> 6. Click Next and then you will see Ruleset option with many rules to >> choose. As Damian said, in your case you should not choose Empty or RDFS >> ruleset... Let's try OWL2-QL, which definitely contain equivalentClass rule >> 7. Then you try to do the same thing with this newly created repository and >> you should recieve results that you expect >> >> Best regards, >> Marek >> >> From: Stefano Ortona >> To: damyan >> Cc: owlim-discussion@ontotext.com >> Sent: Friday, 6 July 2012, 16:27 >> Subject: Re: [Owlim-discussion] Owlim-lite Inference >> >> Hello, >> >> sorry I'm new and I'm not very familiar with this concept. >> I didn't set any ruleset, so I'm using the default one. >> >> I have the axiom A owl:equivalentClass B and i want to avoid to write B >> owl:equivalentClass A, but when I query for the equivalent class of B i want >> also A to be returned, so I need a kind of reasoner. >> Is that possible and how? >> >> Thank you, >> >> Stefano >> >> >> On 06/lug/2012, at 15.09, damyan wrote: >> >> > Hi Steafno, >> > >> > which ruleset you are using because 'rdfs' or 'empty' do not have the >> > necessary rules/axioms to derive such conclusions? >> > >> > If it is other, then you should relate both of your classes with >> > owl:equivalentClass property or alternatively, make them mutually >> > rdfs:subClassOf to each other... >> > &
Re: [Owlim-discussion] Owlim-lite Inference
Hi Stefano, Marek, The reasoner in OWLIM-Lite is 'built-in' and will be used whenever the rule-set configuration parameter is set to anything apart from 'empty', see: http://owlim.ontotext.com/display/OWLIMv51/OWLIM-Lite+Configuration#OWLIM-LiteConfiguration-ConfigurationParameters When instantiating OWLIM-Lite using the Sesame API, if not specified then the rule-set defaults to 'OWL-Horst'. When using the Sesame workbench, the default value in the drop-down list is 'OWL-Horst-optimized'. When OWL-Horst (or OWL-Horst-optimized) is selected then the following rule will derive the equivalence of classes only if they are already sub-classes of each other: Id: owl_EquivClassBySubClass xy [Constraint y != x] yx [Cut] --- xy There is nothing that works the other way round, i.e. if you specify that C1 and C2 are equivalent then C2 equivalent C1 is not derived using this rule set. OWL2-RL and OWL2-QL (or their optimized versions) do have this feature by way of the following two rules present in both rule-sets: Id: scm_eqc1 c1 c2[Constraint c1 != c2 ] --- c1 c2 c2 c1 Id: scm_eqc2 c1 c2[Constraint c1 != c2 ] c2 c1 --- c1 c2 So if you declare C1 equivalent to C2 then the inferencer will determine that C2 is equivalent to C1 (and that they are subclasses of each other). Also, if you declare that C1 and C2 are subclasses of each other then the inferencer will determine that they are equivalent. I hope this helps, barry Barry Bishop OWLIM Product Manager Ontotext AD Tel: +43 650 2000 237 email: barry.bis...@ontotext.com skype: bazbishop www.ontotext.com On 06/07/12 17:28, Marek Šurek wrote: Hi Stefano, its certainly possible and this kind of work relies on TRREE reasoner. There is no default ruleset as long as I know(but in openrdf-workbench the choosen ruleset in selectbox is during creating new repository "Empty" which is not good for you ). I don't know how you've created your repository. Did you use openrdf-workbench or did you create it manually throught openrdf-console? My guess is that you use openrdf-workbench. In that case you should create repository in this way : 1. Deploy openrdf-sesame.war and openrdf-workbench.war (e.g. copy these two files into .../tomcat/webapps/ directory). 2. Run Tomcat 3. Open web browser and go to : http://localhost:8080/openrdf-workbench 4. Go to Create New Repository 5. Choose Owlim DB and write database name 6. Click Next and then you will see Ruleset option with many rules to choose. As Damian said, in your case you should not choose Empty or RDFS ruleset... Let's try OWL2-QL, which definitely contain equivalentClass rule 7. Then you try to do the same thing with this newly created repository and you should recieve results that you expect Best regards, Marek *From:* Stefano Ortona *To:* damyan *Cc:* owlim-discussion@ontotext.com *Sent:* Friday, 6 July 2012, 16:27 *Subject:* Re: [Owlim-discussion] Owlim-lite Inference Hello, sorry I'm new and I'm not very familiar with this concept. I didn't set any ruleset, so I'm using the default one. I have the axiom A owl:equivalentClass B and i want to avoid to write B owl:equivalentClass A, but when I query for the equivalent class of B i want also A to be returned, so I need a kind of reasoner. Is that possible and how? Thank you, Stefano On 06/lug/2012, at 15.09, damyan wrote: > Hi Steafno, > > which ruleset you are using because 'rdfs' or 'empty' do not have the necessary rules/axioms to derive such conclusions? > > If it is other, then you should relate both of your classes with owl:equivalentClass property or alternatively, make them mutually rdfs:subClassOf to each other... > > HTH, > Damyan Ognyanov > Ontotext AD > > On 7/6/2012 4:28 PM, Stefano Ortona wrote: >> Hello everybody, >> >> I successfully instal the owlim-lite server, load my own ontology and now i'd like to query it via sparql http endpoint using the inference. >> >> In particular, i have to class in my ontology A and B and i specified A isEquivalentClass of B. At the moment, if a query: "give me all the equivalent class of B" the class A is not returned, because there's no explicit axiom that says that. How can I set the inference in order to get A as equivalent class of B? >> >> Thank you, >> >> Stefano Ortona >> ___ >> Owlim-discussion mailing list >> Owlim-discussion@ontotext.com <mailto:Owlim-discussion@ontotext.com> >> http://ontomail.semdata.org/
Re: [Owlim-discussion] Owlim-lite Inference
Hi Stefano, its certainly possible and this kind of work relies on TRREE reasoner. There is no default ruleset as long as I know(but in openrdf-workbench the choosen ruleset in selectbox is during creating new repository "Empty" which is not good for you ). I don't know how you've created your repository. Did you use openrdf-workbench or did you create it manually throught openrdf-console? My guess is that you use openrdf-workbench. In that case you should create repository in this way : 1. Deploy openrdf-sesame.war and openrdf-workbench.war (e.g. copy these two files into .../tomcat/webapps/ directory). 2. Run Tomcat 3. Open web browser and go to : http://localhost:8080/openrdf-workbench 4. Go to Create New Repository 5. Choose Owlim DB and write database name 6. Click Next and then you will see Ruleset option with many rules to choose. As Damian said, in your case you should not choose Empty or RDFS ruleset... Let's try OWL2-QL, which definitely contain equivalentClass rule 7. Then you try to do the same thing with this newly created repository and you should recieve results that you expect Best regards, Marek From: Stefano Ortona To: damyan Cc: owlim-discussion@ontotext.com Sent: Friday, 6 July 2012, 16:27 Subject: Re: [Owlim-discussion] Owlim-lite Inference Hello, sorry I'm new and I'm not very familiar with this concept. I didn't set any ruleset, so I'm using the default one. I have the axiom A owl:equivalentClass B and i want to avoid to write B owl:equivalentClass A, but when I query for the equivalent class of B i want also A to be returned, so I need a kind of reasoner. Is that possible and how? Thank you, Stefano On 06/lug/2012, at 15.09, damyan wrote: > Hi Steafno, > > which ruleset you are using because 'rdfs' or 'empty' do not have the > necessary rules/axioms to derive such conclusions? > > If it is other, then you should relate both of your classes with > owl:equivalentClass property or alternatively, make them mutually > rdfs:subClassOf to each other... > > HTH, > Damyan Ognyanov > Ontotext AD > > On 7/6/2012 4:28 PM, Stefano Ortona wrote: >> Hello everybody, >> >> I successfully instal the owlim-lite server, load my own ontology and now >> i'd like to query it via sparql http endpoint using the inference. >> >> In particular, i have to class in my ontology A and B and i specified A >> isEquivalentClass of B. At the moment, if a query: "give me all the >> equivalent class of B" the class A is not returned, because there's no >> explicit axiom that says that. How can I set the inference in order to get A >> as equivalent class of B? >> >> Thank you, >> >> Stefano Ortona >> ___ >> Owlim-discussion mailing list >> Owlim-discussion@ontotext.com >> http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion >> > > > ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Owlim-lite Inference
Hello, sorry I'm new and I'm not very familiar with this concept. I didn't set any ruleset, so I'm using the default one. I have the axiom A owl:equivalentClass B and i want to avoid to write B owl:equivalentClass A, but when I query for the equivalent class of B i want also A to be returned, so I need a kind of reasoner. Is that possible and how? Thank you, Stefano On 06/lug/2012, at 15.09, damyan wrote: > Hi Steafno, > > which ruleset you are using because 'rdfs' or 'empty' do not have the > necessary rules/axioms to derive such conclusions? > > If it is other, then you should relate both of your classes with > owl:equivalentClass property or alternatively, make them mutually > rdfs:subClassOf to each other... > > HTH, > Damyan Ognyanov > Ontotext AD > > On 7/6/2012 4:28 PM, Stefano Ortona wrote: >> Hello everybody, >> >> I successfully instal the owlim-lite server, load my own ontology and now >> i'd like to query it via sparql http endpoint using the inference. >> >> In particular, i have to class in my ontology A and B and i specified A >> isEquivalentClass of B. At the moment, if a query: "give me all the >> equivalent class of B" the class A is not returned, because there's no >> explicit axiom that says that. How can I set the inference in order to get A >> as equivalent class of B? >> >> Thank you, >> >> Stefano Ortona >> ___ >> Owlim-discussion mailing list >> Owlim-discussion@ontotext.com >> http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion >> > > > ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Owlim-lite Inference
Hi Steafno, which ruleset you are using because 'rdfs' or 'empty' do not have the necessary rules/axioms to derive such conclusions? If it is other, then you should relate both of your classes with owl:equivalentClass property or alternatively, make them mutually rdfs:subClassOf to each other... HTH, Damyan Ognyanov Ontotext AD On 7/6/2012 4:28 PM, Stefano Ortona wrote: Hello everybody, I successfully instal the owlim-lite server, load my own ontology and now i'd like to query it via sparql http endpoint using the inference. In particular, i have to class in my ontology A and B and i specified A isEquivalentClass of B. At the moment, if a query: "give me all the equivalent class of B" the class A is not returned, because there's no explicit axiom that says that. How can I set the inference in order to get A as equivalent class of B? Thank you, Stefano Ortona ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
[Owlim-discussion] Owlim-lite Inference
Hello everybody, I successfully instal the owlim-lite server, load my own ontology and now i'd like to query it via sparql http endpoint using the inference. In particular, i have to class in my ontology A and B and i specified A isEquivalentClass of B. At the moment, if a query: "give me all the equivalent class of B" the class A is not returned, because there's no explicit axiom that says that. How can I set the inference in order to get A as equivalent class of B? Thank you, Stefano Ortona ___ Owlim-discussion mailing list Owlim-discussion@ontotext.com http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion