New to NLP

The ConText algorithm provides context -whether the event occurred (Negation: affirmed or negated), who experienced it (Experiencer: patient or other), and when it occurred (Temporality: historical, recent, not particular) - for a given event from a sentence. For example, in "patient has no family history of stroke", the algorithm would assert that the event "stroke" did not occur to the patient in the past by outputting the following values - Negation: negated, Experiencer: other, Temporality: historical. These assertions are generated based on the cues that surround the event. For instance, the presence of the term family and history within a few terms from the event stroke. The ConText algorithm can be extended identify other contexts such as severities e.g, significant or insignificant. Some ConText cues have translations for Swedish, German, and French.

System development has been supported over the years by several projects including: R01 LM009427-01 “NLP Foundational Studies and Ontologies for Syndromic Surveillance from ED Reports” and 1 K22 LM008301-01 “Natural Language Processing for Respiratory Surveillance.”, ShARe project, Vårdal Foundation, NIH grant 1R01LM010964, NLM Fellowship 5T15LM007059, Interlock project, and the Stockholm University Academic Initiative

Know NLP

ConText is based on a negation algorithm called NegEx. ConText's input is a sentence with indexed clinical conditions; ConText's output for each indexed condition is the value for contextual features or modifiers. The initial versions of ConText determines values for three modifiers - Negation: affirmed or negated. Temporality: recent, historical, or hypothetical. Experiencer: patient or other.

A newer version (pyConText) is more extensible and can have user-defined modifiers, One project involving radiology reports added the following modifiers: Uncertainty: certain or uncertain. Quality of radiologic exam: limited or not limited. Severity: critical or non-critical. Sidedness: right or left as well as others.

The google code site contains java and python versions of ConText and NegEx, links to papers describing and evaluating the algorithms, a description of the algorithm (including a list of the trigger terms used for each type of modifier), and a dataset of 120 reports of six types with manually-assigned values to the three modifiers in the original version of ConText. Some ConText trigger terms have translations for Swedish, German, and French.


Wendy Chapman

Henk Harkema

Brian Chapman

David Chu

Associated Institutions

University of Pittsburgh

University of California San Diego

University of Utah


Minimum Requirements



Resource URLs

NLP Task Performed

Information Extraction

Programming Languages


Related Publications

Chapman WW, Bridewell W, Hanbury P, Cooper GF, Buchanan BG. A simple algorithm for identifying negated findings and diseases in discharge summaries. J Biomed Inform. Oct 2001;34(5):301-310.

Chu D. Clinical feature extraction from emergency department reports for biosurveillance [Master's Thesis]. Pittsburgh: Department of Biomedical Informatics, University of Pittsburgh; 2007.

Chapman WW, Chu D, Dowling JN. ConText: An algorithm for identifying contextual features from clinical text. Paper presented at: BioNLP Workshop of the Association for Computational Linguistics; June 29, 2007, 2007; Prague, Czech Republic.

Harkema H, Dowling JN, Thornblade T, Chapman WW. Context: An Algorithm For Determining Negation, Experiencer, And Temporal Status From Clinical Reports. J Biomed Inform. 2009 Oct;42(5). 839-51.

Use Cases

Assertion Classification of Syndromes for Biosurveillance


Chu D, Dowling JN, Chapman WW. Evaluating the effectiveness of four contextual features in classifying annotated clinical conditions in emergency department reports. AMIA Annu Symp Proc. 2006:141-45.

Document Types

120 Emergency Department reports

Sample Size

n=56 clinical conditions


Weighted kappa was 0.518 without temporality, experiencer, certainty, and negation features and 0.953 when using all of the features. Negation most improved accuracy most; certainty made the classification accuracy worse.