ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1632045 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/extractors/SurroundingExtractor.java
Date Wed, 15 Oct 2014 14:03:52 GMT
Author: tmill
Date: Wed Oct 15 14:03:51 2014
New Revision: 1632045

URL: http://svn.apache.org/r1632045
Log:
Remove references to zoner.

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

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/extractors/SurroundingExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/extractors/SurroundingExtractor.java?rev=1632045&r1=1632044&r2=1632045&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/extractors/SurroundingExtractor.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/medfacts/cleartk/extractors/SurroundingExtractor.java
Wed Oct 15 14:03:51 2014
@@ -17,13 +17,12 @@
  * under the License.
  */
 package org.apache.ctakes.assertion.medfacts.cleartk.extractors;
-
+//
 import java.util.ArrayList;
-import java.util.Collection;
+//import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ctakes.assertion.zoner.types.Zone;
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
 import org.apache.log4j.Logger;
 import org.apache.uima.fit.util.JCasUtil;
@@ -35,47 +34,47 @@ import org.cleartk.ml.feature.extractor.
 
 public class SurroundingExtractor implements FeatureExtractor1
 {
-	protected static final Logger logger = Logger.getLogger(SurroundingExtractor.class);
-	
-//	Class<? extends Annotation> ancestorAnnotationClass;
+//	protected static final Logger logger = Logger.getLogger(SurroundingExtractor.class);
 //	
-//	public SurroundingExtractor(Class<? extends Annotation> ancestorAnnotationClass)
-//	{
-//		this.ancestorAnnotationClass = ancestorAnnotationClass;
-//	}
-
+////	Class<? extends Annotation> ancestorAnnotationClass;
+////	
+////	public SurroundingExtractor(Class<? extends Annotation> ancestorAnnotationClass)
+////	{
+////		this.ancestorAnnotationClass = ancestorAnnotationClass;
+////	}
+//
 	@Override
 	public List<Feature> extract(JCas jcas, Annotation targetAnnotation)
 			throws CleartkExtractorException
 	{
-		logger.info("SurroundingExtractor.extract() BEGIN");
-		//JCasUtil.indexCovering(jcas, IdentifiedAnnotation.class, this.ancestorAnnotationClass)
-		
-		Map<IdentifiedAnnotation, Collection<Zone>> coveringMap =
-			JCasUtil.indexCovering(jcas, IdentifiedAnnotation.class, Zone.class);
-		
-		IdentifiedAnnotation targetEntityAnnotation = (IdentifiedAnnotation)targetAnnotation;
-		
-		Collection<Zone> zoneList = coveringMap.get(targetEntityAnnotation);
-		
-		if (zoneList == null || zoneList.isEmpty())
-		{
-			//return null;
-			logger.info("SurroundingExtractor.extract() early END (no zones)");
-			new ArrayList<Feature>();
-		}
-		
+//		logger.info("SurroundingExtractor.extract() BEGIN");
+//		//JCasUtil.indexCovering(jcas, IdentifiedAnnotation.class, this.ancestorAnnotationClass)
+//		
+//		Map<IdentifiedAnnotation, Collection<Zone>> coveringMap =
+//			JCasUtil.indexCovering(jcas, IdentifiedAnnotation.class, Zone.class);
+//		
+//		IdentifiedAnnotation targetEntityAnnotation = (IdentifiedAnnotation)targetAnnotation;
+//		
+//		Collection<Zone> zoneList = coveringMap.get(targetEntityAnnotation);
+//		
+//		if (zoneList == null || zoneList.isEmpty())
+//		{
+//			//return null;
+//			logger.info("SurroundingExtractor.extract() early END (no zones)");
+//			new ArrayList<Feature>();
+//		}
+//		
 		ArrayList<Feature> featureList = new ArrayList<Feature>();
-		for (Zone zone : zoneList)
-		{
-			Feature currentFeature = new Feature("zone", zone.getLabel());
-			logger.info(String.format("zone: %s", zone.getLabel()));
-			logger.info(String.format("zone feature: %s", currentFeature.toString()));
-			featureList.add(currentFeature);
-		}
-		
-		logger.debug("SurroundingExtractor.extract() END");
+//		for (Zone zone : zoneList)
+//		{
+//			Feature currentFeature = new Feature("zone", zone.getLabel());
+//			logger.info(String.format("zone: %s", zone.getLabel()));
+//			logger.info(String.format("zone feature: %s", currentFeature.toString()));
+//			featureList.add(currentFeature);
+//		}
+//		
+//		logger.debug("SurroundingExtractor.extract() END");
 		return featureList;
 	}
-
+//
 }



Mime
View raw message