Please can somebody explain the results of the code below, and how I can re-zero the world as_rdflib_graph when used in a loop
from owlready2 import *
files = [
"
https://raw.githubusercontent.com/CompGuideRepository/CompGuide-Editor/master/Cguide.owl",
"
http://individual.utoronto.ca/hesham/Ontology/IPDFull.owl",
"
https://raw.githubusercontent.com/ayesha-banu79/Owl-Ontology/master/Library%20Ontology.owl"
]
for i in files:
new_world = owlready2.World()
onto_nw = new_world.get_ontology(i).load()
onto_dw = get_ontology(i).load()
len_onto_nw = len(onto_nw.get_triples())
len_onto_dw = len(onto_dw.get_triples())
graph_nw = new_world.as_rdflib_graph()
graph_dw = default_world.as_rdflib_graph()
len_graph_nw = len(graph_nw)
len_graph_dw = len(graph_dw)
print(i)
print(len_onto_dw, " : ", len_graph_dw, " : ",len_onto_nw, " : ", len_graph_nw)
print("- - "*40)
https://raw.githubusercontent.com/CompGuideRepository/CompGuide-Editor/master/Cguide.owl5075 : 5075 : 5075 : 5075
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://individual.utoronto.ca/hesham/Ontology/IPDFull.owl1734 : 8456 : 1734 : 3381
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
https://raw.githubusercontent.com/ayesha-banu79/Owl-Ontology/master/Library%20Ontology.owl406 : 8862 : 406 : 406
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Process finished with exit code 0