how to load the get_ontology("http://PYM/").load()?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to load the get_ontology("http://PYM/").load()?

Ftuhaifa
Hello;
I am trying to use owlready
 my code is



#owlready2 and pymed
from owlready2 import *
from owlready2.pymedtermino2 import *
from owlready2.pymedtermino2.umls import *

onto = get_ontology("http://test.org/onto.owl")
#load SNOMED CT in Python
#default_world.set_backend(filename = "pym.sqlite3")
import_umls("umls-2020AB-full.zip", terminologies = ["ICD10", "SNOMEDCT_US", "CUI"])
default_world.save()
PYM = get_ontology("http://PYM/").load()

SNOMEDCT_US = PYM["SNOMEDCT_US"]
#pip install owlready2

how ever I get error
TypeError: 'NoneType' object is not subscriptable about SNOMEDCT_US = PYM["SNOMEDCT_US"]

which indicate the snomedct is empty or the "http://PYM/" has not be loaded
what should I add to be able to call the snomed
?
Reply | Threaded
Open this post in threaded view
|

Re: how to load the get_ontology("http://PYM/").load()?

Jiba
Administrator
Hello,

I tried your code example, but it worked as expected.

I think you should first import UMLS in the quadstore in a local SQLite3 file, and then, in a second time, try to access it. In case of problem, you can check the content of the quadstore.

Jiba