You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Laura Morales <la...@mail.com> on 2019/06/25 07:40:10 UTC
Cannot setup GenericRuleReasoner
What's wrong with this configuration? It doesn't seem to infer any triples when I query the dataset (Fuseki 3.6.0). It doesn't show any errors either.
config.ttl
------------------------------------------------------------
PREFIX : <#>
PREFIX fuseki: <http://jena.apache.org/fuseki#>
PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#>
:service a fuseki:Service ;
rdfs:label "test" ;
fuseki:name "test" ;
fuseki:serviceQuery "query" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:dataset :dataset ;
.
:dataset a ja:RDFDataset ;
ja:defaultGraph :model_inf .
:model_inf a ja:InfModel ;
ja:baseModel :g ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
ja:rulesFrom <file:///opt/fuseki/run/inference/rules> ;
] .
:ds a tdb:DatasetTDB ;
tdb:location "/opt/fuseki/run/databases/ds/" .
:g a tdb:GraphTDB ;
tdb:dataset :ds .
rules
------------------------------------------------------------
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <https://example.org#> .
[ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
Re: Cannot setup GenericRuleReasoner
Posted by Dave Reynolds <da...@gmail.com>.
Not a bug in that the syntax was never based on Sparqkm indeed it
predates Sparql. However, I'm sure someone could add that extension or
redesign the syntax entirely to be more Sparql compatible.
Dave
On 25/06/2019 12:41, Nouwt, B. (Barry) wrote:
> I can confirm that rules cannot use the 'a' keyword to replace rdf:type, like you can in for example SPARQL. Not sure if it’s a bug...
>
> You already found the workaround: use rdf:type instead of 'a'
>
> Regards, Barry
>
> -----Original Message-----
> From: Laura Morales <la...@mail.com>
> Sent: dinsdag 25 juni 2019 10:08
> To: jena-users-ml <us...@jena.apache.org>
> Subject: Fw: Cannot setup GenericRuleReasoner
>
> It seems to work if I replace the rule
>
> [ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
>
> with this rule
>
> [ okrule: (?s rdf:type ex:Person) -> (?s ex:works "OK") ]
>
> is this a bug?
>
>
>
>
>> Sent: Tuesday, June 25, 2019 at 9:40 AM
>> From: "Laura Morales" <la...@mail.com>
>> To: jena-users-ml <us...@jena.apache.org>
>> Subject: Cannot setup GenericRuleReasoner
>>
>> What's wrong with this configuration? It doesn't seem to infer any triples when I query the dataset (Fuseki 3.6.0). It doesn't show any errors either.
>>
>> config.ttl
>> ------------------------------------------------------------
>> PREFIX : <#>
>> PREFIX fuseki: <http://jena.apache.org/fuseki#>
>> PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>> PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#>
>>
>> :service a fuseki:Service ;
>> rdfs:label "test" ;
>> fuseki:name "test" ;
>> fuseki:serviceQuery "query" ;
>> fuseki:serviceReadGraphStore "get" ;
>> fuseki:serviceReadWriteGraphStore "data" ;
>> fuseki:serviceUpdate "update" ;
>> fuseki:serviceUpload "upload" ;
>> fuseki:dataset :dataset ;
>> .
>>
>> :dataset a ja:RDFDataset ;
>> ja:defaultGraph :model_inf .
>>
>> :model_inf a ja:InfModel ;
>> ja:baseModel :g ;
>> ja:reasoner [
>> ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
>> ja:rulesFrom <file:///opt/fuseki/run/inference/rules> ;
>> ] .
>>
>> :ds a tdb:DatasetTDB ;
>> tdb:location "/opt/fuseki/run/databases/ds/" .
>>
>> :g a tdb:GraphTDB ;
>> tdb:dataset :ds .
>>
>>
>> rules
>> ------------------------------------------------------------
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>> @prefix ex: <https://example.org#> .
>>
>> [ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
>>
> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
>
RE: Cannot setup GenericRuleReasoner
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
I can confirm that rules cannot use the 'a' keyword to replace rdf:type, like you can in for example SPARQL. Not sure if it’s a bug...
You already found the workaround: use rdf:type instead of 'a'
Regards, Barry
-----Original Message-----
From: Laura Morales <la...@mail.com>
Sent: dinsdag 25 juni 2019 10:08
To: jena-users-ml <us...@jena.apache.org>
Subject: Fw: Cannot setup GenericRuleReasoner
It seems to work if I replace the rule
[ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
with this rule
[ okrule: (?s rdf:type ex:Person) -> (?s ex:works "OK") ]
is this a bug?
> Sent: Tuesday, June 25, 2019 at 9:40 AM
> From: "Laura Morales" <la...@mail.com>
> To: jena-users-ml <us...@jena.apache.org>
> Subject: Cannot setup GenericRuleReasoner
>
> What's wrong with this configuration? It doesn't seem to infer any triples when I query the dataset (Fuseki 3.6.0). It doesn't show any errors either.
>
> config.ttl
> ------------------------------------------------------------
> PREFIX : <#>
> PREFIX fuseki: <http://jena.apache.org/fuseki#>
> PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#>
>
> :service a fuseki:Service ;
> rdfs:label "test" ;
> fuseki:name "test" ;
> fuseki:serviceQuery "query" ;
> fuseki:serviceReadGraphStore "get" ;
> fuseki:serviceReadWriteGraphStore "data" ;
> fuseki:serviceUpdate "update" ;
> fuseki:serviceUpload "upload" ;
> fuseki:dataset :dataset ;
> .
>
> :dataset a ja:RDFDataset ;
> ja:defaultGraph :model_inf .
>
> :model_inf a ja:InfModel ;
> ja:baseModel :g ;
> ja:reasoner [
> ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
> ja:rulesFrom <file:///opt/fuseki/run/inference/rules> ;
> ] .
>
> :ds a tdb:DatasetTDB ;
> tdb:location "/opt/fuseki/run/databases/ds/" .
>
> :g a tdb:GraphTDB ;
> tdb:dataset :ds .
>
>
> rules
> ------------------------------------------------------------
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix ex: <https://example.org#> .
>
> [ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
>
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
Fw: Cannot setup GenericRuleReasoner
Posted by Laura Morales <la...@mail.com>.
It seems to work if I replace the rule
[ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
with this rule
[ okrule: (?s rdf:type ex:Person) -> (?s ex:works "OK") ]
is this a bug?
> Sent: Tuesday, June 25, 2019 at 9:40 AM
> From: "Laura Morales" <la...@mail.com>
> To: jena-users-ml <us...@jena.apache.org>
> Subject: Cannot setup GenericRuleReasoner
>
> What's wrong with this configuration? It doesn't seem to infer any triples when I query the dataset (Fuseki 3.6.0). It doesn't show any errors either.
>
> config.ttl
> ------------------------------------------------------------
> PREFIX : <#>
> PREFIX fuseki: <http://jena.apache.org/fuseki#>
> PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX tdb: <http://jena.hpl.hp.com/2008/tdb#>
>
> :service a fuseki:Service ;
> rdfs:label "test" ;
> fuseki:name "test" ;
> fuseki:serviceQuery "query" ;
> fuseki:serviceReadGraphStore "get" ;
> fuseki:serviceReadWriteGraphStore "data" ;
> fuseki:serviceUpdate "update" ;
> fuseki:serviceUpload "upload" ;
> fuseki:dataset :dataset ;
> .
>
> :dataset a ja:RDFDataset ;
> ja:defaultGraph :model_inf .
>
> :model_inf a ja:InfModel ;
> ja:baseModel :g ;
> ja:reasoner [
> ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
> ja:rulesFrom <file:///opt/fuseki/run/inference/rules> ;
> ] .
>
> :ds a tdb:DatasetTDB ;
> tdb:location "/opt/fuseki/run/databases/ds/" .
>
> :g a tdb:GraphTDB ;
> tdb:dataset :ds .
>
>
> rules
> ------------------------------------------------------------
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix ex: <https://example.org#> .
>
> [ okrule: (?s a ex:Person) -> (?s ex:works "OK") ]
>