incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1410435 - /incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext
Date Fri, 16 Nov 2012 16:29:49 GMT
Author: bleeker
Date: Fri Nov 16 16:29:48 2012
New Revision: 1410435

CMS commit to ctakes by bleeker

    incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext   (with

Added: incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext
--- incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext (added)
+++ incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext Fri Nov
16 16:29:48 2012
@@ -0,0 +1,112 @@
+Title:     cTAKES 2.6 NE Contexts
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+# cTAKES 2.6 - NE Contexts
+## Overview of NE Contexts
+As of cTAKES 2.6, NE Contexts is no longer a part of the default pipeline.
+Instead the newer [assertion](/display/VKC/cTAKES+2.6+-+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
+The context annotator provides a mechanism for examining the context of
+existing annotations, finding events of interest in the context, and acting on
+those events in some way. The negation and status annotators both take
+advantage of this infrastructure by examining the context of named entities
+(e.g. disorders and findings) to see if they should be considered as negated
+(e.g. "no chest pain") or if their status should be modified (e.g. "myocardial
+infarction" should have status "history of").
+In fact, the "negation annotator" is really just the context annotator
+configured to deal with negations. Similarly, the "status annotator" is the
+context annotator configured to identify the status of named entities.
+To better understand the context annotator code you should start by reading
+the Javadocs for the class 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
+What follows is an explanation of how negation is performed using the context
+### 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:
+  * MaxLeftScopeSize = 10 - The maximum number of annotations that will make up the left-hand
side context is ten. Increase or decrease this parameter setting to increase or decrease the
left hand side context.
+  * MaxRightScopeSize = 10 - The maximum number of annotations that will make up the right-hand
side context is ten. Increase or decrease this parameter setting to increase or decrease the
right-hand side context.
+  * ScopeOrder = LEFT, RIGHT - The context annotator will look for signs of negation on the
left-hand side of a named entity first and then the right-hand side.
+  * ContextAnalyzerClass = edu.mayo.bmi.uima.context.negation.NegationContextAnalyzer - The
context analyzer looks at the context (e.g. the 10 words on the left or right of the named
entity) and determines if the named entity should be negated. If it should, then the negation
context analyzer will generate a context hit to be consumed by the context hit consumer (see
+  * ContextHitConsumerClass = edu.mayo.bmi.uima.context.negation.NegationContextHitConsumer
- The context hit consumer handles context hits generated by the context analyzer. In this
case, the negation context hit consumer simply sets the certainty of a named entity to -1
which indicates that it has been negated.
+  * WindowAnnotationClass = edu.mayo.bmi.uima.core.type.textspan.Sentence - When the context
annotator collects the context annotations for a named entity, it will not look beyond the
boundaries of the sentence that the named entity is found in.
+  * FocusAnnotationClass = edu.mayo.bmi.uima.core.type.textsem.IdentifiedAnnotation - The
negation annotator is concerned with negating named entities and thus the focus annotation
type (the annotations for which a context is generated and examined) specifies the parent
of EventMention and of EntityMention classes.
+  * ContextAnnotationClass = edu.mayo.bmi.uima.common.type.BaseToken - The context of the
named entities is a list of tokens. This is what the context analyzer is going to examine.
+So, the work of negating a named entity is done by:
+  * finding negations by the NegationContextAnalyzer
+  * updating the status of NamedEntities by the NegationContextHitConsumer
+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:
+  * trial and error experimentation. or
+  * understanding how the NegationFSM works
+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.1, "Negation
+annotator" in the cTAKES documentation on SourceForge, examine the parameter
+settings given for desc/StatusAnnotator.xml, and look at
\ No newline at end of file

Propchange: incubator/ctakes/site/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.mdtext
    svn:eol-style = native

View raw message