AnthonyMRios / pymetamap

Python wraper for MetaMap
170 stars 61 forks source link

How to use commands for Human Readable and Negation Detection with wrapper #15

Closed MadisonJMyers closed 7 years ago

MadisonJMyers commented 7 years ago

Hi there,

For MetaMap I know that the commands for Human Readable output and Negation Detection are -I and -negex respectively. How would I implement this with the python wrapper? I looked through the code and did not see a command that addresses these two options.

Thanks!

AnthonyMRios commented 7 years ago

Hi,

For the -I option, I believe that just displays the CUI, right? If so, it is already available automatically in the cui field of the concept class. Also, I think negation is always displayed in the trigger field of the concept class if you are using the 2016 version of metamap. Check here for more information about the trigger field:

https://metamap.nlm.nih.gov/Docs/MMI_Output_2016.pdf

I can make some changes Monday if that does not answer your questions. If something is not being parsed correctly, then it should be able to be fixed in the Concept.py class. If a command is missing, then it should be possible to add it in SubprocessBackend.py. The caveat right now is that the command needs to be compatible with the MMI output format.