From 155f04db8138d62b3abc2eb777b8453560bbb594 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Mon, 29 Nov 2021 15:02:15 +0000 Subject: Fix bug in normalisation This would not produce a completely normalised ontology. --- .../scala/uk/ac/ox/cs/rsacomb/approximation/Lowerbound.scala | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/approximation') 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) import uk.ac.ox.cs.rsacomb.implicits.RDFox._ /** Main entry point for the approximation algorithm */ - def approximate(ontology: Ontology): RSAOntology = - toRSA( - new Ontology( - ontology.origin, - ontology.axioms filter inALCHOIQ flatMap shift, - ontology.datafiles - ) - ) + def approximate(ontology: Ontology): RSAOntology = { + val axioms = ontology.axioms filter inALCHOIQ flatMap shift + toRSA(new Ontology(ontology.origin, axioms, ontology.datafiles)) + } /** Discards all axioms outside ALCHOIQ */ private def inALCHOIQ(axiom: OWLLogicalAxiom): Boolean = -- cgit v1.2.3