Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Section
Column
width65%
Panel
titleContents of this Page
Table of Contents
minLevel2
Column
Include Page
CTAKES:Menu cTAKES 3.1 0 to IncludeCTAKES:
Menu cTAKES 3.1 0 to Include

Overview of NE Contexts (probable/possible, family history of, or history of) and (negated)

Note

As of cTAKES 2.5, NE Contexts is no longer a part of the default pipeline. Instead the newer assertion annotator is used to identify general attributes of EntityMentions (but not attributes specific to a single type of named entity such as the dosage attribute of a medication)

...

Tip

To better understand the context annotator code you should start by reading the Javadocs for the class edu.mayo.bmi.uima.context.ContextAnnotator.java. It provides a conceptual overview of how the code works.

Negation annotator

The negation detection annotator is a pattern-based (no MaxEnt models required/used) approach that uses finite state machines and is roughly based on the popular NegEX algorithm described in the cTAKES documentation on SourceForge introduced by Wendy Chapman (University of Pittsburgh)

What follows is an explanation of how negation is performed using the context annotator.

NegationAnnotator.xml

We will start by examining the descriptor file desc/NegationAnnotator.xml. It calls edu.mayo.bmi.uima.context.ContextAnnotator, instead of a "NegationAnnotator". In fact, there is no "negation annotator" analysis engine. We simply configure the ContextAnnotator for the task. Next we will discuss each of the parameter settings in turn:

...

The former is a pretty lightweight wrapper around another class which has all of the negation pattern finding logic, edu.mayo.bmi.fsm.machine.NegationFSM. If you want to update the pattern matching of negation detection, then you would do it in that class.

Updating Negex patterns

Updating the negation detection patterns will involve either:

...

The rules, patterns, words that identify negation are hard-coded into the class edu.mayo.bmi.fsm.machine.NegationFSM which is found in the core project. We would suggest starting off with the trial-and-error approach. For example, if you wanted to add "impossible" to the lexicon of negation words, then you could try adding it to the _negAdjectivesSet and test the behavior.

Status annotator

The way the status annotator works mirrors very closely how the negation annotator works. You are encouraged to read Section 4.9.1the above section, "Negation annotator" in the cTAKES documentation on SourceForge, examine the parameter settings given for desc/StatusAnnotator.xml, and look at edu.mayo.bmi.fsm.machine.StatusIndicatorFSM.