Closed Zethson closed 1 year ago
I'd like to further point out that the result is: DOID:10608
(using MONDO atm). In other words, filtering only for MONDO ids may not be the right thing to do with the MONDO ontology. I'll need to check this out.
Thank you for raising it! I also really don't like that lookup is case-sensitive, maybe namedtuple isn't the ideal way to go (it was just the most lightweight implementation with autocompletion).
Need to look into more!
I found a good implementation! https://stackoverflow.com/a/32107024
I'd just switch to this one, it also perfectly avoided conversion to pythonic keys that doesn't allow special characters, because one can do both lookup.
and lookup[""]
!
The solution:
from jedi import settings
settings.case_insensitive_completion = True
I had data like
"Celiac disease"
and tried finding a match withbut I could not find any matches with
disease_bionty_lookup.Celiac[...]
. The actual match isdisease_bionty_lookup.celiac_disease
-> lower case. I know how the lookup is constructed, but is there any reasonable way to make the match easier? Sure, fuzzy matching would have found this super easily withcase_sensitive=False