Closed Demirrr closed 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.
AttributeError: 'NoneType' object has no attribute 'INDIRECT_is_a'
self._world[ind.str]
None
Input files are not matching. All is good :)
throws
AttributeError: 'NoneType' object has no attribute 'INDIRECT_is_a'
becauseself._world[ind.str]
returnsNone
.