I am building code using owlread the code has to go throw the text and converts the medical finding to SNOMED ct
import nltk
import pandas as pd
import numpy as np
from nltk.stem import PorterStemmer
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import CountVectorizer
from nltk.tokenize import RegexpTokenizer
from nltk.stem import WordNetLemmatizer
import spacy
from nltk.corpus import stopwords
from nltk.classify import SklearnClassifier
from wordcloud import WordCloud, STOPWORDS
from nltk.stem import WordNetLemmatizer
import string
#pip install spacy
from spacy.lemmatizer import Lemmatizer
from spacy.lookups import Lookups
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('wordnet')
import en_core_web_sm
#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"]
However I got error about SNOMEDCT_US = PYM["SNOMEDCT_US"] the error said TypeError: 'NoneType' object is not subscriptable
I think there is file missing that can identify the PYM["SNOMEDCT_US"] but still I cannot find it?
Thank you