Re: Accessing inferences and asserstions rather than just assertions
Posted by
tyler on
URL: http://owlready.306.s1.nabble.com/Accessing-inferences-and-asserstions-rather-than-just-assertions-tp144p147.html
Our examples look nearly identical, yet I am still unable to get inferred results.....
world = World()
world.get_ontology(self.filename).load()
sync_reasoner(world)
graph = world.as_rdflib_graph()
attacked_systems = "PREFIX ont: <
http://www.semanticweb.org/tyler/ontologies/2018/0/untitled-ontology-14#>" \
"SELECT * " \
"WHERE { " \
"?system ont:contains ?component ." \
"?component ont:entered ?effect ." \
"}"
results = list(graph.query(attacked_systems))
for item in results:
print(item)
Any idea on what's going on? Anything I'm not doing? What could be causing this?
- I have shut down and closed protege while running this script
- the ontology is type rdf/xml
- owlready2 is running HermiT
- do I need to run the reasoner multiple times?
Thanks for the help