I am creating a graph using rdflib. I want to use some terms from a ".owl" file I have. How can I import this owl file as MyImportedTerminology
with rdflib, and access its terms, so that I can do something like this in the graph?
g.add((Thing, OWL.sameAs, MyImportedTerminology.OtherThing))
I tried out owlready2, specifically:
MyImportedTerminology = get_ontology("file:///path/to/owl/file.owl").load()
But I can't seem to use it directly. I get the error: Object MyImportedTerminology.OtherThing must be an rdflib term
Any help with this would be appreciated.