Strings are not escaped when searching for concepts in world via sqlite
first of all, thank you so much for providing API access to SNOMED-CT via owlready2!
I am using owlready2 v.0.44 and noticed that strings have to be escaped before running a search in the SNOMED-CT ontology.
For example searching with the exact string for the Fully Qualified Name for the concept "Electrocardiogram: no myocardial ischemia (finding)" returns an error.
Code to reproduce the error: # Load SNOMED-CT ontology
from owlready2 import *
default_world.set_backend(filename = "pym.sqlite3")
PYM = get_ontology("http://PYM/").load()
SNOMEDCT_US = PYM["SNOMEDCT_US"]
# Search for the concept
SNOMEDCT_US.search('Electrocardiogram: no myocardial ischemia (finding)')
Error message (my call is slightly different but works as the code above):
While most SNOMED-CT concepts probably don't have special characters, several do (e.g., N&V - Nausea and vomiting SCTID: 16932000 ).
I already tried escaping strings with the python module "re" and the re.escape method and also tried using the punctuation submodule from string (from string import punctuation) to get a list of characters to escape, but unfortunately just using those does not work, since for instance paranthesis should remain unescaped in the string - otherwise the concept "Electrocardiogram: no myocardial ischemia (finding)" could not be found.
It would be nice if the owlready2 package could somehow be adjusted to catch these escape errors.