You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by bu...@apache.org on 2012/11/16 17:29:53 UTC

svn commit: r838594 - in /websites/staging/ctakes/trunk/content: ./ ctakes/2.6.0/ctakes-2.6-NE-Contexts.html

Author: buildbot
Date: Fri Nov 16 16:29:53 2012
New Revision: 838594

Log:
Staging update by buildbot for ctakes

Added:
    websites/staging/ctakes/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.html
Modified:
    websites/staging/ctakes/trunk/content/   (props changed)

Propchange: websites/staging/ctakes/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Nov 16 16:29:53 2012
@@ -1 +1 @@
-1410098
+1410435

Added: websites/staging/ctakes/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.html
==============================================================================
--- websites/staging/ctakes/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.html (added)
+++ websites/staging/ctakes/trunk/content/ctakes/2.6.0/ctakes-2.6-NE-Contexts.html Fri Nov 16 16:29:53 2012
@@ -0,0 +1,173 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+ 
+    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
+ 
+       http://www.apache.org/licenses/LICENSE- 2.0
+ 
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<link href="/ctakes/css/ctakes.css" rel="stylesheet" type="text/css">
+
+<title>cTAKES 2.6 NE Contexts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+</head>
+ 
+<body>
+ <div class="banner">
+      <div id="bannerleft">
+		<a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf_logo_wide.gif" alt="The Apache Software Foundation" border="0"/></a>
+	<br/>
+			<img alt="cTAKES logo" src="/ctakes/images/ctakes_logo.jpg" border="0"/>
+      </div>  
+    <div id="bannerright">	
+	      <img id="asf-logo" alt="Apache Incubator" src="http://incubator.apache.org/images/egg-logo.png" border="0"/></a>			
+	  </div>
+ </div>  
+  <div id="clear"></div>
+
+
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/ctakes/index.html">About</a></li>
+<li><a href="/ctakes/gettingstarted.html">Getting Started</a></li>
+<li><a href="/ctakes/downloads.html">Downloads</a></li>
+<li><a href="/ctakes/glossary.html">Glossary</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/ctakes/get-involved.html">Get Involved</a></li>
+<li><a href="https://issues.apache.org/jira/browse/ctakes">Bug Tracker</a></li>
+<li><a href="/ctakes/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/ctakes/people.html">People</a></li>
+<li><a href="http://incubator.apache.org/projects/ctakes.html">Incubator page</a></li>
+<li><a href="/ctakes/license.html">License</a></li>
+<li><a href="/ctakes/history.html">History</a></li>
+<li><a href="/ctakes/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="users">Users</h1>
+<ul>
+<li><a href="/ctakes/userguide.html">User Guide</a></li>
+<li><a href="/ctakes/user-faqs.html">User FAQs</a></li>
+</ul>
+<h1 id="developers">Developers</h1>
+<ul>
+<li><a href="/ctakes/developerguide.html">Developer Guide</a></li>
+<li><a href="/ctakes/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/ctakes/ppmc-faqs.html">PPMC FAQs</a></li>
+<li><a href="/ctakes/ctakes-release-guide.html">Release Guide</a> <br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
+    <h1 id="ctakes-26-ne-contexts">cTAKES 2.6 - NE Contexts</h1>
+<h2 id="overview-of-ne-contexts">Overview of NE Contexts</h2>
+<p><img alt="" src="/images/icons/emoticons/warning.png" /></p>
+<p><strong>Note</strong><br />
+</p>
+<p>As of cTAKES 2.6, NE Contexts is no longer a part of the default pipeline.
+Instead the newer <a href="/display/VKC/cTAKES+2.6+-+Assertion">assertion</a> 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)</p>
+<p>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").</p>
+<p>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.</p>
+<p><img alt="" src="/images/icons/emoticons/check.png" /></p>
+<p><strong>Tip</strong><br />
+</p>
+<p>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.</p>
+<h2 id="negation-annotator">Negation annotator</h2>
+<p>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 <a href="http://ohnlp.sourceforge.net/cTAKES/#ftn.id510479">NegEX algorithm described in the cTAKES documentation on
+SourceForge</a> introduced by
+<a href="http://www.dbmi.pitt.edu/chapman/NegEx.html">Wendy Chapman (University of
+Pittsburgh)</a></p>
+<p>What follows is an explanation of how negation is performed using the context
+annotator.</p>
+<h3 id="negationannotatorxml">NegationAnnotator.xml</h3>
+<p>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.</p>
+<p>Next we will discuss each of the parameter settings in turn:</p>
+<ul>
+<li>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.</li>
+<li>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.</li>
+<li>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.</li>
+<li>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.)</li>
+<li>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.</li>
+<li>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.</li>
+<li>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.</li>
+<li>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.</li>
+</ul>
+<p>So, the work of negating a named entity is done by:</p>
+<ul>
+<li>finding negations by the NegationContextAnalyzer</li>
+<li>updating the status of NamedEntities by the NegationContextHitConsumer</li>
+</ul>
+<p>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.</p>
+<h3 id="updating-negex-patterns">Updating Negex patterns</h3>
+<p>Updating the negation detection patterns will involve either:</p>
+<ul>
+<li>trial and error experimentation. or</li>
+<li>understanding how the NegationFSM works</li>
+</ul>
+<p>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.</p>
+<h2 id="status-annotator">Status annotator</h2>
+<p>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
+edu.mayo.bmi.fsm.machine.StatusIndicatorFSM.</p>
+  </div>
+ 
+ <div id="footera">
+    <div id="copyrighta">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+ </div>
+ 
+</body>
+</html>
+