incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1446398 - /incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
Date Thu, 14 Feb 2013 23:37:49 GMT
Author: stevenbethard
Date: Thu Feb 14 23:37:49 2013
New Revision: 1446398

URL: http://svn.apache.org/r1446398
Log:
Adds handling of HistoryOfModifier normalization

Modified:
    incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java

Modified: incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java?rev=1446398&r1=1446397&r2=1446398&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
(original)
+++ incubator/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
Thu Feb 14 23:37:49 2013
@@ -825,9 +825,20 @@ public class SHARPKnowtatorXMLReader ext
         idAnnotationMap.put(annotation.id, modifier);
 
       } else if ("historyOf_indicator_class".equals(annotation.type)) {
-        // TODO: where does this normalization go?
         String value = stringSlots.remove("historyOf_normalization");
         HistoryOfModifier modifier = new HistoryOfModifier(jCas, coveringSpan.begin, coveringSpan.end);
+        if (null == value) {
+          modifier.setIndicated(false);
+        } else if ("historyOf_present".equals(value)) {
+          modifier.setIndicated(true);
+        } else if ("historyOf_absent".equals(value)) {
+          modifier.setIndicated(false);
+        } else {
+          LOGGER.error(String.format(
+              "unrecognized history-of value \"%s\" on annotation with id \"%s\"",
+              value,
+              annotation.id));
+        }
         modifier.addToIndexes();
         idAnnotationMap.put(annotation.id, modifier);
 
@@ -1530,7 +1541,7 @@ public class SHARPKnowtatorXMLReader ext
         documentID.addToIndexes();
         engine.process(jCas);
         documentID.setDocumentID(textFile.getName());
-        xWriter.process(jCas); ///////////////////
+        //xWriter.process(jCas); ///////////////////
       }
     }
 



Mime
View raw message