Discussion:
Error in rdfs rule
kumar rohit
2017-03-08 13:29:29 UTC
Permalink
Is there any problem in this rule. I am getting error here. 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> )]"*


* Reasoner reasoner2 = new
GenericRuleReasoner(Rule.parseRules(rule)); InfModel inf =
ModelFactory.createInfModel(reasoner2, model);*
Dave Reynolds
2017-03-08 23:01:18 UTC
Permalink
Post by kumar rohit
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!
Post by kumar rohit
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.
2017-03-09 07:14:13 UTC
Permalink
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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
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
kumar rohit
2017-03-09 08:15:47 UTC
Permalink
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. <
Post by Lorenz B.
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 )
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
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
Post by Dave Reynolds
Post by kumar rohit
<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.
2017-03-09 08:46:53 UTC
Permalink
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/
Post by kumar rohit
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. <
Post by Lorenz B.
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 )
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
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
Post by Dave Reynolds
Post by kumar rohit
<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
kumar rohit
2017-03-09 09:10:38 UTC
Permalink
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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these rules
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
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. <
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf :Student )
-> (?x rdf:type :Student )
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
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
Post by Dave Reynolds
Post by kumar rohit
<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.
2017-03-09 10:54:28 UTC
Permalink
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.
Post by kumar rohit
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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these rules
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
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. <
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf :Student )
-> (?x rdf:type :Student )
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
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
Post by Dave Reynolds
Post by kumar rohit
<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
kumar rohit
2017-03-09 12:35:06 UTC
Permalink
*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. <
Post by Lorenz B.
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.
Post by kumar rohit
The rule error is
Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1
nodes!
Post by kumar rohit
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
Post by kumar rohit
#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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these rules
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
model with no parameters and then the inferred model.
Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the
default
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. <
Post by Lorenz B.
1. That rule is unreadable again - at least for me. See how it is
shown
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf
:Student )
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
-> (?x rdf:type :Student )
That rule would be covered by the rdf:type/rdfs:subClassOf rule in
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
I used jena
generic rule reasoner so is it sufficient also for executing rdfs
sub
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
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
Post by Dave Reynolds
Post by kumar rohit
<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
kumar rohit
2017-03-09 12:44:29 UTC
Permalink
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.
Post by kumar rohit
*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> )] *
Post by Lorenz B.
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.
Post by kumar rohit
The rule error is
Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1
nodes!
Post by kumar rohit
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
Post by kumar rohit
#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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these
rules
Post by kumar rohit
Post by Lorenz B.
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
model with no parameters and then the inferred model.
Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the
default
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. <
Post by Lorenz B.
1. That rule is unreadable again - at least for me. See how it is
shown
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
to the mailing list: http://jena.markmail.org/threa
d/akjkia6mysqhsq2i
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
2. Don't show the Java concatenated string but the rule as it's
printed
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf
:Student )
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
-> (?x rdf:type :Student )
That rule would be covered by the rdf:type/rdfs:subClassOf rule in
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
I used jena
generic rule reasoner so is it sufficient also for executing rdfs
sub
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
<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
Post by Dave Reynolds
Post by kumar rohit
<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
Andy Seaborne
2017-03-09 13:24:59 UTC
Permalink
Post by kumar rohit
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.
Post by kumar rohit
*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> )] *
Seriously?

After all the comments about readability and about built-in prefixes?

Andy
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
The rule error is
Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1
nodes!
Post by kumar rohit
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
Post by kumar rohit
#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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these
rules
Post by kumar rohit
Post by Lorenz B.
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
model with no parameters and then the inferred model.
Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the
default
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. <
Post by Lorenz B.
1. That rule is unreadable again - at least for me. See how it is
shown
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
to the mailing list: http://jena.markmail.org/threa
d/akjkia6mysqhsq2i
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
2. Don't show the Java concatenated string but the rule as it's
printed
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf
:Student )
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
-> (?x rdf:type :Student )
That rule would be covered by the rdf:type/rdfs:subClassOf rule in
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
I used jena
generic rule reasoner so is it sufficient also for executing rdfs
sub
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
<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
Post by Dave Reynolds
Post by kumar rohit
<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.
2017-03-09 13:27:05 UTC
Permalink
Does it work if you remove the second term which is - as I said -
superflous?
Post by kumar rohit
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.
Post by kumar rohit
*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> )] *
Post by Lorenz B.
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.
Post by kumar rohit
The rule error is
Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1
nodes!
Post by kumar rohit
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
Post by kumar rohit
#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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these
rules
Post by kumar rohit
Post by Lorenz B.
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
model with no parameters and then the inferred model.
Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the
default
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. <
Post by Lorenz B.
1. That rule is unreadable again - at least for me. See how it is
shown
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
to the mailing list: http://jena.markmail.org/threa
d/akjkia6mysqhsq2i
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
2. Don't show the Java concatenated string but the rule as it's
printed
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf
:Student )
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
-> (?x rdf:type :Student )
That rule would be covered by the rdf:type/rdfs:subClassOf rule in
(?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 )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
I used jena
generic rule reasoner so is it sufficient also for executing rdfs
sub
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
<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
Post by Dave Reynolds
Post by kumar rohit
<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
kumar rohit
2017-03-09 15:12:01 UTC
Permalink
Yes Lorenz thank you, it runs now.

On Thu, Mar 9, 2017 at 4:27 PM, Lorenz B. <
Post by Lorenz B.
Does it work if you remove the second term which is - as I said -
superflous?
Post by kumar rohit
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.
Post by kumar rohit
*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> )] *
Post by Lorenz B.
No no no. Print the String of the rule to the command line and show
this
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
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.
Post by kumar rohit
The rule error is
Exception in thread "AWT-EventQueue-0"
com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1
nodes!
Post by kumar rohit
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
Post by kumar rohit
#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. <
Post by Lorenz B.
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/
Post by kumar rohit
Thanks a lot Dave, Lorenz, so it means I dont have to write these
rules
Post by kumar rohit
Post by Lorenz B.
and
Post by kumar rohit
it will be inferred automatically? How it will be executed,? I have
default
Post by kumar rohit
model with no parameters and then the inferred model.
Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the
default
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
model?
On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. <
Post by Lorenz B.
1. That rule is unreadable again - at least for me. See how it is
shown
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
to the mailing list: http://jena.markmail.org/threa
d/akjkia6mysqhsq2i
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
2. Don't show the Java concatenated string but the rule as it's
printed
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
details - what kind of exception?
4. The rule doesn't make sense, since the second term of the
premise
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
doesn't contain any variable. It's not clear what you want to
achieve
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
here.
Post by kumar rohit
Post by Lorenz B.
(?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf
:Student )
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
-> (?x rdf:type :Student )
That rule would be covered by the rdf:type/rdfs:subClassOf rule in
(?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
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
process. The result would be the same with
(?x rdf:type :MasterStudent ) -> (?x rdf:type :Student )
Post by Dave Reynolds
Post by kumar rohit
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!
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
I used jena
generic rule reasoner so is it sufficient also for executing rdfs
sub
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
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
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
Post by kumar rohit
<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
Post by Dave Reynolds
Post by kumar rohit
<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
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
things to the URIs.
2. The rule would be much easier to read if you use prefixes
instead
Post by kumar rohit
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by kumar rohit
Post by Lorenz B.
Post by Dave Reynolds
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
Loading...