Hi,
On 17/04/16 15:06, Abduladem Eljamel wrote:
Hi Dave
Thank you for answering my email.
I don't know what is reason of the scrambling my emails. I sent the same email
to many other email accounts and there is no scrambling.
Regarding to my last question, it is as you said, the problem was related to
URIs. After adding URIs to the rules, they are working fine now. Thank you
again.
Good.
I have other question, I am extracting information from online news documents,
entities and relations between them. Then, I populate them to a semantic
knowledge-base by using an Ontology. My Idea is to put the Information
Extracted from a every document into a separate named graph. It means that the
semantic knowledge-base is a collection of named graphs and every named graph
represents one document. Practically, I am storing the semantic knowledge-base
into TDB store and the ontology in a separate RDF file.
My question is how to apply reasoning to all named graphs in the same time and
the named graphthe in the resulting inferred knowledge-base stay separate.
The reasoners are not dataset-aware. That is, they work at the level of
single models/graphs - you apply reasoner to a single graph and you get
an InfGraph in which the inference results are visible (stored in memory
or computed on demand).
If you have a set of named graphs and you want to compute some inference
closure over each of them separately then you'll just have to write code
which will iterate over the source graphs and create an InfGraph for
each. If your goal is to have the results of that inference be
persistent then you would need code that copies the resulting InfGraph
contents to a set of named graphs in some store.
Dave
From: Dave Reynolds <dave.e.reyno...@gmail.com>
To: users@jena.apache.org
Sent: Sunday, 17 April 2016, 9:52
Subject: Re: Jena Reasoning
Hi,
Your email came through too scrambled to read but ...
On 16/04/16 18:26, Abduladem Eljamel wrote:
Hi,,I am not sure if I am using Jena reasoning and rules correctly. I could not
get any results after following some of examples in jena website. This one of
the codes which I do not know where is wrong in it:
OntModel schema =
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF);
Probably best to make that plain OWL_MEM, at least to begin with
otherwise you have the OWL reasoner running underneath a generic rule
reasoner which will complicate your debugging.
.schema.add(kwakeb, employerOfNAry, rel01);
What are the values of all these variables? Especially employerOfNAry?
You haven't shown us the rest of your code.
schema.add(rel01, hasRelationValue, hadi);
String ruleSrc ="[r1: (?org employerOfNAry ?nary) (?nary hasRelationValue ?per) ->
(?org employerOf ?per)] ";List rules = Rule.parseRules(ruleSrc);
This is using "employerOfNAry" as the predicate in the rule, but that's
not a URI and so is unlikely to match whatever you have put into schema.
Make sure you use consistent URIs in both your data and rules.
Dave