Fuseki how to add Pellet reasoner

前端 未结 2 909
天命终不由人
天命终不由人 2020-12-20 06:51

I want to use pellet reasoner with my Fuseki 2.3.1

First: I added Pellet reasoner to my config.ttl as this:

ja:reasoner
        [ ja:reasonerClass
           


        
2条回答
  •  -上瘾入骨i
    2020-12-20 07:23

    Solution: Use openllet instead. Just change to ja:reasonerClass "openllet.jena.PelletReasonerFactory" in the config file, and download the openllet distribution and other jar files needed to the classpath.

    Explanation:The error

    expected class org.apache.jena.reasoner.ReasonerFactory, but had class org.mindswap.pellet.jena.PelletReasonerFactory

    is caused by that the pellet's org.mindswap.pellet.jena.PelletReasonerFactory implements the old interface (com.hp.hpl.jena.reasoner.ReasonerFactory) which is different from the interface used in Fuseki (org.apache.jena.reasoner.ReasonerFactory).

    The openllet's openllet.jena.PelletReasonerFactory implements the correct interface (org.apache.jena.reasoner.ReasonerFactory).

    Check their source code:

    openllet's PelletReasonerFactory.java

    pellet's PelletReasonerFactory.java

提交回复
热议问题