diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-11-29 15:00:32 +0000 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-11-29 15:00:32 +0000 |
| commit | 9fc4643c2f7e0686364020e0d6f38b55c3cd3222 (patch) | |
| tree | e00a44d74477732b29aab9e3b34f56972bf5a0bc | |
| parent | dae3a534b43a73bf813dd7247b7a9abfcf274550 (diff) | |
| download | RSAComb-9fc4643c2f7e0686364020e0d6f38b55c3cd3222.tar.gz RSAComb-9fc4643c2f7e0686364020e0d6f38b55c3cd3222.zip | |
Move verbose output before importing into RDFox
This gives us better debug output when the import fails or doesn't
terminate.
| -rw-r--r-- | src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala index 7671c8f..3fec7bc 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala | |||
| @@ -531,6 +531,8 @@ class RSAOntology( | |||
| 531 | RDFoxUtil.addData(data, RSAOntology.CanonGraph, datafiles: _*) | 531 | RDFoxUtil.addData(data, RSAOntology.CanonGraph, datafiles: _*) |
| 532 | 532 | ||
| 533 | /* Top/equality axiomatization */ | 533 | /* Top/equality axiomatization */ |
| 534 | Logger.write(topAxioms.mkString("\n"), "axiomatisation.dlog") | ||
| 535 | Logger.write(equalityAxioms.mkString("\n"), "axiomatisation.dlog") | ||
| 534 | RDFoxUtil.updateData(data, | 536 | RDFoxUtil.updateData(data, |
| 535 | s""" | 537 | s""" |
| 536 | INSERT { | 538 | INSERT { |
| @@ -543,7 +545,7 @@ class RSAOntology( | |||
| 543 | RDFoxUtil.updateData(data, | 545 | RDFoxUtil.updateData(data, |
| 544 | s""" | 546 | s""" |
| 545 | INSERT { | 547 | INSERT { |
| 546 | GRAPH ${RSAOntology.CanonGraph} { ?Z a ${RSA.NAMED} } | 548 | GRAPH ${RSAOntology.CanonGraph} { ?Z a ${IRI.THING} } |
| 547 | } WHERE { | 549 | } WHERE { |
| 548 | GRAPH ${RSAOntology.CanonGraph} { ?X ?Y ?Z }. | 550 | GRAPH ${RSAOntology.CanonGraph} { ?X ?Y ?Z }. |
| 549 | FILTER( ?Y != a ) | 551 | FILTER( ?Y != a ) |
| @@ -551,8 +553,6 @@ class RSAOntology( | |||
| 551 | """ | 553 | """ |
| 552 | ) | 554 | ) |
| 553 | RDFoxUtil.addRules(data, topAxioms ++ equalityAxioms) | 555 | RDFoxUtil.addRules(data, topAxioms ++ equalityAxioms) |
| 554 | Logger.write(topAxioms.mkString("\n"), "axiomatisation.dlog") | ||
| 555 | Logger.write(equalityAxioms.mkString("\n"), "axiomatisation.dlog") | ||
| 556 | 556 | ||
| 557 | /* Introduce `rsacomb:Named` concept */ | 557 | /* Introduce `rsacomb:Named` concept */ |
| 558 | /* From data */ | 558 | /* From data */ |
| @@ -567,9 +567,9 @@ class RSAOntology( | |||
| 567 | ) | 567 | ) |
| 568 | /* From ontology */ | 568 | /* From ontology */ |
| 569 | val named = individuals.map(RSA.Named(RSAOntology.CanonGraph)(_)) | 569 | val named = individuals.map(RSA.Named(RSAOntology.CanonGraph)(_)) |
| 570 | RDFoxUtil.addFacts(data, RSAOntology.CanonGraph, named) | ||
| 571 | if (! named.isEmpty) | 570 | if (! named.isEmpty) |
| 572 | Logger.write(named.mkString("", ".\n", ".\n"), "canonical_model.dlog") | 571 | Logger.write(named.mkString("", ".\n", ".\n"), "canonical_model.dlog") |
| 572 | RDFoxUtil.addFacts(data, RSAOntology.CanonGraph, named) | ||
| 573 | 573 | ||
| 574 | /* Add canonical model */ | 574 | /* Add canonical model */ |
| 575 | Logger print s"Canonical model facts: ${this.canonicalModel.facts.length}" | 575 | Logger print s"Canonical model facts: ${this.canonicalModel.facts.length}" |
