ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james-mas...@apache.org
Subject svn commit: r1785157 - in /ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima: CreateZonerDescriptor.java ZoneAnnotator.java
Date Thu, 02 Mar 2017 16:21:57 GMT
Author: james-masanz
Date: Thu Mar  2 16:21:57 2017
New Revision: 1785157

URL: http://svn.apache.org/viewvc?rev=1785157&view=rev
Log:
remove unused imports and old commented-out code

Modified:
    ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/CreateZonerDescriptor.java
    ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/ZoneAnnotator.java

Modified: ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/CreateZonerDescriptor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/CreateZonerDescriptor.java?rev=1785157&r1=1785156&r2=1785157&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/CreateZonerDescriptor.java
(original)
+++ ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/CreateZonerDescriptor.java
Thu Mar  2 16:21:57 2017
@@ -20,16 +20,13 @@ package org.mitre.medfacts.uima;
 
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.apache.ctakes.core.ae.DocumentIdPrinterAnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.fit.factory.AggregateBuilder;
 import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.xml.sax.SAXException;
 
 public class CreateZonerDescriptor
 {

Modified: ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/ZoneAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/ZoneAnnotator.java?rev=1785157&r1=1785156&r2=1785157&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/ZoneAnnotator.java
(original)
+++ ctakes/trunk/ctakes-assertion-zoner/src/main/java/org/mitre/medfacts/uima/ZoneAnnotator.java
Thu Mar  2 16:21:57 2017
@@ -24,31 +24,20 @@ import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Iterator;
 import java.util.List;
-import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
 import org.apache.ctakes.assertion.zoner.types.Heading;
-import org.apache.ctakes.assertion.zoner.types.Subzone;
 import org.apache.ctakes.assertion.zoner.types.Zone;
 import org.apache.uima.UimaContext;
-//import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.jcas.JCas;
-import org.apache.uima.resource.DataResource;
-import org.apache.uima.resource.ResourceAccessException;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.SharedResourceObject;
 
-//import org.mitre.medfacts.zoner.*;
 import org.mitre.medfacts.zoner.ZonerCli;
 import org.mitre.medfacts.zoner.ZonerCli.HeadingRange;
 import org.mitre.medfacts.zoner.ZonerCli.Range;
-//import org.mitre.medfacts.zoner.ZonerCliSimplified;
-//import org.mitre.medfacts.zoner.ZonerCliSimplified.HeadingRange;
-//import org.mitre.medfacts.zoner.ZonerCliSimplified.Range;
 import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
 import org.apache.uima.fit.descriptor.ConfigurationParameter;
-import org.apache.uima.fit.descriptor.ExternalResource;
 import org.apache.uima.fit.descriptor.TypeCapability;
 
 @TypeCapability(outputs =
@@ -72,31 +61,17 @@ public class ZoneAnnotator extends JCasA
 
   protected final Logger logger = Logger.getLogger(ZoneAnnotator.class.getName());
 	
-	//private ZonerCliSimplified zonerCli;
-	
 	@Override
 	public void initialize (UimaContext aContext) throws ResourceInitializationException {
 		super.initialize(aContext);
-		// Create ZonerCli using the resource URI 
-//		URI uri;
-//		try {
-//			uri = getContext().getResourceURI(PARAM_SECTION_REGEX_FILE_NAME);
-//		} catch (ResourceAccessException e) {
-//			e.printStackTrace();
-//			throw new ResourceInitializationException(e);
-//		}
-		//zonerCli = new ZonerCliSimplified(sectionRegexFileUri);
-
 	}
 	
 	private int countOfIndexOutOfBounds = 0;
 
 	@Override
 	public void process(JCas jcas) throws AnalysisEngineProcessException {
-//	  ZonerCliSimplified zonerCli =
-//	      new ZonerCliSimplified(sectionRegexFileUri);
 	  
-	  System.out.println("sectionRegexFileUriString: " + sectionRegexFileUriString);
+	System.out.println("sectionRegexFileUriString: " + sectionRegexFileUriString);
     URL sectionRegexFileInClasspathUrl = 
         getClass().getClassLoader().getResource(sectionRegexFileUriString);
     System.out.println("sectionRegexFileInClasspathUrl: " + sectionRegexFileInClasspathUrl);
@@ -141,18 +116,6 @@ public class ZoneAnnotator extends JCasA
 		    logger.info(String.format("added new zone annotation [%d-%d] \"%s\"", zAnnot.getBegin(),
zAnnot.getEnd(), zAnnot.getCoveredText()));
 		}
 		
-//		List<Range> subsectionRangeList = zonerCli.getSubsections();
-//		for (Iterator<Range> i = subsectionRangeList.iterator(); i.hasNext();  ) {
-//			Range r = i.next();
-//		    Subzone sAnnot = new Subzone(jcas);	
-//		    sAnnot.setBegin(r.getBegin());
-//		    sAnnot.setEnd(r.getEnd());
-//		    sAnnot.setLabel(r.getLabel());
-//		    sAnnot.addToIndexes();
-//		    logger.info(String.format("added new subzone annotation [%d-%d] \"%s\"", sAnnot.getBegin(),
sAnnot.getEnd(), sAnnot.getCoveredText()));
-//		}
-		
-		
 		
 		// Add the heading annotations
 		List<HeadingRange> headings = zonerCli.getHeadings();



Mime
View raw message