ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1556321 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java
Date Tue, 07 Jan 2014 19:09:40 GMT
Author: dligach
Date: Tue Jan  7 19:09:40 2014
New Revision: 1556321

URL: http://svn.apache.org/r1556321
Log:
refactoring/removed unused imports

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java?rev=1556321&r1=1556320&r2=1556321&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java
Tue Jan  7 19:09:40 2014
@@ -32,7 +32,6 @@ import org.cleartk.classifier.feature.ex
 import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
 
 import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableMap;
 import com.google.common.io.Files;
 import com.google.common.io.LineProcessor;
 
@@ -42,8 +41,8 @@ public class DurationDistributionFeature
   public List<Feature> extract(JCas view, Annotation annotation) throws CleartkExtractorException
{ 
 
     List<Feature> features = new ArrayList<Feature>();
-    File durationLookup = new File("/Users/dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
-    String annotationText = annotation.getCoveredText().toLowerCase();
+    File durationLookup = new File("/Users/Dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
+    String eventText = annotation.getCoveredText().toLowerCase();
     
     Map<String, Map<String, Float>> textToDistribution = null;
     try {
@@ -53,7 +52,7 @@ public class DurationDistributionFeature
       return features;
     }
     
-    Map<String, Float> distribution = textToDistribution.get(annotationText);
+    Map<String, Float> distribution = textToDistribution.get(eventText);
     if(distribution == null) {
       features.add(new Feature("no_duration_info"));
     } else {



Mime
View raw message