ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1588525 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java
Date Fri, 18 Apr 2014 17:36:53 GMT
Author: dligach
Date: Fri Apr 18 17:36:52 2014
New Revision: 1588525

URL: http://svn.apache.org/r1588525
Log:
output durations in days (instead of normalized seconds)

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java?rev=1588525&r1=1588524&r2=1588525&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/ComputeDurationStatistics.java
Fri Apr 18 17:36:52 2014
@@ -160,7 +160,7 @@ public class ComputeDurationStatistics {
         throw new AnalysisEngineProcessException(e);                                    
                                      
       }                                                                                 
                                                                                         
                                                             
 
-      // remove relations where one or both arguments have no duration data
+      // find event-time relations where both arguments have duration information
       for(BinaryTextRelation relation : Lists.newArrayList(JCasUtil.select(goldView, BinaryTextRelation.class)))
{            
         RelationArgument arg1 = relation.getArg1();                                     
                                       
         RelationArgument arg2 = relation.getArg2(); 
@@ -187,8 +187,8 @@ public class ComputeDurationStatistics {
           float timeExpectedDuration = Utils.expectedDuration(timeDistribution);
           String context = getTextBetweenAnnotations(goldView, arg1.getArgument(), arg2.getArgument());
           String out = String.format("%s|%.5f|%s|%.5f|%s\n", 
-              timeUnits.iterator().next(), timeExpectedDuration, 
-              eventText, eventExpectedDuration, context.length() < 80 ? context : "...");
+              timeUnits.iterator().next(), timeExpectedDuration * 3650, 
+              eventText, eventExpectedDuration * 3650, context.length() < 80 ? context
: "...");
           try {
             Files.append(out, new File(outputFile), Charsets.UTF_8);
           } catch (IOException e) {



Mime
View raw message