NLP Web Services Guide

NLP Programmatic Interface:

NCIBI has provided web service access to the NLP database that includes segmented sentences and named entity tags from documents in PubMed and PubMed Central (Open Access). Programmatic access may be useful for integrating NLP data into an analytic workflow or data pipeline.

Base URL:

URL Parameters:

PMID is the PubMed ID for a document.

PMCID is the PubMed Central ID for the document.

Tagger is the named entity tagger. Currently supports “NameTagger” tags.

Parser is the grammatical parser. Currently supports the “Stanford” parser.

Type specifies the output generated by the tagger or parser. For the "nametagger" tagger, the currently supported type is "gene." For the "stanford" parser, the currently supported type is "phrase."

Id is the canonical identifier for the named entity tag. “NameTagger” identifiers for the “Gene” type are Entrez Gene IDs.

Optional. Limit sets the maximum number of returned results; it defaults to 1000 if not set.

Optional. Tool is a string with no internal spaces that identifies the resource using the service. Inclusion of this parameter allows us to track usage of the service.

Optional. Email associates an email address with the request. Inclusion of this parameter allows us to contact users if there are problems or if the software interface changes.

Optional. Prints out author, journal, title, and date of publication when set to "all".

The following are valid parameter combinations:

pmid, pmcid, pmid & tagger & type, tagger & type & id, pmid & parser & type



The XML returned is divided into two sections. The “Request” section echos the input parameters and the values of unset parameters. The “Response” section holds the data from the query.

Sample Code For Retrieving and Parsing NCIBI NLP Data

The following four sample java files show how to interact with the NCIBI web service by querying for PMIDs, sentences, and named entity tags within documents. Samples 1-3 query the NCIBI-WS. Sample 4 shows a combined query to the NCIBI-WS and eUtils. Sample 5 shows a query combining eutils and three of NCIBI's web services: NLP, Gene2MeSH, and MiMI.

Sample 1 - Java, Perl
Sample 2 - Java, Perl
Sample 3 - Java, Perl
Sample 4 - Java
Sample 5 - Perl