From 97b870ba0a3ada34a7f6c65a330290dd867903e9 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Mon, 1 Jul 2024 11:53:14 -0400 Subject: [PATCH] Add script for counting Abox axioms. --- scala/abox-axioms.sc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scala/abox-axioms.sc diff --git a/scala/abox-axioms.sc b/scala/abox-axioms.sc new file mode 100644 index 0000000..9f6bdc4 --- /dev/null +++ b/scala/abox-axioms.sc @@ -0,0 +1,15 @@ +//> using scala "2.13" +//> using dep "net.sourceforge.owlapi:owlapi-distribution:4.5.29" + +import org.semanticweb.owlapi.model.parameters.Imports +import org.semanticweb.owlapi.apibinding.OWLManager +import java.io.File + +val modelsFolder = args(0) +val manager = OWLManager.createOWLOntologyManager() +val models = new File(modelsFolder) + .listFiles() + .foreach { file => + val model = manager.loadOntologyFromOntologyDocument(file) + println(model.getLogicalAxiomCount(Imports.EXCLUDED)) + }