Contact Us Copyright Privacy Accessibility Freedom of Information Act

Introduction

This client provides a reference implementation of a client for MetaMapLite ReSTful service at https://ii-public1.nlm.nih.gov/metamaplite/rest/annotate .

Where to get the ReST Client

The MetaMapLite ReST client is available at: https://metamap.nlm.nih.gov/download/metamaplite/mmlrestclient.py

Available document input and result output formats

Document Input Formats

freetext
Unstructured text
sli
Single Line Delimited Input
sldiwi
Single Line Delimited Input with ID: Each line contains id and text separated by a separator (pipe) symbol
pubmed
PubMed XML document format
medline
Medline document format

Result Output Formats

brat
Brat Standoff format
mmi
MetaMap Indexing
full
piped separated representation
json
json representation of full format
cui
list UMLS concept identifiers found

Example of use

Example of input with docformat sldiwi and output mmi:

Txt001|Written informed consent.
Txt002|Age 18 years or older.
Txt003|informed consent.
Txt004|Male or female.

The client is invoked like this when specifying document format sldiwi and result format mmi:

python mmlrestclient.py \
    https://ii-public1.nlm.nih.gov/metamaplite/rest/annotate \
    inputfile \
    --output outputfile \
    --docformat sldiwi \
    --resultformat mmi

Output looks like this with mmi :

Txt004|MMI|1.38|Female Phenotype|C1705498|[qlco]|"Female"-text-0-"female"-NN-0|8/6|x.x.x
Txt004|MMI|1.38|Female, Self-Report|C1705497|[qlco]|"Female"-text-0-"female"-NN-0|8/6|x.x.x
Txt004|MMI|1.38|Females|C0086287|[orga]|"Female"-text-0-"female"-NN-0|8/6|x.x.x
Txt004|MMI|1.38|Male Gender, Self Report|C1706180|[qlco]|"Male"-text-0-"Male"-NN-0|0/4|x.x.x
Txt004|MMI|1.38|Male Phenotype|C1706428|[qlco]|"Male"-text-0-"Male"-NN-0|0/4|x.x.x
Txt004|MMI|1.38|Male, Self-Reported|C1706429|[orga]|"Male"-text-0-"Male"-NN-0|0/4|x.x.x
Txt004|MMI|1.38|Males|C0086582|[orga]|"Male"-text-0-"Male"-NN-0|0/4|x.x.x
Txt004|MMI|1.38|Woman|C0043210|[popg]|"female"-text-0-"female"-NN-0|8/6|x.x.x
Txt003|MMI|9.21|Informed Consent|C0021430|[rnlw]|"Informed Consent"-text-0-"informed consent"-JJ-0|0/16|I01.880.604.473.650.718;I01.880.604.583.427;N03.706.437.650.312;N03.706.535.489
Txt002|MMI|0.46|Age|C0001779|[orga]|"Age"-text-0-"Age"-NNP-0|0/3|
Txt002|MMI|0.46|Age:Time:Point in time:^Patient:Quantitative|C1114365|[clna]|"Age"-text-0-"Age"-NNP-0|0/3|
Txt002|MMI|0.46|year|C0439234|[tmco]|"years"-text-0-"years"-NNS-0|7/5|
Txt001|MMI|0.46|ActClass - consent|C1554192|[idcn]|"consent"-text-0-"consent"-NN-0|17/7|
Txt001|MMI|0.46|Consent|C1511481|[ftcn]|"Consent"-text-0-"consent"-NN-0|17/7|
Txt001|MMI|0.46|Consent:Finding:Point in time:{Setting}:Document:Patient|C2923685|[clna]|"Consent"-text-0-"consent"-NN-0|17/7|
Txt001|MMI|0.46|Written - Consent Mode|C1547186|[idcn]|"Written"-text-0-"Written"-NNP-0|0/7|
Txt001|MMI|0.46|written - ParticipationMode|C1576874|[ftcn]|"written"-text-0-"Written"-NNP-0|0/7|




This document was generated using AFT v5.098