/** * Compute. * * @throws Exception the exception */ @Override public void compute() throws Exception { reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); }
@Override public void precomputeInferences(InferenceType... inferenceTypes) { delegate_.precomputeInferences(inferenceTypes); }
@Override public void precomputeInferences(InferenceType... inferenceTypes) { delegate_.precomputeInferences(inferenceTypes); }
@Override public synchronized void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { r.precomputeInferences(inferenceTypes); }
@Override public void preCompute() { reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY, InferenceType.CLASS_ASSERTIONS); }
@Override public void precomputeInferences(InferenceType... inferenceTypes) { delegate_.precomputeInferences(inferenceTypes); }
public void precompute() { Set<InferenceType> precomputeThisRun = EnumSet.noneOf(InferenceType.class); precomputeThisRun.addAll(precompute); precomputeThisRun.retainAll(runningReasoner.getPrecomputableInferenceTypes()); if (!precomputeThisRun.isEmpty()) { logger.info("Pre-computing inferences:"); for (InferenceType type : precompute) { logger.info(" - {}", type); } runningReasoner.precomputeInferences(precomputeThisRun.toArray(new InferenceType[precomputeThisRun.size()])); } }
public void precompute() { Set<InferenceType> precomputeThisRun = EnumSet.noneOf(InferenceType.class); precomputeThisRun.addAll(precompute); precomputeThisRun.retainAll(runningReasoner.getPrecomputableInferenceTypes()); if (!precomputeThisRun.isEmpty()) { logger.info("Initializing the reasoner by performing the following steps:"); for (InferenceType type : precompute) { logger.info("\t" + type); } runningReasoner.precomputeInferences(precomputeThisRun.toArray(new InferenceType[precomputeThisRun.size()])); } }
public void precompute() { Set<InferenceType> precomputeThisRun = EnumSet.noneOf(InferenceType.class); precomputeThisRun.addAll(precompute); precomputeThisRun.retainAll(runningReasoner.getPrecomputableInferenceTypes()); if (!precomputeThisRun.isEmpty()) { logger.info("Pre-computing inferences:"); for (InferenceType type : precompute) { logger.info(" - {}", type); } runningReasoner.precomputeInferences(precomputeThisRun.toArray(new InferenceType[precomputeThisRun.size()])); } }
public void precompute() { Set<InferenceType> precomputeThisRun = EnumSet.noneOf(InferenceType.class); precomputeThisRun.addAll(precompute); precomputeThisRun.retainAll(runningReasoner.getPrecomputableInferenceTypes()); if (!precomputeThisRun.isEmpty()) { logger.info("Initializing the reasoner by performing the following steps:"); for (InferenceType type : precompute) { logger.info("\t" + type); } runningReasoner.precomputeInferences(precomputeThisRun.toArray(new InferenceType[precomputeThisRun.size()])); } }
private void computeLowerBoundClassificationWithELK() { //Logger.getLogger("org.semanticweb.elk").setLevel(Level.ERROR);//this is to make elk less chatty: only errors Logger.getLogger("org.semanticweb.elk").setLevel(Level.OFF);//removed completely timeForELK = System.currentTimeMillis(); lReasoner = new ElkReasonerFactory().createNonBufferingReasoner(ontology); lReasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); timeForELK = System.currentTimeMillis() - timeForELK; }
protected void checkRemainingSubsumtionsWithHermiT(Graph<AtomicConcept> upperBound, Graph<AtomicConcept> knownSubsumptions) { timeForHermiT = System.currentTimeMillis(); owl2reasoner = new HermiTforMORe(compmodule_onto, upperBound, knownSubsumptions); //hermiT.classifyClasses(); owl2reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); timeForHermiT = System.currentTimeMillis() - timeForHermiT; LogOutput.print("HermiT took " + timeForHermiT + " milliseconds to complete the classification with the refined module"); }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { reasoner.precomputeInferences(InferenceType.DISJOINT_CLASSES); reasoner.getDisjointClasses(entity).forEach(cls -> cls.entities() .forEach(c -> result.add(dataFactory.getOWLDisjointClassesAxiom(entity, c)))); }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { if (!precomputed) { reasoner.precomputeInferences(org.semanticweb.owlapi.reasoner.InferenceType.DISJOINT_CLASSES); precomputed=true; } for (OWLClass cls : reasoner.getDisjointClasses(entity).getFlattened()) { result.add(dataFactory.getOWLDisjointClassesAxiom(entity, cls)); } } });
private void precompute() { Set<InferenceType> precomputeNow = EnumSet.copyOf(precompute); OWLReasoner reasoner = getOWLModelManager().getReasoner(); if (!reasoner.getPendingChanges().isEmpty()) { reasoner.flush(); } precomputeNow.retainAll(reasoner.getPrecomputableInferenceTypes()); for (InferenceType inference : precompute) { if (reasoner.isPrecomputed(inference)) { precomputeNow.remove(inference); } } if (!precomputeNow.isEmpty()) { reasoner.precomputeInferences(precomputeNow.toArray(new InferenceType[precomputeNow.size()])); } }
private void precompute() { Set<InferenceType> precomputeNow = EnumSet.copyOf(precompute); OWLReasoner reasoner = getOWLModelManager().getReasoner(); if (!reasoner.getPendingChanges().isEmpty()) { reasoner.flush(); } precomputeNow.retainAll(reasoner.getPrecomputableInferenceTypes()); for (InferenceType inference : precompute) { if (reasoner.isPrecomputed(inference)) { precomputeNow.remove(inference); } } if (!precomputeNow.isEmpty()) { reasoner.precomputeInferences(precomputeNow.toArray(new InferenceType[precomputeNow.size()])); } }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { reasoner.precomputeInferences(InferenceType.DISJOINT_CLASSES); reasoner.getDisjointClasses(entity).forEach(cls -> cls.entities() .forEach(c -> result.add(dataFactory.getOWLDisjointClassesAxiom(entity, c)))); }
private void precompute() { Set<InferenceType> precomputeNow = EnumSet.copyOf(precompute); OWLReasoner reasoner = getOWLModelManager().getReasoner(); if (!reasoner.getPendingChanges().isEmpty()) { reasoner.flush(); } precomputeNow.retainAll(reasoner.getPrecomputableInferenceTypes()); for (InferenceType inference : precompute) { if (reasoner.isPrecomputed(inference)) { precomputeNow.remove(inference); } } if (!precomputeNow.isEmpty()) { reasoner.precomputeInferences(precomputeNow.toArray(new InferenceType[0])); } }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { reasoner.precomputeInferences(InferenceType.DISJOINT_CLASSES); reasoner.getDisjointClasses(entity).forEach(cls -> cls.entities() .forEach(c -> result.add(dataFactory.getOWLDisjointClassesAxiom(entity, c)))); }
public SPARQLSampleDebugging(SparqlEndpoint endpoint) { this.endpoint = endpoint; this.ks = new SparqlEndpointKS(endpoint); initDBConnection(); dbpediaOntology = loadDBpediaOntology(); dbpediaReasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(dbpediaOntology); dbpediaReasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY); }