Query sparql without reasoner

Posted by Hamico on
URL: http://owlready.306.s1.nabble.com/Query-sparql-without-reasoner-tp1136.html

Hi Jiba,
Is it possible to execute sparql query without reasoner? What’s happen if i don’t write the istruction sync_reasoner()? It is necessary to have:
closed_world(onto) to close full ontology
or
closed_world(class) to close class, subclasses and individual istances

without closing relations to accelerate the activity and the execution of the reasoner? The ontology has a size of 20 MB.

When I close the ontology, I have the following error:


Traceback (most recent call last):
  File "C:/Users/hamico/PycharmProjects/App/Parte14/ClosedWorld.py", line 7, in <module>
    onto.save(file="onto2.owl", format="rdfxml")
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\namespace.py", line 809, in save
    self.graph.save(file, format, **kargs)
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\driver.py", line 218, in save
    _save(f, format, self, **kargs)
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\driver.py", line 482, in _save
    f.write( """\n""".join(flatten(sum(lines, []))).encode("utf8"))
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\driver.py", line 469, in flatten
    if isinstance(i, list): yield from flatten(i, deep + "    ")
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\driver.py", line 469, in flatten
    if isinstance(i, list): yield from flatten(i, deep + "    ")
  File "C:\Users\hamico\PycharmProjects\App\venv\lib\site-packages\owlready2\driver.py", line 469, in flatten
    if isinstance(i, list): yield from flatten(i, deep + "    ")
  [Previous line repeated 990 more times]
RecursionError: maximum recursion depth exceeded


Many thanks.
Best regards,
Hamico