You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Matt Sabs <ma...@gmail.com> on 2018/05/30 21:53:09 UTC

Jena Fuseki Inference Configuration

Hello,

Does Apache Jena Fuseki offer Inference ability through reasoners such as
the OWL Reasoners described in the documentation?

The page Jena - Fuseki: Configuring Fuseki has a title labeled "Inference",
but then the only content is "@@".

Currently, I use the generic reasoner with the following configuration code:

ja:reasoner [
>             ja:reasonerURL <http://jena.hpl.hp.com/2003/
> GenericRuleReasoner> ;
>             ja:rulesFrom </Users/Matt/Desktop/TATC/
> apache-jena-fuseki-3.7.0/databases/myrules.rules> ;
>         ] ;


However, when I replace the reasoner URL with one of the OWL Reasoners (
http://jena.hpl.hp.com/2003/OWLFBRuleReasoner), the inference is not picked
up on by the reasoner.

For example, the below OWL code from Protoge is not being inferred by the
reasoner even though the OWL reasoner covers "owl:equivalentClass" as
stated in "Reasoners and rule engines".

<owl:Class rdf:about="http://www.semanticweb.org/matt/
> ontologies/2018/4/untitled-ontology-7#GasGuzzler">
>         <owl:equivalentClass>
>             <owl:Restriction>
>                 <owl:onProperty rdf:resource="http://www.
> semanticweb.org/matt/ontologies/2018/4/untitled-ontology-7#hasHwgMpg"/>
>                 <owl:someValuesFrom>
>                     <rdfs:Datatype>
>                         <owl:onDatatype rdf:resource="http://www.w3.
> org/2001/XMLSchema#integer"/>
>                         <owl:withRestrictions rdf:parseType="Collection">
>                             <rdf:Description>
>                                 <xsd:maxInclusive rdf:datatype="
> http://www.w3.org/2001/XMLSchema#integer">30</xsd:maxInclusive>
>                             </rdf:Description>
>                         </owl:withRestrictions>
>                     </rdfs:Datatype>
>                 </owl:someValuesFrom>
>             </owl:Restriction>
>         </owl:equivalentClass>
>         <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/matt/
> ontologies/2018/4/untitled-ontology-7#Vehicle"/>
>     </owl:Class>


Thank You.

Re: Jena Fuseki Inference Configuration

Posted by Matt Sabs <ma...@gmail.com>.
Thank you very much. I am going to try the two first examples that you've
listed. I have gone through the documentation for fuseki. If I can't get it
working in fuseki, I will try the Java Jena documentation as it looks like
it includes more info than fuseki for Owl Reasoning/Inference.

On Thu, May 31, 2018 at 10:45 AM, Greg Albiston <gr...@hotmail.com>
wrote:

> Hi Matt,
>
> I asked a similar question on the 3rd April related to RDFS inferencing on
> TDB using the assemblers.
> The outcome of that was it could be done in Fuseki but for my use case it
> was better to apply the inferencing when loading the dataset.
> The email chain is titled “TDB Assembly: Multiple Named Graphs with RDFS
> Inferencing”.
>
> Here are the links from the email chain to various Jena and external items
> that may be help you:
>
>
> https://christinemdraper.wordpress.com/2017/04/09/
> getting-started-with-rdf-sparql-jena-fuseki/ (Blog example that
> apparently has it working.)
> https://github.com/apache/jena/blob/master/jena-fuseki2/
> examples/service-inference-2.ttl (Example provided by Andy Seabourne)
>
> https://jena.apache.org/documentation/tdb/assembler.html (May have seen
> this already.)
>
> https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html
> (May have seen this already.)
> https://jena.apache.org/documentation/tdb/java_api.html
> https://github.com/apache/jena/blob/master/jena-arq/src/
> main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
>
>
>
> I didn’t get the assembler working in my case so maybe someone else can
> help with more detail.
>
>
> Hope this helps,
>
> Greg
>
> From: Matt Sabs <ma...@gmail.com>
> Sent: 30 May 2018 22:53
> To: users@jena.apache.org
> Subject: Jena Fuseki Inference Configuration
>
> Hello,
>
> Does Apache Jena Fuseki offer Inference ability through reasoners such as
> the OWL Reasoners described in the documentation?
>
> The page Jena - Fuseki: Configuring Fuseki has a title labeled
> "Inference", but then the only content is "@@".
>
> Currently, I use the generic reasoner with the following configuration
> code:
>
> ja:reasoner [
>             ja:reasonerURL <http://jena.hpl.hp.com/2003/
> GenericRuleReasoner> ;
>             ja:rulesFrom </Users/Matt/Desktop/TATC/
> apache-jena-fuseki-3.7.0/databases/myrules.rules> ;
>         ] ;
>
> However, when I replace the reasoner URL with one of the OWL Reasoners (
> http://jena.hpl.hp.com/2003/OWLFBRuleReasoner), the inference is not
> picked up on by the reasoner.
>
> For example, the below OWL code from Protoge is not being inferred by the
> reasoner even though the OWL reasoner covers "owl:equivalentClass" as
> stated in "Reasoners and rule engines".
>
> <owl:Class rdf:about="http://www.semanticweb.org/matt/
> ontologies/2018/4/untitled-ontology-7#GasGuzzler">
>         <owl:equivalentClass>
>             <owl:Restriction>
>                 <owl:onProperty rdf:resource="http://www.
> semanticweb.org/matt/ontologies/2018/4/untitled-ontology-7#hasHwgMpg"/>
>                 <owl:someValuesFrom>
>                     <rdfs:Datatype>
>                         <owl:onDatatype rdf:resource="http://www.w3.
> org/2001/XMLSchema#integer"/>
>                         <owl:withRestrictions rdf:parseType="Collection">
>                             <rdf:Description>
>                                 <xsd:maxInclusive rdf:datatype="
> http://www.w3.org/2001/XMLSchema#integer">30</xsd:maxInclusive>
>                             </rdf:Description>
>                         </owl:withRestrictions>
>                     </rdfs:Datatype>
>                 </owl:someValuesFrom>
>             </owl:Restriction>
>         </owl:equivalentClass>
>         <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/matt/
> ontologies/2018/4/untitled-ontology-7#Vehicle"/>
>     </owl:Class>
>
> Thank You.
>
>
>

RE: Jena Fuseki Inference Configuration

Posted by Greg Albiston <gr...@hotmail.com>.
Hi Matt,

I asked a similar question on the 3rd April related to RDFS inferencing on TDB using the assemblers.
The outcome of that was it could be done in Fuseki but for my use case it was better to apply the inferencing when loading the dataset.
The email chain is titled “TDB Assembly: Multiple Named Graphs with RDFS Inferencing”.

Here are the links from the email chain to various Jena and external items that may be help you:


https://christinemdraper.wordpress.com/2017/04/09/getting-started-with-rdf-sparql-jena-fuseki/ (Blog example that apparently has it working.)
https://github.com/apache/jena/blob/master/jena-fuseki2/examples/service-inference-2.ttl (Example provided by Andy Seabourne)

https://jena.apache.org/documentation/tdb/assembler.html (May have seen this already.)

https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html (May have seen this already.)
https://jena.apache.org/documentation/tdb/java_api.html
https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java



I didn’t get the assembler working in my case so maybe someone else can help with more detail.


Hope this helps,

Greg

From: Matt Sabs <ma...@gmail.com>
Sent: 30 May 2018 22:53
To: users@jena.apache.org
Subject: Jena Fuseki Inference Configuration

Hello,

Does Apache Jena Fuseki offer Inference ability through reasoners such as the OWL Reasoners described in the documentation?

The page Jena - Fuseki: Configuring Fuseki has a title labeled "Inference", but then the only content is "@@".

Currently, I use the generic reasoner with the following configuration code:

ja:reasoner [
            ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
            ja:rulesFrom </Users/Matt/Desktop/TATC/apache-jena-fuseki-3.7.0/databases/myrules.rules> ;
        ] ;

However, when I replace the reasoner URL with one of the OWL Reasoners (http://jena.hpl.hp.com/2003/OWLFBRuleReasoner), the inference is not picked up on by the reasoner.

For example, the below OWL code from Protoge is not being inferred by the reasoner even though the OWL reasoner covers "owl:equivalentClass" as stated in "Reasoners and rule engines".

<owl:Class rdf:about="http://www.semanticweb.org/matt/ontologies/2018/4/untitled-ontology-7#GasGuzzler">
        <owl:equivalentClass>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://www.semanticweb.org/matt/ontologies/2018/4/untitled-ontology-7#hasHwgMpg"/>
                <owl:someValuesFrom>
                    <rdfs:Datatype>
                        <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
                        <owl:withRestrictions rdf:parseType="Collection">
                            <rdf:Description>
                                <xsd:maxInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">30</xsd:maxInclusive>
                            </rdf:Description>
                        </owl:withRestrictions>
                    </rdfs:Datatype>
                </owl:someValuesFrom>
            </owl:Restriction>
        </owl:equivalentClass>
        <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/matt/ontologies/2018/4/untitled-ontology-7#Vehicle"/>
    </owl:Class>

Thank You.