Yes Lorenz thank you, it runs now. On Thu, Mar 9, 2017 at 4:27 PM, Lorenz B. < [email protected]> wrote:
> Does it work if you remove the second term which is - as I said - > superflous? > > > I am sorry if it still appears unclear. The rule seems ok as I have > > discussed it with another person but why the error comes, dont know. > > There are other generic rules which works fine but when I include this > > rule, it gives error. > > > > On Thu, Mar 9, 2017 at 3:35 PM, kumar rohit <[email protected]> > wrote: > > > >> *This is print out of string.* > >> > >> *(?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> )] * > >> > >> On Thu, Mar 9, 2017 at 1:54 PM, Lorenz B. <[email protected] > >> leipzig.de> wrote: > >> > >>> No no no. Print the String of the rule to the command line and show > this > >>> one to us. > >>> The current one isn't readable and can't be parsed for sure. And how > >>> should #MasterStudent be resolved? > >>> > >>> And don't us such an old version of Jena! Version 3.2.0 is already > >>> available. > >>> > >>>> The rule error is > >>>> > >>>> Exception in thread "AWT-EventQueue-0" > >>>> com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1 > >>> nodes! > >>>> > >>>> The rule is > >>>> > >>>> > >>>> [rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > >>>> #MasterStudent) " > >>>> > >>>> + "(#MasterStudent http://www.w3.org/2000/01/ > >>> rdf-schema#subClassOf > >>>> #Student )" > >>>> > >>>> > >>>> + " -> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > >>>> #Student )]"; > >>>> > >>>> On Thu, Mar 9, 2017 at 11:46 AM, Lorenz B. < > >>>> [email protected]> wrote: > >>>> > >>>>> That doesn't solve your original problem, please provide the error! > >>>>> > >>>>> RDFS reasoning is enough to cover that kind if inference, please read > >>>>> the documentation (as usual) [1] > >>>>> > >>>>> [1] https://jena.apache.org/documentation/inference/ > >>>>>> 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/threa > >>> d/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/o > >>> ntologies#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 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> -- > >>>>> Lorenz Bühmann > >>>>> AKSW group, University of Leipzig > >>>>> Group: http://aksw.org - semantic web research center > >>>>> > >>>>> > >>> -- > >>> Lorenz Bühmann > >>> AKSW group, University of Leipzig > >>> Group: http://aksw.org - semantic web research center > >>> > >>> > -- > Lorenz Bühmann > AKSW group, University of Leipzig > Group: http://aksw.org - semantic web research center > >
