dice-group / owlapy

OWLAPY is a Python Framework for creating and manipulating OWL Ontologies.
MIT License
16 stars 1 forks source link

AttributeError in FastInstanceCheckerReasoner #44

Closed Demirrr closed 4 months ago

Demirrr commented 4 months ago
from ontolearn.knowledge_base import KnowledgeBase
from owlapy.owl_individual import OWLNamedIndividual
# (1) Initialize Triplestore
kb = KnowledgeBase(path="KGs/Family/family.nt")
print(kb.ontology) # Ontology(IRI('http://www.benchmark.org/family#',''), True)
print(kb.reasoner) # <owlapy.owl_reasoner.FastInstanceCheckerReasoner object at 0x7fde3074aca0>
for i in kb.reasoner.types(OWLNamedIndividual("http://example.com/father#stefan")):
    print(i)

throws AttributeError: 'NoneType' object has no attribute 'INDIRECT_is_a' because self._world[ind.str] returns None.

Demirrr commented 4 months ago

Input files are not matching. All is good :)