|
26 | 26 | import org.dllearner.core.annotations.NoConfigOption; |
27 | 27 | import org.dllearner.core.config.ConfigOption; |
28 | 28 | import org.dllearner.kb.OWLAPIOntology; |
| 29 | +import org.dllearner.utilities.Helper; |
29 | 30 | import org.dllearner.utilities.MapUtils; |
30 | 31 | import org.dllearner.utilities.OWLAPIUtils; |
31 | 32 | import org.joda.time.DateTime; |
|
45 | 46 | import java.io.*; |
46 | 47 | import java.util.*; |
47 | 48 | import java.util.Map.Entry; |
| 49 | +import java.util.concurrent.atomic.AtomicInteger; |
48 | 50 | import java.util.concurrent.atomic.AtomicReference; |
49 | 51 | import java.util.function.Function; |
50 | 52 | import java.util.stream.Collectors; |
@@ -292,8 +294,15 @@ private void materialize() { |
292 | 294 |
|
293 | 295 | individuals = (TreeSet<OWLIndividual>) baseReasoner.getIndividuals(); |
294 | 296 |
|
295 | | - logger.debug("materialising concepts"); |
| 297 | + int totalEntities = baseReasoner.getClasses().size() + |
| 298 | + baseReasoner.getObjectProperties().size() + |
| 299 | + baseReasoner.getDatatypeProperties().size(); |
| 300 | + |
| 301 | + AtomicInteger i = new AtomicInteger(); |
| 302 | + |
| 303 | + logger.info("materialising concepts"); |
296 | 304 | baseReasoner.getClasses().stream().filter(cls -> !cls.getIRI().isReservedVocabulary()).forEach(cls -> { |
| 305 | + Helper.displayProgressPercentage(i.getAndIncrement(), totalEntities); |
297 | 306 | TreeSet<OWLIndividual> pos = (TreeSet<OWLIndividual>) baseReasoner.getIndividuals(cls); |
298 | 307 | classInstancesPos.put(cls, pos); |
299 | 308 |
|
@@ -337,13 +346,18 @@ private void materialize() { |
337 | 346 | // } |
338 | 347 |
|
339 | 348 | // materialize the object property facts |
340 | | - logger.debug("materialising object properties ..."); |
341 | | - baseReasoner.getObjectProperties().forEach(p -> opPos.put(p, baseReasoner.getPropertyMembers(p))); |
342 | | - logger.debug("finished materialising object properties."); |
| 349 | + logger.info("materialising object properties ..."); |
| 350 | + baseReasoner.getObjectProperties().forEach(p -> { |
| 351 | + Helper.displayProgressPercentage(i.getAndIncrement(), totalEntities); |
| 352 | + opPos.put(p, baseReasoner.getPropertyMembers(p)); |
| 353 | + }); |
343 | 354 |
|
344 | 355 | // materialize the data property facts |
345 | | - logger.debug("materialising datatype properties"); |
346 | | - baseReasoner.getDatatypeProperties().forEach(p -> dpPos.put(p, baseReasoner.getDatatypeMembers(p))); |
| 356 | + logger.info("materialising datatype properties"); |
| 357 | + baseReasoner.getDatatypeProperties().forEach(p -> { |
| 358 | + Helper.displayProgressPercentage(i.getAndIncrement(), totalEntities); |
| 359 | + dpPos.put(p, baseReasoner.getDatatypeMembers(p)); |
| 360 | + }); |
347 | 361 |
|
348 | 362 | for (OWLDataProperty dp : baseReasoner.getBooleanDatatypeProperties()) { |
349 | 363 | bdPos.put(dp, (TreeSet<OWLIndividual>) baseReasoner.getTrueDatatypeMembers(dp)); |
|
0 commit comments