Open
Description
Given the following code and the current release DL-Learner 1.5, there is a ClassCastException thrown during alg.start();
.
OWLOntologyManager manager = OWLManager.createConcurrentOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(getClass().getResourceAsStream("/Test.owl"));
Configuration reasonerConfiguration = new Configuration();
// using HermiT
OWLReasoner reasoner = new ReasonerFactory().createReasoner(ontology, reasonerConfiguration);
AbstractKnowledgeSource ks = new OWLAPIOntology(ontology);
ks.init();
OWLAPIReasoner rc = new OWLAPIReasoner(reasoner);
rc.init();
ClassExpressionLearningProblem lp = new ClassExpressionLearningProblem(rc);
lp.setClassToDescribe(IRI.create("#Positive"));
lp.init();
CELOE alg = new CELOE(lp, rc);
alg.setMaxExecutionTimeInSeconds(10);
alg.init();
alg.start();
java.lang.ClassCastException: class org.dllearner.utilities.ReasoningUtils cannot be cast to class org.dllearner.utilities.ReasoningUtilsCLP (org.dllearner.utilities.ReasoningUtils and org.dllearner.utilities.ReasoningUtilsCLP are in unnamed module of loader 'app')
at org.dllearner.learningproblems.ClassExpressionLearningProblem.computeScore(ClassExpressionLearningProblem.java:184)
at org.dllearner.learningproblems.ClassExpressionLearningProblem.evaluate(ClassExpressionLearningProblem.java:266)
at org.dllearner.learningproblems.ClassExpressionLearningProblem.evaluate(ClassExpressionLearningProblem.java:53)
at org.dllearner.core.AbstractLearningProblem.evaluate(AbstractLearningProblem.java:103)
at org.dllearner.utilities.owl.EvaluatedDescriptionSet.add(EvaluatedDescriptionSet.java:71)
at org.dllearner.algorithms.celoe.CELOE.addNode(CELOE.java:609)
at org.dllearner.algorithms.celoe.CELOE.start(CELOE.java:331)
Perhaps this could be an issue with me using a single class #Positive
as the class to describe?