public void changeSourcesOntology(OWLOntology ontology) { sourcesOntology = ontology; learningProblem.getReasoner().changeSources(Collections.singleton((KnowledgeSource) new OWLAPIOntology(ontology))); // learningProblem.getReasoner().changeSources(Collections.singleton((KnowledgeSource) ontology)); }
public void changeSourcesOntology(OWLOntology ontology) { sourcesOntology = ontology; edge.setOntologies(ontology); learningProblem.getReasoner().changeSources(Collections.singleton((KnowledgeSource) new OWLAPIOntology(ontology))); // learningProblem.getReasoner().changeSources(Collections.singleton((KnowledgeSource) ontology)); }
@Override public void init() throws ComponentInitException { AbstractReasonerComponent rc = learningProblem.getReasoner(); if (rc instanceof ClosedWorldReasoner) { sourcesOntology = ((ClosedWorldReasoner) rc).getReasonerComponent().getOntology(); } else if (rc instanceof OWLAPIReasoner) { sourcesOntology = ((OWLAPIReasoner) rc).getOntology(); } else { throw new ComponentInitException("Unsupported Reasoning: " + rc.getClass()); } }
+ "negative examples. Selecting the instances of Thing which " + "are non instances of ClasstoDescribe as negative Examples"); AbstractReasonerComponent reasoner = lp.getReasoner();
positiveIndividuals = ((PosOnlyLP) learningProblem).getPositiveExamples(); negativeIndividuals = Sets.difference(learningProblem.getReasoner().getIndividuals(), positiveIndividuals); } else if (learningProblem instanceof ClassLearningProblem) {
edge.setTimeOut(timeout); AbstractReasonerComponent rc = learningProblem.getReasoner(); if (rc instanceof ClosedWorldReasoner) { sourcesOntology = ((ClosedWorldReasoner) rc).getReasonerComponent().getOntology();