owlcs / owlapi

OWL API main repository
821 stars 315 forks source link

an error of SemanticLocalityModuleExtractor #1057

Closed TiAmoBi closed 2 years ago

TiAmoBi commented 2 years ago

Hi,when I use SemanticLocalityModuleExtractor, I get an error: Exception in thread "main" java.lang.IllegalArgumentException: The given locality class must be one of BOTTOM or TOP. When I debugged, I found such a judgment in the SemanticLocalityEvaluator: if (localityClass != LocalityClass.BOTTOM || localityClass != LocalityClass.TOP) { throw new IllegalArgumentException( "The given locality class must be one of BOTTOM or TOP"); } , I don't quite understand why localityClass needs to have two parameters. Below is the line of code I wrote. SemanticLocalityModuleExtractor see = new SemanticLocalityModuleExtractor(LocalityClass.BOTTOM,s,owlOntologyManager,structuralReasonerFactory); Stream<OWLAxiom> owlAxiomSet = see.extract(stream); I am using version 5.1.19.Thanks for your help.

ignazio1977 commented 2 years ago

This has just been fixed in https://github.com/owlcs/owlapi/pull/1055 and will be available in the next release