简体   繁体   中英

DisjointClasses error while using opencyc owl in java

I'm currently working on a natural language processing project attempting to use openCYC as a KB. At the moment I'm simply trying to load the ontology and instantiate a reasoner using the java owl api v3.4.8 and HermiT, however whenever I try to instantiate the reasoner I get the error

Exception in thread "main" java.lang.IllegalArgumentException: Error: Parsed DisjointClasses( http://sw.opencyc.org/concept/Mx4rEHSj4Q0sQVGnAmZNRRJ20Q ).

current code:

File ontology = new File("owl-export-unversioned.owl");

    OWLOntologyManager m = OWLManager.createOWLOntologyManager();

    System.out.println("Loading...");
    OWLOntology o = m.loadOntologyFromOntologyDocument(ontology);
    System.out.println("Loaded");

    Reasoner hermit=new Reasoner(o);
    System.out.println(hermit.isConsistent());

Does this mean there is a problem with the opencyc ontology itself? Or am I doing something wrong?

The problem is that openCyc contains an erroneous axiom: a DisjointClasses with only one argument. The OWL specs specify that DisjointClasses must have two or more arguments.

The OWL API will let you parse this ontology, but HermiT will complain about this axiom, and possibly more.

You can use OWL2DLProfile to check which axioms are violating the OWL 2 DL profile. This will report other erroneous axioms of the same type. You will have to decide yourself what is the correct solution, though - the OWL API does not have a fixing implementation yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM