ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1581371 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java
Date Tue, 25 Mar 2014 15:26:05 GMT
Author: dligach
Date: Tue Mar 25 15:26:05 2014
New Revision: 1581371

URL: http://svn.apache.org/r1581371
Log:
added removing leading '\n' char (e.g. event 'height' contains one for some reason)

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java?rev=1581371&r1=1581370&r2=1581371&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/ExtractDurationsUsingContainsRelation.java
Tue Mar 25 15:26:05 2014
@@ -156,6 +156,9 @@ public class ExtractDurationsUsingContai
           continue; // not an event-time relation
         }    
 
+        // occasionally event text has a leading eol character
+        eventText = eventText.startsWith("\n") ? eventText.substring(1) : eventText; 
+        
         Set<TemporalUnit> units = Utils.normalize(timeText);
         if(units == null) {
           continue;



Mime
View raw message