Search code examples
ontologydbpediaowl-api

Consistent ontology can not be materialized using HERMIT


For my experiment, I need to materialize a dbpedia ontology which consists of the TBox/schema and ABox/data.

To do so, I merge the dbpedia ontology/TBox/schema (http://downloads.dbpedia.org/2016-04/dbpedia_2016-04.owl) with the ABox/data part from the DBPedia knowledge graph (I just took 2% of the data in http://downloads.dbpedia.org/2016-04/core-i18n/en/mappingbased_objects_en.ttl.bz2).

Before materialized this merged file, I ran the consistency checking first using HerMit reasoner. The merged file was consistent.

But when I ran the materialization service using HerMit reasoner (I used the code from https://github.com/owlcs/owlapi/issues/643), I found this error : comparison method violates its general contract! When I debugged the code, the error was raised when the compiler invoked this process : manager.saveOntology(inferredAxiomsOntology,outputStream) It's quite strange that a consistent ontology can not be materialized by the reasoner.

Any idea how to solve this error? (The merged file can be downloaded from https://www.dropbox.com/s/l689hejgyv2xn7l/DBPRule1Ite1.owl.zip?dl=0 )

Thank you very much.


Solution

  • You need to use a more recent version of the libraries. The bug you found was fixed at the beginning of the V4 series, in 2014.

    You can use HermiT 1.3.8.413 (which uses OWLAPI 4.1.3) or HermiT 1.4.1.513 (which uses OWLAPI 5.1.3). Both are available on Maven Central:

    http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.sourceforge.owlapi%22%20AND%20a%3A%22org.semanticweb.hermit%22