Thanks a lot Dave, Lorenz, so it means I dont have to write these rules and it will be inferred automatically? How it will be executed,? I have default model with no parameters and then the inferred model. Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the default model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. < [email protected]> wrote: > 1. That rule is unreadable again - at least for me. See how it is shown > to the mailing list: http://jena.markmail.org/thread/akjkia6mysqhsq2i > 2. Don't show the Java concatenated string but the rule as it's printed > to the command line/console. Especially hereby one can see trivial > syntax errors > 3. As Dave said, it's totally unclear why you're always omitting obvious > details - what kind of exception? > 4. The rule doesn't make sense, since the second term of the premise > doesn't contain any variable. It's not clear what you want to achieve here. > > (?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf :Student ) > -> (?x rdf:type :Student ) > > That rule would be covered by the rdf:type/rdfs:subClassOf rule in RDFS: > > (?x rdf:type ?C) (?C rdfs:subClassOf ?D) -> (?x rdf:type ?D) > > But in your rule the second term doesn't contribute to the reasoning > process. The result would be the same with > > (?x rdf:type :MasterStudent ) -> (?x rdf:type :Student ) > > > > > > > On 08/03/17 13:29, kumar rohit wrote: > >> Is there any problem in this rule. I am getting error here. > > > > What error? > > > > It is much easier for us to help if you say explicitly what went wrong! > > > >> I used jena > >> generic rule reasoner so is it sufficient also for executing rdfs sub > >> class > >> rules? > >> > >> *[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> > >> http://www.semanticweb.org/t/ontologies#MasterStudent > >> <http://www.semanticweb.org/t/ontologies#MasterStudent>) "* > >> * + "( http://www.semanticweb.org/t/ontologies#MasterStudent > >> <http://www.semanticweb.org/t/ontologies#MasterStudent>) > >> http://www.w3.org/2000/01/rdf-schema#subClassOf > >> <http://www.w3.org/2000/01/rdf-schema#subClassOf> > >> http://www.semanticweb.org/t/ontologies#Student > >> <http://www.semanticweb.org/t/ontologies#Student> )"* > >> > >> > >> * + " -> (?x http://www.w3.org/1999/02/22- > rdf-syntax-ns#type > >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> > >> http://www.semanticweb.org/t/ontologies#Student > >> <http://www.semanticweb.org/t/ontologies#Student> )]"* > > > > Almost impossible to read but at a glance it looks OK. > > > > 1. Please post messages as plain text. Your emailer has done horrid > > things to the URIs. > > > > 2. The rule would be much easier to read if you use prefixes instead > > of writing out the URIs longhand. > > > > 3. It's also possible to use the standard generic RDFS rules. You > > don't have to write out your own special case rules for each > > subClassOf relationship. > > > > Dave > > > > > -- > Lorenz Bühmann > AKSW group, University of Leipzig > Group: http://aksw.org - semantic web research center > > >
