ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1577204 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae: ./ feature/duration/
Date Thu, 13 Mar 2014 15:39:14 GMT
Author: dligach
Date: Thu Mar 13 15:39:14 2014
New Revision: 1577204

URL: http://svn.apache.org/r1577204
Log:
Moved pointer to duration distribution file to one place (Utils.java)

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventTimeRelationsInGold.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventsInGold.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationDistributionFeatureExtractor.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventEventFeatureExtractor.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventTimeFeatureExtractor.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationExpectationFeatureExtractor.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationTimeUnitFeatureExtractor.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/Utils.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventTimeRelationsInGold.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventTimeRelationsInGold.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventTimeRelationsInGold.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventTimeRelationsInGold.java
Thu Mar 13 15:39:14 2014
@@ -34,7 +34,7 @@ public class PreserveCertainEventTimeRel
   @Override                                                                             
                                    
   public void process(JCas jCas) throws AnalysisEngineProcessException {                
                                    
 
-    File durationLookup = new File("/Users/Dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
                     
+    File durationLookup = new File(Utils.durationDistributionPath);                     

     Map<String, Map<String, Float>> textToDistribution = null;              
                                                  
     try {                                                                               
                                      
       textToDistribution = Files.readLines(durationLookup, Charsets.UTF_8, new Callback());
                                   

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventsInGold.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventsInGold.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventsInGold.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/PreserveCertainEventsInGold.java
Thu Mar 13 15:39:14 2014
@@ -26,7 +26,7 @@ public class PreserveCertainEventsInGold
   @Override                                                                             
                                    
   public void process(JCas jCas) throws AnalysisEngineProcessException {                
                                    
 
-    File durationLookup = new File("/Users/Dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
                     
+    File durationLookup = new File(Utils.durationDistributionPath);                     

     Map<String, Map<String, Float>> textToDistribution = null;              
                                                  
     try {                                                                               
                                      
       textToDistribution = Files.readLines(durationLookup, Charsets.UTF_8, new Utils.Callback());
                                   

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=1577204&r1=1577203&r2=1577204&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
Thu Mar 13 15:39:14 2014
@@ -39,7 +39,7 @@ 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");
+    File durationLookup = new File(Utils.durationDistributionPath);
     String eventText = annotation.getCoveredText().toLowerCase();
     
     Map<String, Map<String, Float>> textToDistribution = null;

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventEventFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventEventFeatureExtractor.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventEventFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventEventFeatureExtractor.java
Thu Mar 13 15:39:14 2014
@@ -40,7 +40,7 @@ public class DurationEventEventFeatureEx
       throws AnalysisEngineProcessException {
 
     List<Feature> features = new ArrayList<Feature>();
-    File durationLookup = new File("/Users/dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
+    File durationLookup = new File(Utils.durationDistributionPath);
     String arg1text = arg1.getCoveredText().toLowerCase();
     String arg2text = arg2.getCoveredText().toLowerCase();
     

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventTimeFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventTimeFeatureExtractor.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventTimeFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationEventTimeFeatureExtractor.java
Thu Mar 13 15:39:14 2014
@@ -40,7 +40,7 @@ public class DurationEventTimeFeatureExt
       throws AnalysisEngineProcessException {
 
     List<Feature> features = new ArrayList<Feature>();
-    File durationLookup = new File("/Users/dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
+    File durationLookup = new File(Utils.durationDistributionPath);
     String eventText = arg1.getCoveredText().toLowerCase(); // event mention
     String timeText = arg2.getCoveredText().toLowerCase();  // time mention
     

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationExpectationFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationExpectationFeatureExtractor.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationExpectationFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationExpectationFeatureExtractor.java
Thu Mar 13 15:39:14 2014
@@ -39,7 +39,7 @@ public class DurationExpectationFeatureE
   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");
+    File durationLookup = new File(Utils.durationDistributionPath);
     String eventText = annotation.getCoveredText().toLowerCase();
     
     Map<String, Map<String, Float>> textToDistribution = null;

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationTimeUnitFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationTimeUnitFeatureExtractor.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationTimeUnitFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/DurationTimeUnitFeatureExtractor.java
Thu Mar 13 15:39:14 2014
@@ -50,7 +50,7 @@ public class DurationTimeUnitFeatureExtr
     String eventText = arg1.getCoveredText().toLowerCase(); // arg1 is an event
     String timeText = arg2.getCoveredText().toLowerCase();  // arg2 is a time mention
 
-    File durationLookup = new File("/Users/dima/Boston/Thyme/Duration/Output/Duration/distribution.txt");
+    File durationLookup = new File(Utils.durationDistributionPath);
     Map<String, Map<String, Float>> textToDistribution = null;
     try {
       textToDistribution = Files.readLines(durationLookup, Charsets.UTF_8, new Utils.Callback());

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/Utils.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/Utils.java?rev=1577204&r1=1577203&r2=1577204&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/Utils.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/duration/Utils.java
Thu Mar 13 15:39:14 2014
@@ -26,6 +26,8 @@ import com.google.common.io.LineProcesso
  */
 public class Utils {
 
+  public static final String durationDistributionPath = "/Users/dima/Boston/Thyme/Duration/Data/SignSymptom/Distribution/distribution.txt";
+  
   /**
    * Compute expected duration in seconds. Normalize by number of seconds in a year.
    */



Mime
View raw message