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-tp144.html
Using protege, I have several object properties, all of which have inverses (ie object property 'contains' is the inverse of 'is_part_of'). When using SPARQL queries, I am only able to pull out the individuals in which 'contains' was asserted and not inferred.
Is there a way to pull out all the individuals, regardless whether the relationship was asserted or inferred? Using
http://owlready2.readthedocs.io/en/latest/reasoning.html hasn't helped so far. Code example below...
world = World()
world.get_ontology(filename).load()
sync_reasoner(world)
graph = world.as_rdflib_graph()
systems = "PREFIX base: <my_uri>" \
"SELECT ?system " \
"WHERE { " \
"?system base:contains ?something . " \
"}"
results = list(graph.query(attacked_systems))
Again, I need all asserted AND inferred individuals to be returned by the query. Is this possible?
Thanks in advance.
Tyler