incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1424153 - in /incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal: ae/EventAnnotator.java ae/feature/SRLExtractor.java ae/feature/selection/Chi2NeighborFSExtractor.java eval/Evaluation_ImplBase.java
Date Wed, 19 Dec 2012 21:46:35 GMT
Author: stevenbethard
Date: Wed Dec 19 21:46:35 2012
New Revision: 1424153

URL: http://svn.apache.org/viewvc?rev=1424153&view=rev
Log:
(Re-)fixes various warnings in ctakes-temporal

Modified:
    incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java
    incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/SRLExtractor.java
    incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/selection/Chi2NeighborFSExtractor.java
    incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java

Modified: incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java?rev=1424153&r1=1424152&r2=1424153&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java
(original)
+++ incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java
Wed Dec 19 21:46:35 2012
@@ -62,7 +62,8 @@ import org.cleartk.classifier.feature.ex
 import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
 import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
 import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.JarClassifierFactory;
+import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
+import org.cleartk.classifier.jar.GenericJarClassifierFactory;
 import org.uimafit.factory.AnalysisEngineFactory;
 import org.uimafit.factory.ConfigurationParameterFactory;
 import org.uimafit.descriptor.ConfigurationParameter;
@@ -102,7 +103,7 @@ public class EventAnnotator extends Clea
         true,
         DefaultDataWriterFactory.PARAM_DATA_WRITER_CLASS_NAME,
         dataWriterName,
-        DefaultDataWriterFactory.PARAM_OUTPUT_DIRECTORY,
+        DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY,
         outputDirectory,
         EventAnnotator.PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE,
         downratio,
@@ -116,7 +117,7 @@ public class EventAnnotator extends Clea
         EventAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
-        JarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
+        GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
         new File(modelDirectory, "model.jar"));
 	 ConfigurationParameterFactory.addConfigurationParameter(
 		fsEventAnnotator,	

Modified: incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/SRLExtractor.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/SRLExtractor.java?rev=1424153&r1=1424152&r2=1424153&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/SRLExtractor.java
(original)
+++ incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/SRLExtractor.java
Wed Dec 19 21:46:35 2012
@@ -19,7 +19,6 @@
 package org.apache.ctakes.temporal.ae.feature;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.ctakes.typesystem.type.syntax.BaseToken;

Modified: incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/selection/Chi2NeighborFSExtractor.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/selection/Chi2NeighborFSExtractor.java?rev=1424153&r1=1424152&r2=1424153&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/selection/Chi2NeighborFSExtractor.java
(original)
+++ incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/selection/Chi2NeighborFSExtractor.java
Wed Dec 19 21:46:35 2012
@@ -15,7 +15,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ctakes.temporal.ae.feature.selection.Chi2NeighborFSExtractor.Chi2Evaluator.ComputeFeatureScore;
-import org.apache.ctakes.typesystem.type.syntax.BaseToken;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.cleartk.classifier.Feature;
@@ -429,8 +428,8 @@ public class Chi2NeighborFSExtractor<OUT
             int begin = Math.max(tokenIndex - window, 0);
             int end = Math.min(tokenIndex + window, tokenEntityTags.size());
             for (int i = begin; i < end; ++i) {
-              String name = String.format("EntityTag_%d_%d", typeID, i - begin);
-              extracted.add(new Feature(name, tokenEntityTags.get(i)));
+              String featureName = String.format("EntityTag_%d_%d", typeID, i - begin);
+              extracted.add(new Feature(featureName, tokenEntityTags.get(i)));
             }
           }
 		if (this.isTrained){

Modified: incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1424153&r1=1424152&r2=1424153&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
(original)
+++ incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Wed Dec 19 21:46:35 2012
@@ -70,7 +70,7 @@ public abstract class Evaluation_ImplBas
 
   public enum AnnotatorType {
     PART_OF_SPEECH_TAGS, UMLS_NAMED_ENTITIES, LEXICAL_VARIANTS, DEPENDENCIES, SEMANTIC_ROLES
-  };
+  }
 
   protected final String GOLD_VIEW_NAME = "GoldView";
 
@@ -118,9 +118,9 @@ public abstract class Evaluation_ImplBas
   }
 
   @Override
-  protected CollectionReader getCollectionReader(List<Integer> patientSets) throws
Exception {
+  protected CollectionReader getCollectionReader(List<Integer> selectedPatientSets)
throws Exception {
     List<File> files = new ArrayList<File>();
-    for (Integer set : patientSets) {
+    for (Integer set : selectedPatientSets) {
       File setTextDirectory = new File(this.rawTextDirectory, "doc" + set);
       for (File file : setTextDirectory.listFiles()) {
         files.add(file);
@@ -143,7 +143,7 @@ public abstract class Evaluation_ImplBas
 
   private static enum PipelineType {
     TRAIN, TEST
-  };
+  }
 
   private AnalysisEngineDescription getPreprocessorDescription(PipelineType pipelineType)
       throws Exception {



Mime
View raw message