owlapy 1.2.1
OWL Reasoners for Type Inference and Ontology Enrichment
With OWLAPI integration, we can enjoy owlapi in python.
For instance, OWL Reasoners like 'HermiT' and 'Pellet' can be easily used to infer missing type information.
from owlapy.owl_ontology_manager import OntologyManager
from owlapy.owlapi_adaptor import OWLAPIAdaptor
ontology_path = "KGs/Family/family-benchmark_rich_background.owl"
# Available OWL Reasoners: 'HermiT', 'Pellet', 'JFact', 'Openllet'
owlapi_adaptor = OWLAPIAdaptor(path=ontology_path, name_reasoner="Pellet")
onto = OntologyManager().load_ontology(ontology_path)
# Iterate over defined owl Classes in the signature
for i in onto.classes_in_signature():
# Performing type inference with Pellet
instances=owlapi_adaptor.instances(i,direct=False)
print(f"Class:{i}\t Num instances:{len(instances)}")
owlapi_adaptor.stopJVM()
What's Changed
- Merge to main v1.1.1 by @alkidbaci in #50
- infer_save() implemented to infer different types of axioms by @Demirrr in #52
- Owlapi adaptor changes and SyncReasoner update by @alkidbaci in #53
- Owl to sentence by @Demirrr in #56
- Added logo, bandages and more by @alkidbaci in #57
- Owlapy mapper extension and infer methods of adapter by @alkidbaci in #58
- Refactoring and Readme Update by @Demirrr in #59
- New Release 1.2.1 by @Demirrr in #61
Full Changelog: 1.1.1...1.2.1