ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1635527 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java
Date Thu, 30 Oct 2014 15:56:07 GMT
Author: tmill
Date: Thu Oct 30 15:56:07 2014
New Revision: 1635527

URL: http://svn.apache.org/r1635527
Log:
CTAKES-94: Removed feature referencing un-checked-in data file.

Modified:
    ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java?rev=1635527&r1=1635526&r2=1635527&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/UncertaintyCleartkAnalysisEngine.java
Thu Oct 30 15:56:07 2014
@@ -58,12 +58,13 @@ public class UncertaintyCleartkAnalysisE
 		}
 		this.entityFeatureExtractors.add(new ContextWordWindowExtractor("org/apache/ctakes/assertion/models/uncertainty.txt"));
 		this.entityFeatureExtractors.add(new UncertaintyFeatureExtractor());
-		try {
-      this.entityFeatureExtractors.add(new DependencyPathRegexpFeatureExtractor());
-    } catch (FileNotFoundException e) {
-      e.printStackTrace();
-      throw new ResourceInitializationException(e);
-    }
+		// TODO: Uncomment below when good features are found:
+//		try {
+//      this.entityFeatureExtractors.add(new DependencyPathRegexpFeatureExtractor());
+//    } catch (FileNotFoundException e) {
+//      e.printStackTrace();
+//      throw new ResourceInitializationException(e);
+//    }
 		
 		if(featConfig == STK_FRAGS){
 		  this.entityFeatureExtractors.add(new AboveLeftFragmentExtractor("AL_Unc", "org/apache/ctakes/assertion/models/jbi_paper_unc_seed_frags.txt"));
@@ -96,7 +97,6 @@ public class UncertaintyCleartkAnalysisE
 	        	return;
 	        }
 	        instance.setOutcome(uncertainty);
-//	        this.dataWriter.write(instance);
 	      } else
 	      {
 	        String label = this.classifier.classify(instance.getFeatures());
@@ -114,7 +114,6 @@ public class UncertaintyCleartkAnalysisE
 	
 	public static FeatureSelection<String> createFeatureSelection(double threshold) {
 		return new Chi2FeatureSelection<>(AssertionCleartkAnalysisEngine.FEATURE_SELECTION_NAME,
threshold, false);
-		//		  return new MutualInformationFeatureSelection<String>(AssertionCleartkAnalysisEngine.FEATURE_SELECTION_NAME);
 	}
 
 	public static URI createFeatureSelectionURI(File outputDirectoryName) {
@@ -127,14 +126,6 @@ public class UncertaintyCleartkAnalysisE
 	    	this.featureSelection = null;
 	    } else {
 	    	this.featureSelection = createFeatureSelection(this.featureSelectionThreshold);
-
-//	    	if ( (new File(this.featureSelectionURI)).exists() ) {
-//	    		try {
-//	    			this.featureSelection.load(this.featureSelectionURI);
-//	    		} catch (IOException e) {
-//	    			throw new ResourceInitializationException(e);
-//	    		}
-//	    	}
 	    }		
 	}
 	  



Mime
View raw message