LHNCBC / metamaplite

A near real-time named-entity recognizer
https://metamap.nlm.nih.gov/MetaMapLite.shtml
Other
55 stars 14 forks source link

--chemdnersldi option not available #7

Open kaushikacharya opened 5 years ago

kaushikacharya commented 5 years ago

./metamaplite.sh --chemdnersldi input_file.txt

This returns

unknown option: --chemdnersldi

Content of input_file.txt

1|'Heart Attack' 2|'John had a huge heart attack'

Update: After going through the source code: https://github.com/lhncbc/metamaplite/blob/master/src/main/java/gov/nih/nlm/nls/ner/MetaMapLite.java

found that I should be using the command: ./metamaplite.sh --inputformat=sldiwi input_file.txt

I was wrong in assuming that I should be using chemdnersldi. SingleLineDelimitedInputWithID should be the document input format.

kaushikacharya commented 5 years ago

@willjrogers For the above two sentences in input file, following is the output:

ConceptLiteMMI(index='1', mm='MMI', score='0.52', preferred_name='Attack behavior', cui='C1261512', semtypes='[socb]', trigger='"attack"-text-0-"Attack"-NNP-0', pos_info='7/6', tree_codes='')
ConceptLiteMMI(index='1', mm='MMI', score='0.52', preferred_name='Observation of attack', cui='C1304680', semtypes='[fndg]', trigger='"Attack"-text-0-"Attack"-NNP-0', pos_info='7/6', tree_codes='')
ConceptLiteMMI(index='1', mm='MMI', score='0.52', preferred_name='Onset of illness', cui='C0277793', semtypes='[tmco]', trigger='"Attack"-text-0-"Attack"-NNP-0', pos_info='7/6', tree_codes='')
ConceptLiteMMI(index='2', mm='MMI', score='3.75', preferred_name='Myocardial Infarction', cui='C0027051', semtypes='[dsyn]', trigger='"Heart Attack"-text-0-"heart attack"-NN-0', pos_info='17/12', tree_codes='C14.280.647.500;C14.907.585.500')

Sentence 1 fails to give the concept: 'Myocardial Infarction' This might be a bug in MetaMapLite.