ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1635137 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/SubjectCleartkAnalysisEngine.java
Date Wed, 29 Oct 2014 14:00:54 GMT
Author: tmill
Date: Wed Oct 29 14:00:53 2014
New Revision: 1635137

URL: http://svn.apache.org/r1635137
Log:
CTAKES-94: Remove commented-out code from subject classes.

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

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/SubjectCleartkAnalysisEngine.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/SubjectCleartkAnalysisEngine.java?rev=1635137&r1=1635136&r2=1635137&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/SubjectCleartkAnalysisEngine.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/SubjectCleartkAnalysisEngine.java
Wed Oct 29 14:00:53 2014
@@ -45,24 +45,13 @@ public class SubjectCleartkAnalysisEngin
 			throw new IllegalArgumentException(PARAM_GOLD_VIEW_NAME + " must be defined during training");
 		}
 		
-//		if (USE_DEFAULT_EXTRACTORS) {
-//		} else {
-			initialize_subject_extractor();
-//		}
-			initializeFeatureSelection();
+		initialize_subject_extractor();
+		initializeFeatureSelection();
 
 	}
 
 
 	private void initialize_subject_extractor() {
-		
-//		if (this.contextFeatureExtractors==null) {
-//			this.contextFeatureExtractors = new ArrayList<CleartkExtractor>();
-//		}
-//		this.contextFeatureExtractors.add( 
-//				new CleartkExtractor(
-//						IdentifiedAnnotation.class, new SubjectFeaturesExtractor()) );
-				
 		this.entityFeatureExtractors.add( new SubjectFeaturesExtractor());
 	}
 	
@@ -79,11 +68,9 @@ public class SubjectCleartkAnalysisEngin
 	        	return;
 	        }
 	        instance.setOutcome(subj);
-//	        this.dataWriter.write(instance);
 	        logger.log(Level.DEBUG,  String.format("[%s] expected: ''; actual: ''; features:
%s",
 		      		  this.getClass().getSimpleName(),
 		      		  instance.toString()
-		      		  //StringUtils.join(instance.getFeatures(), ", ")
 		      		  ));
 	      } else
 	      {
@@ -94,7 +81,6 @@ public class SubjectCleartkAnalysisEngin
 	}
 	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) {
@@ -107,14 +93,6 @@ public class SubjectCleartkAnalysisEngin
 	    	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