public void classifyOntology(OWLOntology ontology, OWLReasonerFactory factory) { ToStringRenderer.getInstance().setRenderer(new ManchesterOWLSyntaxOWLObjectRendererImpl()); OWLReasoner reasoner = factory.createNonBufferingReasoner(ontology); // reasoner.precomputeInferences(InferenceType.values()); long time = System.currentTimeMillis(); boolean isConsistent = reasoner.isConsistent(); int numOfUnsatClasses = reasoner.getUnsatisfiableClasses().getEntitiesMinusBottom().size(); time = System.currentTimeMillis() - time; DLExpressivityChecker checker = new DLExpressivityChecker(Collections.singleton(ontology)); String e = checker.getDescriptionLogicName(); String name = ontology.getOntologyID().getOntologyIRI().getFragment(); logger.info( "ontology: " + name + ", reasoner: " + factory.getReasonerName() + ", expressivity: " + e + ", consistent: " + isConsistent + ", unsat classes: " + numOfUnsatClasses + ", time: " + time); }
@Test public void expressivityTest() { OWLOntology ontology = loadBigOntology("mouse"); DLExpressivityChecker checker = new DLExpressivityChecker(Collections.singleton(ontology)); logger.info(checker.getDescriptionLogicName()); }