Georgetown-IR-Lab / QuickUMLS

System for Medical Concept Extraction and Linking
MIT License
369 stars 95 forks source link

Add option to disable lowercase conversion of all uppercase words. #48

Closed sandertan closed 5 years ago

sandertan commented 5 years ago

Hi @soldni thanks for maintaining this tool. I made a small change for my local installation, and thought it would perhaps be useful for others as well.

I ran into an issue when all characters of a medical term were in uppercase. By default, QuickUMLS would convert this term to lowercase. This would then make it difficult to distinguish between the normal word, and the original term in uppercase. For example, the acronym MAP for microtubule-associated proteins would be converted to map. I added an argument to disable this conversion, resulting in that MAP can be more easily identified as microtubule-associated proteins and is not confused with the word map.

The added functionality would only work when the database is installed without the -L option.

soldni commented 5 years ago

Thank you for this pull request, @sandertan! Can I ask you to add a simple check in the __init__ method that verified that self.to_lowercase_flag is not set to true, and raise an error otherwise?

sandertan commented 5 years ago

@soldni Done!