Hello Lorenz, Dave, I have used the above method and suddenly I get this
exception:
WARN [AWT-EventQueue-0] (Rule.java:947) - Rule references unimplemented
functor: ^
Where it comes from?
On Sun, Nov 27, 2016 at 2:59 PM, Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:
>
>
> > Hi Dave,
> >
> > So in that case we dont need to add non-inference model to the generic
> > reasoner because after all, our whole data is in the model.
> Yes, it is simply nested:
> Raw model A is "contained" in the inferred RDFS model B.
> B is "contained" in your user-defined rule model C.
> Thus, A is "contained" in C.
> >
> >
> > On Sat, Nov 26, 2016 at 11:55 AM, Dave Reynolds <
> dave.e.reyno...@gmail.com>
> > wrote:
> >
> >> On 25/11/16 13:54, tina sani wrote:
> >>
> >>> I have something like this after my Jena forward chain rules and SPARQL
> >>> query:
> >>>
> >>> Reasoner reasoner1 = new GenericRuleReasoner(Rule.parseRules(rule));
> >>> InfModel inf = ModelFactory.createInfModel(reasoner1, model);
> >>>
> >>> Reasoner reasoner2 = ReasonerRegistry.getRDFSReasoner();
> >>>
> >>> InfModel inf2 = ModelFactory.createRDFSModel(model);
> >>>
> >> If you want your rules to see the results of the RDFS closure then you
> >> need something more like:
> >>
> >> InfModel inf = ModelFactory.createRDFSModel(model);
> >> Reasoner reasoner1 = new GenericRuleReasoner(Rule.
> parseRules(rule));
> >> InfModel inf2 = ModelFactory.createInfModel(reasoner1, inf);
> >>
> >> Dave
> >>
> >>
> >> On Fri, Nov 25, 2016 at 4:46 PM, tina sani
> wrote:
> >>> So all I should so is to create rdfs model:
> InfModel inf2 = ModelFactory.createRDFSModel();
>
> What would be the arguments of the ModelFactory.createRDFSModel(). I
> have two models here, one the simple non inference model and other the
> inference model : InfModel inf = ModelFactory.createInfModel(
> reasoner,
> model);
>
>
>
>
> On Fri, Nov 25, 2016 at 3:59 PM, Lorenz B. leipzig.de> wrote:
>
>
> > Yes I use GenericRuleReasoner, so using the following rules along
> with
> > my
> >
> >> own rules will solve the problem?
> >>
> >> ?x rdfs:subClassOf emp:ContractEmployee--> ?x rdfs:subClassOf
> >>
> > emp:Employee
> >
> >> ?x rdfs:subClassOf emp:PermanantEmployee--> ?x rdfs:subClassOf
> >>
> > emp:Employee
> > That might be incomplete as rdfs:subClassOf is transitive. Simply use
> > the RDFS reasoning.
> >
> >> On Thu, Nov 24, 2016 at 11:39 AM, Lorenz B. <
> >> buehm...@informatik.uni-leipzig.de> wrote:
> >>
> >> If I pass OntModelSpec.OWL_MEM_MICRO_RULE_INF” to the OntModel,
> will
> >>> it do
> >>>
> the RDFS reasoning?
>
> >>> See [1] in general and in particular [2] which shows how to setup
> an
> >>> RDFS reasoner
> >>>
> >>> InfModel inf = ModelFactory.createRDFSModel(rdfsExample);
> >>>
> >>> or
> >>>
> >>> Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
> >>> InfModel inf = ModelFactory.createInfModel(reasoner, rdfsExample);
> >>>
> >>> [1] https://jena.apache.org/documentation/inference/ [2]
> >>> https://jena.apache.org/documentation/inference/#generalExamples
> >>>
> b) adding the particular rules to your set of rules
> I have already created the rules, mentioned in my first email.
> You
>
> >>> means
> >> rules other than that?
> >>> I don't know how you setup your rules, but if you use the
> >>> GenericRuleReasoner it does only apply your rules and you would
> have
> >>> to
> >>> add the rules that do the rdfs:subClass/rdf:type inference.
> >>>
> On Wed, Nov 23, 2016 at 11:50 AM, Lorenz B. <
> buehm...@informatik.uni-leipzig.de> wrote:
>
> Dave meant that you need an additional layer of reasoning like
> RDFS
> or
> >> even less to get the inferences that you describe.
> > This can be done by
> >
> > a) nesting two InfModels one that works on your specific rules
> and
> >
> one
> >> that uses some kind of RDFS or
> > b) adding the particular rules to your set of rules
> >
> > Ok sorry Dave, actually I did not completely understand your
> answer.
> >> "You could have an inference model with the appropriate
> >>
> > configuration
> >> to
> deduce membership of employee"
> >> Yes I have the inference model:
> >> Reasoner reasoner = new GenericRuleReasoner(Rule.parse
> >>
> > Rules(rule));
> >> InfModel infer = ModelFactory.createInfModel(reasoner,
> > model);
> >> Query query = QueryFactory.create(queryString);
> >>
> >> QueryExecution qe = QueryExecutionFactory.create(query,
>