diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-11-29 15:02:15 +0000 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2021-11-29 15:02:15 +0000 |
commit | 155f04db8138d62b3abc2eb777b8453560bbb594 (patch) | |
tree | d60d06821a882cb173fe4faa195398267ddb462a /src/main/scala/uk/ac/ox/cs/rsacomb/approximation | |
parent | 9fc4643c2f7e0686364020e0d6f38b55c3cd3222 (diff) | |
download | RSAComb-155f04db8138d62b3abc2eb777b8453560bbb594.tar.gz RSAComb-155f04db8138d62b3abc2eb777b8453560bbb594.zip |
Fix bug in normalisation
This would not produce a completely normalised ontology.
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/approximation')
-rw-r--r-- | src/main/scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala index e261bce..3cc8fc3 100644 --- a/src/main/scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala +++ b/src/main/scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala | |||
@@ -48,14 +48,10 @@ class Lowerbound(implicit fresh: DataFactory) | |||
48 | import uk.ac.ox.cs.rsacomb.implicits.RDFox._ | 48 | import uk.ac.ox.cs.rsacomb.implicits.RDFox._ |
49 | 49 | ||
50 | /** Main entry point for the approximation algorithm */ | 50 | /** Main entry point for the approximation algorithm */ |
51 | def approximate(ontology: Ontology): RSAOntology = | 51 | def approximate(ontology: Ontology): RSAOntology = { |
52 | toRSA( | 52 | val axioms = ontology.axioms filter inALCHOIQ flatMap shift |
53 | new Ontology( | 53 | toRSA(new Ontology(ontology.origin, axioms, ontology.datafiles)) |
54 | ontology.origin, | 54 | } |
55 | ontology.axioms filter inALCHOIQ flatMap shift, | ||
56 | ontology.datafiles | ||
57 | ) | ||
58 | ) | ||
59 | 55 | ||
60 | /** Discards all axioms outside ALCHOIQ */ | 56 | /** Discards all axioms outside ALCHOIQ */ |
61 | private def inALCHOIQ(axiom: OWLLogicalAxiom): Boolean = | 57 | private def inALCHOIQ(axiom: OWLLogicalAxiom): Boolean = |