owlcs / owlapi

OWL API main repository
821 stars 315 forks source link

Fixed two bugs regarding Semantic Module Extraction #1055

Closed mrnolte closed 2 years ago

mrnolte commented 2 years ago
  1. It was impossible to instantiate a SemanticLocalityEvaluator because localityClass != LocalityClass.BOTTOM || localityClass != LocalityClass.TOP always returns true. Yes, I'm dumb.

  2. Possible memory leak was adressed: SemanticLocalityEvaluator creates a reasoner over a new empty ontology to check for tautologies but did not dispose either because it did not knew when its lifecycle was over. For that, I added a method "dispose" both in SemanticLocalityEvaluator and in SemanticLocalityModuleExtractor that can be called externally. As a side note - is there a better way to create an empty ontology other than with an OWLOntologyManager that has to be notified when the ontology can be garbage collected (via remove())?