ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1625365 [9/10] - in /ctakes/trunk: ./ ctakes-assertion-zoner-res/src/main/resources/META-INF/org.apache.uima.fit/ ctakes-assertion-zoner-res/src/main/resources/META-INF/org.uimafit/ ctakes-assertion-zoner/ ctakes-assertion-zoner/src/main/j...
Date Tue, 16 Sep 2014 19:57:25 GMT
Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventCoreference.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventCoreference.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventCoreference.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventCoreference.java Tue Sep 16 19:57:19 2014
@@ -9,6 +9,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -37,6 +38,13 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.cas.FSArray;
 import org.apache.uima.jcas.cas.FSList;
@@ -45,18 +53,11 @@ import org.apache.uima.jcas.cas.NonEmpty
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.FileUtils;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.liblinear.LIBLINEARStringOutcomeDataWriter;
-import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.eval.AnnotationStatistics;
-import org.cleartk.util.ViewURIUtil;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
+import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
+import org.cleartk.util.ViewUriUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.HashMultiset;
@@ -150,18 +151,18 @@ public class EvaluationOfEventCoreferenc
   protected void train(CollectionReader collectionReader, File directory)
       throws Exception {
     AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(DocumentIDPrinter.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ParagraphAnnotator.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ParagraphVectorAnnotator.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(DocumentIDPrinter.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphAnnotator.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphVectorAnnotator.class));
     aggregateBuilder.add(CopyFromGold.getDescription(Markable.class, CoreferenceRelation.class, CollectionTextRelation.class));
     aggregateBuilder.add(EventCoreferenceAnnotator.createDataWriterDescription(
 //        TKSVMlightStringOutcomeDataWriter.class,
-        LIBLINEARStringOutcomeDataWriter.class,
+        LibLinearStringOutcomeDataWriter.class,
         directory,
         params.probabilityOfKeepingANegativeExample
         ));
     // create gold chains for writing out which we can then use for our scoring tool
-//    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(CoreferenceChainScoringOutput.class,
+//    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(CoreferenceChainScoringOutput.class,
 //        CoreferenceChainScoringOutput.PARAM_OUTPUT_DIR,
 //        this.outputDirectory + "train"));
     SimplePipeline.runPipeline(collectionReader, aggregateBuilder.createAggregate());
@@ -195,18 +196,18 @@ public class EvaluationOfEventCoreferenc
   protected AnnotationStatistics<String> test(
       CollectionReader collectionReader, File directory) throws Exception {
     AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(DocumentIDPrinter.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ParagraphAnnotator.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ParagraphVectorAnnotator.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(DocumentIDPrinter.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphAnnotator.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphVectorAnnotator.class));
     aggregateBuilder.add(CopyFromGold.getDescription(Markable.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(CoreferenceChainScoringOutput.class,
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(CoreferenceChainScoringOutput.class,
         CoreferenceChainScoringOutput.PARAM_OUTPUT_FILENAME,
         this.outputDirectory + "gold.chains",
         CoreferenceChainScoringOutput.PARAM_USE_GOLD_CHAINS,
         true));
     aggregateBuilder.add(EventCoreferenceAnnotator.createAnnotatorDescription(directory));
     aggregateBuilder.add(CoreferenceChainAnnotator.createAnnotatorDescription());
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(CoreferenceChainScoringOutput.class,
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(CoreferenceChainScoringOutput.class,
         CoreferenceChainScoringOutput.PARAM_OUTPUT_FILENAME,
         this.outputDirectory + "system.chains"));
 
@@ -222,10 +223,8 @@ public class EvaluationOfEventCoreferenc
     };
     AnnotationStatistics<String> stats = new AnnotationStatistics<>();
 
-    JCasIterable jcasIter =new JCasIterable(collectionReader, aggregateBuilder.createAggregate());
-    JCas jCas = null;
-    while(jcasIter.hasNext()) {
-      jCas = jcasIter.next();
+    for(Iterator<JCas> casIter =new JCasIterator(collectionReader, aggregateBuilder.createAggregate()); casIter.hasNext();){
+      JCas jCas = casIter.next();
       JCas goldView = jCas.getView(GOLD_VIEW_NAME);
       JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
       Collection<CoreferenceRelation> goldRelations = JCasUtil.select(
@@ -299,7 +298,7 @@ public class EvaluationOfEventCoreferenc
     
     @Override
     public void process(JCas jCas) throws AnalysisEngineProcessException {
-      File filename = new File(ViewURIUtil.getURI(jCas));
+      File filename = new File(ViewUriUtil.getURI(jCas));
       JCas chainsCas = null;
       try {
          chainsCas = useGoldChains? jCas.getView(GOLD_VIEW_NAME) : jCas;
@@ -415,7 +414,7 @@ public class EvaluationOfEventCoreferenc
     public void process(JCas jCas) throws AnalysisEngineProcessException {
       String docId = DocumentIDAnnotationUtil.getDocumentID(jCas);
       if(docId == null){
-        docId = new File(ViewURIUtil.getURI(jCas)).getName();
+        docId = new File(ViewUriUtil.getURI(jCas)).getName();
       }
       logger.info(String.format("Processing %s\n", docId));
     }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java Tue Sep 16 19:57:19 2014
@@ -22,6 +22,7 @@ import java.io.File;
 import java.net.URI;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -36,17 +37,17 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.textsem.TimeMention;
 import org.apache.uima.cas.CAS;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.testing.util.HideOutput;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.libsvm.LIBSVMStringOutcomeDataWriter;
 import org.cleartk.eval.AnnotationStatistics;
-import org.cleartk.util.ViewURIUtil;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.testing.util.HideOutput;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.libsvm.LibSvmStringOutcomeDataWriter;
+import org.cleartk.util.ViewUriUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Lists;
@@ -79,16 +80,16 @@ EvaluationOfTemporalRelations_ImplBase {
        {
     AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
     aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class, BinaryTextRelation.class));
-    //	    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(MergeContainsOverlap.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class));
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveCrossSentenceRelations.class));
+    //	    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(MergeContainsOverlap.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveCrossSentenceRelations.class));
     // TODO -- see if this applies to this relation:
     //	    if (this.useClosure) {
-    //	      aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class));
+    //	      aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class));
     //	    }
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(PreserveEventEventRelations.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(PreserveEventEventRelations.class));
     aggregateBuilder.add(EventEventRelationAnnotator.createDataWriterDescription(
-        LIBSVMStringOutcomeDataWriter.class,
+        LibSvmStringOutcomeDataWriter.class,
 //        	        TKSVMlightStringOutcomeDataWriter.class,
         directory,
         1.0));
@@ -101,7 +102,6 @@ EvaluationOfTemporalRelations_ImplBase {
 //    JarClassifierBuilder.trainAndPackage(directory, "-t", "0", "-c", "10", "-N", "0");
 //    JarClassifierBuilder.trainAndPackage(directory,  "-t", "5", "-S", "0", "-N", "3", "-C", "+", "-T", "1.0");
     hider.restoreOutput();
-    hider.close();
   }
 
   @Override
@@ -109,14 +109,14 @@ EvaluationOfTemporalRelations_ImplBase {
       CollectionReader collectionReader, File directory) throws Exception {
     AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
     aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class));
-    //	    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(MergeContainsOverlap.class,
+    //	    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(MergeContainsOverlap.class,
     //	    		MergeContainsOverlap.PARAM_RELATION_VIEW,
     //	    		GOLD_VIEW_NAME));
     aggregateBuilder.add(
-        AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class),
+        AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class),
         CAS.NAME_DEFAULT_SOFA,
         GOLD_VIEW_NAME);
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
         RemoveCrossSentenceRelations.class,
         RemoveCrossSentenceRelations.PARAM_SENTENCE_VIEW,
         CAS.NAME_DEFAULT_SOFA,
@@ -125,16 +125,16 @@ EvaluationOfTemporalRelations_ImplBase {
     // TODO - use if relevant.
     //	    if (this.useClosure) {
     //	      aggregateBuilder.add(
-    //	          AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class),
+    //	          AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class),
     //	          CAS.NAME_DEFAULT_SOFA,
     //	          GOLD_VIEW_NAME);
     //	    }
     aggregateBuilder.add(
-        AnalysisEngineFactory.createPrimitiveDescription(PreserveEventEventRelations.class),
+        AnalysisEngineFactory.createEngineDescription(PreserveEventEventRelations.class),
         CAS.NAME_DEFAULT_SOFA,
         GOLD_VIEW_NAME);
 
-    aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveRelations.class));
+    aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveRelations.class));
     aggregateBuilder.add(
         EventEventRelationAnnotator.createAnnotatorDescription(directory));
 
@@ -146,10 +146,8 @@ EvaluationOfTemporalRelations_ImplBase {
     Function<BinaryTextRelation, String> getOutcome = AnnotationStatistics.annotationToFeatureValue("category");
 
     AnnotationStatistics<String> stats = new AnnotationStatistics<String>();
-    JCasIterable jcasIter =new JCasIterable(collectionReader, aggregateBuilder.createAggregate());
-    JCas jCas = null;
-    while(jcasIter.hasNext()) {
-      jCas = jcasIter.next();
+    for(Iterator<JCas> casIter = new JCasIterator(collectionReader, aggregateBuilder.createAggregate()); casIter.hasNext();){
+      JCas jCas = casIter.next();
       JCas goldView = jCas.getView(GOLD_VIEW_NAME);
       JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
       Collection<BinaryTextRelation> goldRelations = JCasUtil.select(
@@ -160,7 +158,7 @@ EvaluationOfTemporalRelations_ImplBase {
           BinaryTextRelation.class);
       stats.add(goldRelations, systemRelations, getSpan, getOutcome);
       if(this.printRelations){
-        URI uri = ViewURIUtil.getURI(jCas);
+        URI uri = ViewUriUtil.getURI(jCas);
         String[] path = uri.getPath().split("/");
         printRelationAnnotations(path[path.length - 1], systemRelations);
       }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java Tue Sep 16 19:57:19 2014
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.FileHandler;
@@ -41,20 +42,20 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.Feature;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.FileUtils;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.libsvm.LIBSVMStringOutcomeDataWriter;
-//import org.cleartk.classifier.liblinear.LIBLINEARStringOutcomeDataWriter;
+//import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
 import org.cleartk.eval.AnnotationStatistics;
-import org.cleartk.util.ViewURIUtil;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.libsvm.LibSvmStringOutcomeDataWriter;
+import org.cleartk.util.ViewUriUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Maps;
@@ -158,10 +159,10 @@ Evaluation_ImplBase<Map<String, Annotati
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class));
 		aggregateBuilder.add(CopyFromGold.getDescription(TimeMention.class));
 		aggregateBuilder.add(DocTimeRelAnnotator.createDataWriterDescription(
-				LIBSVMStringOutcomeDataWriter.class,
+				LibSvmStringOutcomeDataWriter.class,
 				new File(directory, DOC_TIME_REL)));
 		aggregateBuilder.add(ContextualModalityAnnotator.createDataWriterDescription(
-				LIBSVMStringOutcomeDataWriter.class, 
+				LibSvmStringOutcomeDataWriter.class, 
 				new File(directory, CONTEXTUAL_MODALITY)));
 		SimplePipeline.runPipeline(collectionReader, aggregateBuilder.createAggregate());
 		for(String propertyName : PROPERTY_NAMES){
@@ -177,7 +178,7 @@ Evaluation_ImplBase<Map<String, Annotati
 		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class));
 		aggregateBuilder.add(CopyFromGold.getDescription(TimeMention.class));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ClearEventProperties.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ClearEventProperties.class));
 		aggregateBuilder.add(DocTimeRelAnnotator.createAnnotatorDescription(new File(directory, DOC_TIME_REL)));
 		aggregateBuilder.add(ContextualModalityAnnotator.createAnnotatorDescription(new File(directory, CONTEXTUAL_MODALITY)));
 
@@ -194,7 +195,8 @@ Evaluation_ImplBase<Map<String, Annotati
 			statsMap.put(propertyName, new AnnotationStatistics<String>());
 		}
 
-		for (JCas jCas : new JCasIterable(collectionReader, aggregateBuilder.createAggregate())) {
+		for (Iterator<JCas> casIter = new JCasIterator(collectionReader, aggregateBuilder.createAggregate()); casIter.hasNext();){
+			JCas jCas = casIter.next();
 			JCas goldView = jCas.getView(GOLD_VIEW_NAME);
 			JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
 			String text = goldView.getDocumentText();
@@ -203,7 +205,7 @@ Evaluation_ImplBase<Map<String, Annotati
 					List<EventMention> goldEvents = selectExact(goldView, EventMention.class, segment);
 					List<EventMention> systemEvents = selectExact(systemView, EventMention.class, segment);
 					for (String name : PROPERTY_NAMES) {
-						this.loggers.get(name).fine("Errors in : " + ViewURIUtil.getURI(jCas).toString());
+						this.loggers.get(name).fine("Errors in : " + ViewUriUtil.getURI(jCas).toString());
 						Function<EventMention, String> getProperty = propertyGetters.get(name);
 						statsMap.get(name).add(
 								goldEvents,

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventPropertiesTk.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventPropertiesTk.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventPropertiesTk.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventPropertiesTk.java Tue Sep 16 19:57:19 2014
@@ -63,20 +63,20 @@
 //import org.apache.uima.jcas.JCas;
 //import org.apache.uima.resource.ResourceInitializationException;
 //import org.apache.uima.util.FileUtils;
-//import org.cleartk.classifier.jar.JarClassifierBuilder;
-////import org.cleartk.classifier.libsvm.LIBSVMStringOutcomeDataWriter;
-//import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
-////import org.cleartk.classifier.liblinear.LIBLINEARStringOutcomeDataWriter;
+//import org.cleartk.ml.jar.JarClassifierBuilder;
+////import org.cleartk.ml.libsvm.LibSvmStringOutcomeDataWriter;
+//import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
+////import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
 //import org.cleartk.eval.AnnotationStatistics;
-//import org.cleartk.ml.libsvm.tk.TKLIBSVMStringOutcomeDataWriter;
-//import org.cleartk.util.ViewURIUtil;
-//import org.uimafit.component.JCasAnnotator_ImplBase;
-//import org.uimafit.factory.AggregateBuilder;
-//import org.uimafit.factory.AnalysisEngineFactory;
-//import org.uimafit.pipeline.JCasIterable;
-//import org.uimafit.pipeline.SimplePipeline;
-////import org.uimafit.testing.util.HideOutput;
-//import org.uimafit.util.JCasUtil;
+//import org.cleartk.ml.libsvm.tk.TKLibSvmStringOutcomeDataWriter;
+//import org.cleartk.util.ViewUriUtil;
+//import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+//import org.apache.uima.fit.factory.AggregateBuilder;
+//import org.apache.uima.fit.factory.AnalysisEngineFactory;
+//import org.apache.uima.fit.pipeline.JCasIterable;
+//import org.apache.uima.fit.pipeline.SimplePipeline;
+////import org.apache.uima.fit.testing.util.HideOutput;
+//import org.apache.uima.fit.util.JCasUtil;
 //
 //import com.google.common.base.Function;
 //import com.google.common.collect.Maps;
@@ -192,11 +192,11 @@
 //		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class));
 //		aggregateBuilder.add(CopyFromGold.getDescription(TimeMention.class));
 //		aggregateBuilder.add(DocTimeRelWithTreeAnnotator.createDataWriterDescription(
-//				//			  LIBSVMStringOutcomeDataWriter.class,
-//				TKLIBSVMStringOutcomeDataWriter.class,
+//				//			  LibSvmStringOutcomeDataWriter.class,
+//				TKLibSvmStringOutcomeDataWriter.class,
 //				new File(directory, DOC_TIME_REL)));
-//		//	  aggregateBuilder.add(ContextualModalityAnnotator.createDataWriterDescription(LIBSVMStringOutcomeDataWriter.class, new File(directory, CONTEXTUAL_MODALITY)));
-//		SimplePipeline.runPipeline(collectionReader, aggregateBuilder.createAggregate());
+//		//	  aggregateBuilder.add(ContextualModalityAnnotator.createDataWriterDescription(LibSvmStringOutcomeDataWriter.class, new File(directory, CONTEXTUAL_MODALITY)));
+//		SimplePipeline.runPipeline(collectionReader, aggregateBuilder.createEngine());
 //		//	      for(String propertyName : PROPERTY_NAMES){
 //		//	        JarClassifierBuilder.trainAndPackage(new File(directory, propertyName), "-h","0","-c", "1000");
 //		//	      }
@@ -238,7 +238,7 @@
 //		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 //		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class));
 //		aggregateBuilder.add(CopyFromGold.getDescription(TimeMention.class));
-//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ClearEventProperties.class));
+//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ClearEventProperties.class));
 //		aggregateBuilder.add(DocTimeRelWithTreeAnnotator.createAnnotatorDescription(new File(directory, DOC_TIME_REL)));
 //		//	  aggregateBuilder.add(ContextualModalityAnnotator.createAnnotatorDescription(new File(directory, CONTEXTUAL_MODALITY)));
 //
@@ -255,7 +255,7 @@
 //			statsMap.put(propertyName, new AnnotationStatistics<String>());
 //		}
 //
-//		for (JCas jCas : new JCasIterable(collectionReader, aggregateBuilder.createAggregate())) {
+//		for (JCas jCas : new JCasIterable(collectionReader, aggregateBuilder.createEngine())) {
 //			JCas goldView = jCas.getView(GOLD_VIEW_NAME);
 //			JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
 //			String text = goldView.getDocumentText();
@@ -264,7 +264,7 @@
 //					List<EventMention> goldEvents = selectExact(goldView, EventMention.class, segment);
 //					List<EventMention> systemEvents = selectExact(systemView, EventMention.class, segment);
 //					for (String name : PROPERTY_NAMES) {
-//						this.loggers.get(name).fine("Errors in : " + ViewURIUtil.getURI(jCas).toString());
+//						this.loggers.get(name).fine("Errors in : " + ViewUriUtil.getURI(jCas).toString());
 //						Function<EventMention, String> getProperty = propertyGetters.get(name);
 //						statsMap.get(name).add(
 //								goldEvents,

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventSpans.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventSpans.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventSpans.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventSpans.java Tue Sep 16 19:57:19 2014
@@ -26,19 +26,18 @@ import java.util.logging.Level;
 
 import org.apache.ctakes.temporal.ae.EventAnnotator;
 import org.apache.ctakes.temporal.ae.feature.selection.FeatureSelection;
-import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.XMLFormat;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.ctakes.typesystem.type.textspan.Segment;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.transform.InstanceDataWriter;
-import org.cleartk.classifier.feature.transform.InstanceStream;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.liblinear.LIBLINEARStringOutcomeDataWriter;
 import org.cleartk.eval.AnnotationStatistics;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.transform.InstanceDataWriter;
+import org.cleartk.ml.feature.transform.InstanceStream;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
 
 import com.lexicalscope.jewel.cli.CliFactory;
 import com.lexicalscope.jewel.cli.Option;
@@ -124,7 +123,7 @@ public class EvaluationOfEventSpans exte
       throws ResourceInitializationException {
     Class<?> dataWriterClass = this.featureSelectionThreshold >= 0f
         ? InstanceDataWriter.class
-        : LIBLINEARStringOutcomeDataWriter.class;
+        : LibLinearStringOutcomeDataWriter.class;
     return EventAnnotator.createDataWriterDescription(
         dataWriterClass,
         directory,
@@ -143,7 +142,7 @@ public class EvaluationOfEventSpans exte
       featureSelection.train(instances);
       featureSelection.save(EventAnnotator.createFeatureSelectionURI(directory));
       // now write in the libsvm format
-      LIBLINEARStringOutcomeDataWriter dataWriter = new LIBLINEARStringOutcomeDataWriter(directory);
+      LibLinearStringOutcomeDataWriter dataWriter = new LibLinearStringOutcomeDataWriter(directory);
       for (Instance<String> instance : instances) {
         dataWriter.write(featureSelection.transform(instance));
       }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java Tue Sep 16 19:57:19 2014
@@ -34,8 +34,6 @@ import org.apache.ctakes.relationextract
 import org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.ae.baselines.RecallBaselineEventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.eval.EvaluationOfTemporalRelations_ImplBase.RemoveNonContainsRelations.RemoveGoldAttributes;
-import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.WriteI2B2XML;
-import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.XMLFormat;
 import org.apache.ctakes.temporal.utils.AnnotationIdCollection;
 import org.apache.ctakes.temporal.utils.TLinkTypeArray2;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
@@ -48,23 +46,23 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.FileUtils;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.tksvmlight.TKSVMlightStringOutcomeDataWriter;
-import org.cleartk.classifier.tksvmlight.model.CompositeKernel;
-import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.eval.AnnotationStatistics;
-import org.cleartk.util.ViewURIUtil;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.tksvmlight.TkSvmLightStringOutcomeDataWriter;
+import org.cleartk.ml.tksvmlight.model.CompositeKernel;
+import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
+import org.cleartk.util.ViewUriUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.HashMultimap;
@@ -241,23 +239,23 @@ EvaluationOfTemporalRelations_ImplBase{
 	  if(this.skipTrain) return;
 		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class, BinaryTextRelation.class));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveCrossSentenceRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveCrossSentenceRelations.class));
 		if(!this.useGoldAttributes){
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveGoldAttributes.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveGoldAttributes.class));
 		}
 		if (this.useClosure) {
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class));//aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class));
-//			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddContain2Overlap.class));
-			//			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveBeforeAndOnRelations.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddClosure.class));//aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class));
+//			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddContain2Overlap.class));
+			//			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddTransitiveBeforeAndOnRelations.class));
 		}
-//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddFlippedOverlap.class));//add flipped overlap instances to training data
+//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddFlippedOverlap.class));//add flipped overlap instances to training data
 		
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveEventEventRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveEventEventRelations.class));
 		aggregateBuilder.add(EventTimeRelationAnnotator.createDataWriterDescription(
-				//                LIBSVMStringOutcomeDataWriter.class,
-				TKSVMlightStringOutcomeDataWriter.class,
-				//        TKLIBSVMStringOutcomeDataWriter.class,
+				//                LibSvmStringOutcomeDataWriter.class,
+				TkSvmLightStringOutcomeDataWriter.class,
+				//        TKLibSvmStringOutcomeDataWriter.class,
 				//        SVMlightStringOutcomeDataWriter.class,        
 				directory,
 				params.probabilityOfKeepingANegativeExample));
@@ -298,7 +296,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class));
 		
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				RemoveCrossSentenceRelations.class,
 				RemoveCrossSentenceRelations.PARAM_SENTENCE_VIEW,
 				CAS.NAME_DEFAULT_SOFA,
@@ -306,38 +304,38 @@ EvaluationOfTemporalRelations_ImplBase{
 				GOLD_VIEW_NAME));
 		if (this.useClosure) {
 			aggregateBuilder.add(
-					AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class),//AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class),
+					AnalysisEngineFactory.createEngineDescription(AddClosure.class),//AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class),
 					CAS.NAME_DEFAULT_SOFA,
 					GOLD_VIEW_NAME);
 					
 //			aggregateBuilder.add(
-//					AnalysisEngineFactory.createPrimitiveDescription(AddContain2Overlap.class),
+//					AnalysisEngineFactory.createEngineDescription(AddContain2Overlap.class),
 //					CAS.NAME_DEFAULT_SOFA,
 //					GOLD_VIEW_NAME);
 			//			aggregateBuilder.add(
-			//					AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveBeforeAndOnRelations.class),
+			//					AnalysisEngineFactory.createEngineDescription(AddTransitiveBeforeAndOnRelations.class),
 			//					CAS.NAME_DEFAULT_SOFA,
 			//					GOLD_VIEW_NAME);
 		}
 		
 //		aggregateBuilder.add(
-//				AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class,
+//				AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class,
 //						RemoveNonContainsRelations.PARAM_RELATION_VIEW,
 //						GOLD_VIEW_NAME));
 		aggregateBuilder.add(
-				AnalysisEngineFactory.createPrimitiveDescription(RemoveEventEventRelations.class),
+				AnalysisEngineFactory.createEngineDescription(RemoveEventEventRelations.class),
 				CAS.NAME_DEFAULT_SOFA,
 				GOLD_VIEW_NAME);
 
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveRelations.class));
 		aggregateBuilder.add(this.baseline ? RecallBaselineEventTimeRelationAnnotator.createAnnotatorDescription(directory) :
 			EventTimeRelationAnnotator.createAnnotatorDescription(directory));
     if(this.i2b2Output != null){
-      aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(WriteI2B2XML.class, WriteI2B2XML.PARAM_OUTPUT_DIR, this.i2b2Output), "TimexView", CAS.NAME_DEFAULT_SOFA);
+      aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(WriteI2B2XML.class, WriteI2B2XML.PARAM_OUTPUT_DIR, this.i2b2Output), "TimexView", CAS.NAME_DEFAULT_SOFA);
     }
 		if (this.useClosure) {//add closure for system output
 			aggregateBuilder.add(
-					AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class),//AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class),
+					AnalysisEngineFactory.createEngineDescription(AddClosure.class),//AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class),
 					GOLD_VIEW_NAME,
 					CAS.NAME_DEFAULT_SOFA
 					);
@@ -350,10 +348,10 @@ EvaluationOfTemporalRelations_ImplBase{
 		Function<BinaryTextRelation, String> getOutcome = AnnotationStatistics.annotationToFeatureValue("category");
 
 		AnnotationStatistics<String> stats = new AnnotationStatistics<String>();
-		JCasIterable jcasIter =new JCasIterable(collectionReader, aggregateBuilder.createAggregate());
+		JCasIterator casIter = new JCasIterator(collectionReader, aggregateBuilder.createAggregate());
 		JCas jCas = null;
-		while(jcasIter.hasNext()) {
-			jCas = jcasIter.next();
+		while(casIter.hasNext()) {
+			jCas = casIter.next();
 			JCas goldView = jCas.getView(GOLD_VIEW_NAME);
 			JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
 			Collection<BinaryTextRelation> goldRelations = JCasUtil.select(
@@ -369,7 +367,7 @@ EvaluationOfTemporalRelations_ImplBase{
 			//find duplicates in gold relations:
 			//			Collection<BinaryTextRelation> duplicateGoldRelations = getDuplicateRelations(goldRelations, getSpan);
 			//			if(!duplicateGoldRelations.isEmpty()){
-			//				System.err.println("******Duplicate gold relations in : " + ViewURIUtil.getURI(jCas).toString());
+			//				System.err.println("******Duplicate gold relations in : " + ViewUriUtil.getURI(jCas).toString());
 			//				for (BinaryTextRelation rel : duplicateGoldRelations){
 			//					System.err.println("Duplicate : "+ formatRelation(rel));
 			//				}
@@ -378,7 +376,7 @@ EvaluationOfTemporalRelations_ImplBase{
 
 			stats.add(goldRelations, systemRelations, getSpan, getOutcome);
 			if(this.printRelations){
-				URI uri = ViewURIUtil.getURI(jCas);
+				URI uri = ViewUriUtil.getURI(jCas);
 				String[] path = uri.getPath().split("/");
 				printRelationAnnotations(path[path.length - 1], systemRelations);
 			}

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfMetaTimeExpressionExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfMetaTimeExpressionExtractor.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfMetaTimeExpressionExtractor.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfMetaTimeExpressionExtractor.java Tue Sep 16 19:57:19 2014
@@ -30,22 +30,21 @@ import org.apache.ctakes.temporal.ae.CRF
 import org.apache.ctakes.temporal.ae.ConstituencyBasedTimeAnnotator;
 import org.apache.ctakes.temporal.ae.MetaTimeAnnotator;
 import org.apache.ctakes.temporal.ae.TimeAnnotator;
-import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.XMLFormat;
 import org.apache.ctakes.typesystem.type.textsem.TimeMention;
 import org.apache.ctakes.typesystem.type.textspan.Segment;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.crfsuite.CRFSuiteStringOutcomeDataWriter;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
 import org.cleartk.eval.AnnotationStatistics;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
+import org.cleartk.ml.crfsuite.CrfSuiteStringOutcomeDataWriter;
+import org.cleartk.ml.jar.JarClassifierBuilder;
 
 import com.google.common.collect.Maps;
 import com.lexicalscope.jewel.cli.CliFactory;
@@ -117,7 +116,7 @@ public class EvaluationOfMetaTimeExpress
     annotatorTrainingArguments.put(ConstituencyBasedTimeAnnotator.class, new String[]{"-c", "0.3"});
     annotatorTrainingArguments.put(CRFTimeAnnotator.class, new String[]{"-p", "c2=0.03"});
     
-    JCasIterable[] casIters = new JCasIterable[nFolds];
+    JCasIterator[] casIters = new JCasIterator[nFolds];
     for (int fold = 0; fold < nFolds; ++fold) {
       List<Integer> xfoldTrain = selectTrainItems(allTrain, nFolds, fold);
       List<Integer> xfoldTest = selectTestItems(allTrain, nFolds, fold);
@@ -148,15 +147,16 @@ public class EvaluationOfMetaTimeExpress
         }
         
       }
-      casIters[fold] = new JCasIterable(getCollectionReader(xfoldTest), aggregateBuilder.createAggregate());
+      casIters[fold] = new JCasIterator(getCollectionReader(xfoldTest), aggregateBuilder.createAggregate());
     }
     // run meta data-writer for this fold:
     AggregateBuilder writerBuilder = new AggregateBuilder();
     writerBuilder.add(CopyFromGold.getDescription(TimeMention.class));
     writerBuilder.add(this.getDataWriterDescription(directory));
     AnalysisEngine writer = writerBuilder.createAggregate();
-    for(JCasIterable casIter : casIters){
-      for(JCas jcas : casIter){
+    for(JCasIterator casIter : casIters){
+      while(casIter.hasNext()){
+        JCas jcas = casIter.next();
         SimplePipeline.runPipeline(jcas, writer);
       }
     }
@@ -188,7 +188,7 @@ public class EvaluationOfMetaTimeExpress
   @Override
   protected AnalysisEngineDescription getDataWriterDescription(File directory)
       throws ResourceInitializationException {
-    return MetaTimeAnnotator.getDataWriterDescription(CRFSuiteStringOutcomeDataWriter.class, directory);          
+    return MetaTimeAnnotator.getDataWriterDescription(CrfSuiteStringOutcomeDataWriter.class, directory);          
   }
 
   @Override

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfNEPredicateEventSpans.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfNEPredicateEventSpans.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfNEPredicateEventSpans.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfNEPredicateEventSpans.java Tue Sep 16 19:57:19 2014
@@ -31,8 +31,8 @@ import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.cleartk.eval.AnnotationStatistics;
-import org.uimafit.component.NoOpAnnotator;
-import org.uimafit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.component.NoOpAnnotator;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
 
 import com.lexicalscope.jewel.cli.CliFactory;
 
@@ -60,7 +60,7 @@ public class EvaluationOfNEPredicateEven
 	protected AnalysisEngineDescription getDataWriterDescription(File directory)
 			throws ResourceInitializationException {
 		// not training a model - just using the NEs and predicates
-	    return AnalysisEngineFactory.createPrimitiveDescription(NoOpAnnotator.class);
+	    return AnalysisEngineFactory.createEngineDescription(NoOpAnnotator.class);
 	}
 
 	@Override
@@ -73,7 +73,7 @@ public class EvaluationOfNEPredicateEven
 	protected AnalysisEngineDescription getAnnotatorDescription(File directory)
 			throws ResourceInitializationException {
 		// not training a model - just using the NEs and predicates
-//		return AnalysisEngineFactory.createPrimitiveDescription(NoOpAnnotator.class);
+//		return AnalysisEngineFactory.createEngineDescription(NoOpAnnotator.class);
 	    return NEPredicateEventAnnotator.createAnnotatorDescription(directory);
 	}
 

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java Tue Sep 16 19:57:19 2014
@@ -33,8 +33,8 @@ import java.util.Set;
 import org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation.HashableArguments;
 import org.apache.ctakes.temporal.ae.EventAdmissionTimeAnnotator;
 import org.apache.ctakes.temporal.ae.EventDischargeTimeAnnotator;
-import org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.ae.EventEventRelationAnnotator;
+import org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.ae.baselines.RecallBaselineEventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.ParameterSettings;
 import org.apache.ctakes.temporal.eval.EvaluationOfTemporalRelations_ImplBase.RemoveNonContainsRelations.RemoveGoldAttributes;
@@ -50,23 +50,23 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.FileUtils;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.libsvm.LIBSVMStringOutcomeDataWriter;
-import org.cleartk.classifier.tksvmlight.TKSVMlightStringOutcomeDataWriter;
-import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.eval.AnnotationStatistics;
-import org.cleartk.util.ViewURIUtil;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.libsvm.LibSvmStringOutcomeDataWriter;
+import org.cleartk.ml.tksvmlight.TkSvmLightStringOutcomeDataWriter;
+import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
+import org.cleartk.util.ViewUriUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.HashMultimap;
@@ -245,36 +245,36 @@ EvaluationOfTemporalRelations_ImplBase{
 		if(this.skipTrain) return;
 		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class, BinaryTextRelation.class));
-		//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveCrossSentenceRelations.class));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNullArgumentRelations.class));
+		//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveCrossSentenceRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveNullArgumentRelations.class));
 		if(!this.useGoldAttributes){
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveGoldAttributes.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveGoldAttributes.class));
 		}
 		if (this.useClosure) {
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class));//aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class));
-			//			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddContain2Overlap.class));
-			//			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveBeforeAndOnRelations.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddClosure.class));//aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class));
+			//			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddContain2Overlap.class));
+			//			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddTransitiveBeforeAndOnRelations.class));
 		}
-		//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(AddFlippedOverlap.class));//add flipped overlap instances to training data
+		//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddFlippedOverlap.class));//add flipped overlap instances to training data
 
-		//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveEventEventRelations.class));
+		//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveEventEventRelations.class));
 		aggregateBuilder.add(EventTimeRelationAnnotator.createDataWriterDescription(
-				//                LIBSVMStringOutcomeDataWriter.class,
-				TKSVMlightStringOutcomeDataWriter.class,
-				//        TKLIBSVMStringOutcomeDataWriter.class,
+				//                LibSvmStringOutcomeDataWriter.class,
+				TkSvmLightStringOutcomeDataWriter.class,
+				//        TKLibSvmStringOutcomeDataWriter.class,
 				//        SVMlightStringOutcomeDataWriter.class,        
 				new File(directory,EVENT_TIME),
 				params.probabilityOfKeepingANegativeExample));
 		aggregateBuilder.add(EventEventRelationAnnotator.createDataWriterDescription(
-				LIBSVMStringOutcomeDataWriter.class,
+				LibSvmStringOutcomeDataWriter.class,
 				new File(directory,EVENT_EVENT), 
 				params.probabilityOfKeepingANegativeExample));
 		aggregateBuilder.add(EventDischargeTimeAnnotator.createDataWriterDescription(
-				LIBSVMStringOutcomeDataWriter.class,
+				LibSvmStringOutcomeDataWriter.class,
 				new File(directory,EVENT_DISCHARGE)));
 		aggregateBuilder.add(EventAdmissionTimeAnnotator.createDataWriterDescription(
-				LIBSVMStringOutcomeDataWriter.class,
+				LibSvmStringOutcomeDataWriter.class,
 				new File(directory,EVENT_ADMISSION)));
 		SimplePipeline.runPipeline(collectionReader, aggregateBuilder.createAggregate());
 		String[] optArray;
@@ -316,7 +316,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class, TimeMention.class));
 
-		//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 		//				RemoveCrossSentenceRelations.class,
 		//				RemoveCrossSentenceRelations.PARAM_SENTENCE_VIEW,
 		//				CAS.NAME_DEFAULT_SOFA,
@@ -324,30 +324,30 @@ EvaluationOfTemporalRelations_ImplBase{
 		//				GOLD_VIEW_NAME));
 		if (this.useClosure) {
 			aggregateBuilder.add(
-					AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class),//AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class),
+					AnalysisEngineFactory.createEngineDescription(AddClosure.class),//AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class),
 					CAS.NAME_DEFAULT_SOFA,
 					GOLD_VIEW_NAME);
 
 			//			aggregateBuilder.add(
-			//					AnalysisEngineFactory.createPrimitiveDescription(AddContain2Overlap.class),
+			//					AnalysisEngineFactory.createEngineDescription(AddContain2Overlap.class),
 			//					CAS.NAME_DEFAULT_SOFA,
 			//					GOLD_VIEW_NAME);
 			//			aggregateBuilder.add(
-			//					AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveBeforeAndOnRelations.class),
+			//					AnalysisEngineFactory.createEngineDescription(AddTransitiveBeforeAndOnRelations.class),
 			//					CAS.NAME_DEFAULT_SOFA,
 			//					GOLD_VIEW_NAME);
 		}
 
 		//		aggregateBuilder.add(
-		//				AnalysisEngineFactory.createPrimitiveDescription(RemoveNonContainsRelations.class,
+		//				AnalysisEngineFactory.createEngineDescription(RemoveNonContainsRelations.class,
 		//						RemoveNonContainsRelations.PARAM_RELATION_VIEW,
 		//						GOLD_VIEW_NAME));
 		//		aggregateBuilder.add(
-		//				AnalysisEngineFactory.createPrimitiveDescription(RemoveEventEventRelations.class),
+		//				AnalysisEngineFactory.createEngineDescription(RemoveEventEventRelations.class),
 		//				CAS.NAME_DEFAULT_SOFA,
 		//				GOLD_VIEW_NAME);
 
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveRelations.class));
 		aggregateBuilder.add(this.baseline ? RecallBaselineEventTimeRelationAnnotator.createAnnotatorDescription(directory) :
 			EventTimeRelationAnnotator.createAnnotatorDescription(new File(directory,EVENT_TIME)));
 		aggregateBuilder.add(EventEventRelationAnnotator.createAnnotatorDescription(new File(directory,EVENT_EVENT)));
@@ -356,18 +356,18 @@ EvaluationOfTemporalRelations_ImplBase{
 		
 		if (this.useClosure) {//add closure for system output
 			aggregateBuilder.add(
-					AnalysisEngineFactory.createPrimitiveDescription(AddClosure.class),//AnalysisEngineFactory.createPrimitiveDescription(AddTransitiveContainsRelations.class),
+					AnalysisEngineFactory.createEngineDescription(AddClosure.class),//AnalysisEngineFactory.createEngineDescription(AddTransitiveContainsRelations.class),
 					GOLD_VIEW_NAME,
 					CAS.NAME_DEFAULT_SOFA
 					);
 		}
 				
 		if(this.i2b2Output != null){
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(WriteI2B2XML.class, WriteI2B2XML.PARAM_OUTPUT_DIR, this.i2b2Output), "TimexView", CAS.NAME_DEFAULT_SOFA);
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(WriteI2B2XML.class, WriteI2B2XML.PARAM_OUTPUT_DIR, this.i2b2Output), "TimexView", CAS.NAME_DEFAULT_SOFA);
 		}
 		
 		//remove the null argument from relations
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNullArgumentRelations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(RemoveNullArgumentRelations.class));
 		
 		Function<BinaryTextRelation, ?> getSpan = new Function<BinaryTextRelation, HashableArguments>() {
 			public HashableArguments apply(BinaryTextRelation relation) {
@@ -377,7 +377,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		Function<BinaryTextRelation, String> getOutcome = AnnotationStatistics.annotationToFeatureValue("category");
 
 		AnnotationStatistics<String> stats = new AnnotationStatistics<>();
-		JCasIterable jcasIter =new JCasIterable(collectionReader, aggregateBuilder.createAggregate());
+		JCasIterator jcasIter =new JCasIterator(collectionReader, aggregateBuilder.createAggregate());
 		JCas jCas = null;
 		while(jcasIter.hasNext()) {
 			jCas = jcasIter.next();
@@ -402,7 +402,7 @@ EvaluationOfTemporalRelations_ImplBase{
 			//find duplicates in gold relations:
 			//			Collection<BinaryTextRelation> duplicateGoldRelations = getDuplicateRelations(goldRelations, getSpan);
 			//			if(!duplicateGoldRelations.isEmpty()){
-			//				System.err.println("******Duplicate gold relations in : " + ViewURIUtil.getURI(jCas).toString());
+			//				System.err.println("******Duplicate gold relations in : " + ViewUriUtil.getURI(jCas).toString());
 			//				for (BinaryTextRelation rel : duplicateGoldRelations){
 			//					System.err.println("Duplicate : "+ formatRelation(rel));
 			//				}
@@ -411,7 +411,7 @@ EvaluationOfTemporalRelations_ImplBase{
 
 			stats.add(goldRelations, systemRelations, getSpan, getOutcome);
 			if(this.printRelations){
-				URI uri = ViewURIUtil.getURI(jCas);
+				URI uri = ViewUriUtil.getURI(jCas);
 				String[] path = uri.getPath().split("/");
 				printRelationAnnotations(path[path.length - 1], systemRelations);
 			}
@@ -983,7 +983,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		@Override
 		public void process(JCas jCas) throws AnalysisEngineProcessException {
 
-			String fileName = ViewURIUtil.getURI(jCas).toString();
+			String fileName = ViewUriUtil.getURI(jCas).toString();
 
 			Multimap<List<Annotation>, BinaryTextRelation> annotationsToRelation = HashMultimap.create();
 			for (BinaryTextRelation relation : JCasUtil.select(jCas, BinaryTextRelation.class)){

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java Tue Sep 16 19:57:19 2014
@@ -33,11 +33,11 @@ import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
-import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
+import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.eval.AnnotationStatistics;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.util.JCasUtil;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.util.JCasUtil;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTimeSpans.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTimeSpans.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTimeSpans.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTimeSpans.java Tue Sep 16 19:57:19 2014
@@ -34,25 +34,25 @@ import org.apache.ctakes.temporal.ae.fea
 import org.apache.ctakes.typesystem.type.textsem.TimeMention;
 import org.apache.ctakes.typesystem.type.textspan.Segment;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
 import org.apache.uima.collection.CollectionReader;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.CleartkSequenceAnnotator;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.crfsuite.CRFSuiteStringOutcomeDataWriter;
-import org.cleartk.classifier.feature.transform.InstanceDataWriter;
-import org.cleartk.classifier.feature.transform.InstanceStream;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DefaultSequenceDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.cleartk.classifier.liblinear.LIBLINEARStringOutcomeDataWriter;
 import org.cleartk.eval.AnnotationStatistics;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.CleartkSequenceAnnotator;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.crfsuite.CrfSuiteStringOutcomeDataWriter;
+import org.cleartk.ml.feature.transform.InstanceDataWriter;
+import org.cleartk.ml.feature.transform.InstanceStream;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DefaultSequenceDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
+import org.cleartk.ml.jar.JarClassifierBuilder;
+import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Lists;
@@ -224,35 +224,35 @@ public class EvaluationOfTimeSpans exten
 	protected AnalysisEngineDescription getDataWriterDescription(File directory)
 			throws ResourceInitializationException {
 		if(MetaTimeAnnotator.class.isAssignableFrom(this.annotatorClass)){
-			return MetaTimeAnnotator.getDataWriterDescription(CRFSuiteStringOutcomeDataWriter.class, directory);          
+			return MetaTimeAnnotator.getDataWriterDescription(CrfSuiteStringOutcomeDataWriter.class, directory);          
 		}else if(CleartkAnnotator.class.isAssignableFrom(this.annotatorClass)){
 			//limit feature selection only to TimeAnnotator
 			if("org.apache.ctakes.temporal.ae.TimeAnnotator".equals(this.annotatorClass.getName())){
 				Class<?> dataWriterClass = this.featureSelectionThreshold > 0f
 				        ? InstanceDataWriter.class
-				        : LIBLINEARStringOutcomeDataWriter.class;
+				        : LibLinearStringOutcomeDataWriter.class;
 				return TimeAnnotator.createDataWriterDescription(
 						dataWriterClass,
 						this.getModelDirectory(directory),
 						this.featureSelectionThreshold,
 						this.smoteNeighborNumber);
 			}
-			return AnalysisEngineFactory.createPrimitiveDescription(
+			return AnalysisEngineFactory.createEngineDescription(
 					this.annotatorClass,
 					CleartkAnnotator.PARAM_IS_TRAINING,
 					true,
 					DefaultDataWriterFactory.PARAM_DATA_WRITER_CLASS_NAME,
-					LIBLINEARStringOutcomeDataWriter.class,
+					LibLinearStringOutcomeDataWriter.class,
 					DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY,
 					this.getModelDirectory(directory));
 			
 		}else if(CleartkSequenceAnnotator.class.isAssignableFrom(this.annotatorClass)){
-			return AnalysisEngineFactory.createPrimitiveDescription(
+			return AnalysisEngineFactory.createEngineDescription(
 					this.annotatorClass,
 					CleartkSequenceAnnotator.PARAM_IS_TRAINING,
 					true,
 					DefaultSequenceDataWriterFactory.PARAM_DATA_WRITER_CLASS_NAME,
-					CRFSuiteStringOutcomeDataWriter.class,
+					CrfSuiteStringOutcomeDataWriter.class,
 					DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY,
 					this.getModelDirectory(directory));
 		}else{
@@ -270,7 +270,7 @@ public class EvaluationOfTimeSpans exten
 			featureSelection.train(instances);
 			featureSelection.save(TimeAnnotator.createFeatureSelectionURI(this.getModelDirectory(directory)));
 			// now write in the libsvm format
-			LIBLINEARStringOutcomeDataWriter dataWriter = new LIBLINEARStringOutcomeDataWriter(this.getModelDirectory(directory));
+			LibLinearStringOutcomeDataWriter dataWriter = new LibLinearStringOutcomeDataWriter(this.getModelDirectory(directory));
 			for (Instance<String> instance : instances) {
 				dataWriter.write(featureSelection.transform(instance));
 			}
@@ -287,7 +287,7 @@ public class EvaluationOfTimeSpans exten
 		}else if("org.apache.ctakes.temporal.ae.TimeAnnotator".equals(this.annotatorClass.getName() )){
 			return TimeAnnotator.createAnnotatorDescription(this.getModelDirectory(directory));
 		}
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				this.annotatorClass,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				false,

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java Tue Sep 16 19:57:19 2014
@@ -97,20 +97,20 @@ import org.apache.uima.jcas.tcas.Annotat
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.util.CasCopier;
 import org.apache.uima.util.XMLSerializer;
-import org.cleartk.util.ViewURIUtil;
+import org.cleartk.util.ViewUriUtil;
 import org.cleartk.util.ae.UriToDocumentTextAnnotator;
 import org.cleartk.util.cr.UriCollectionReader;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.component.ViewCreatorAnnotator;
-import org.uimafit.component.ViewTextCopierAnnotator;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.ExternalResourceFactory;
-import org.uimafit.factory.TypePrioritiesFactory;
-import org.uimafit.factory.TypeSystemDescriptionFactory;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.component.ViewCreatorAnnotator;
+import org.apache.uima.fit.component.ViewTextCopierAnnotator;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.ExternalResourceFactory;
+import org.apache.uima.fit.factory.TypePrioritiesFactory;
+import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.xml.sax.ContentHandler;
@@ -342,7 +342,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 	protected AggregateBuilder getXMIReadingPreprocessorAggregateBuilder() throws UIMAException {
 		AggregateBuilder aggregateBuilder = new AggregateBuilder();
 		aggregateBuilder.add(UriToDocumentTextAnnotator.getDescription());
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				XMIReader.class,
 				XMIReader.PARAM_XMI_DIRECTORY,
 				this.xmiDirectory));
@@ -355,11 +355,11 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 		aggregateBuilder.add(UriToDocumentTextAnnotator.getDescription());
 
 		// read manual annotations into gold view
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				ViewCreatorAnnotator.class,
 				ViewCreatorAnnotator.PARAM_VIEW_NAME,
 				GOLD_VIEW_NAME));
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				ViewTextCopierAnnotator.class,
 				ViewTextCopierAnnotator.PARAM_SOURCE_VIEW_NAME,
 				CAS.NAME_DEFAULT_SOFA,
@@ -395,22 +395,22 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 
 		// identify segments
 		if(this.xmlFormat == XMLFormat.I2B2){
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(SimpleSegmentAnnotator.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(SimpleSegmentAnnotator.class));
 		}else{
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(SegmentsFromBracketedSectionTagsAnnotator.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(SegmentsFromBracketedSectionTagsAnnotator.class));
 		}
 		// identify sentences
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				SentenceDetector.class,
 				SentenceDetector.SD_MODEL_FILE_PARAM,
 				"org/apache/ctakes/core/sentdetect/sd-med-model.zip"));
 		// identify tokens
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(TokenizerAnnotatorPTB.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(TokenizerAnnotatorPTB.class));
 		// merge some tokens
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ContextDependentTokenizerAnnotator.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ContextDependentTokenizerAnnotator.class));
 
 		// identify part-of-speech tags
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				POSTagger.class,
 				TypeSystemDescriptionFactory.createTypeSystemDescription(),
 				TypePrioritiesFactory.createTypePriorities(Segment.class, Sentence.class, BaseToken.class),
@@ -418,7 +418,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 				"org/apache/ctakes/postagger/models/mayo-pos.zip"));
 
 		// identify chunks
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				Chunker.class,
 				Chunker.CHUNKER_MODEL_FILE_PARAM,
 				FileLocator.locateFile("org/apache/ctakes/chunker/models/chunker-model.zip"),
@@ -428,23 +428,23 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 		// identify UMLS named entities
 
 		// adjust NP in NP NP to span both
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				ChunkAdjuster.class,
 				ChunkAdjuster.PARAM_CHUNK_PATTERN,
 				new String[] { "NP", "NP" },
 				ChunkAdjuster.PARAM_EXTEND_TO_INCLUDE_TOKEN,
 				1));
 		// adjust NP in NP PP NP to span all three
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				ChunkAdjuster.class,
 				ChunkAdjuster.PARAM_CHUNK_PATTERN,
 				new String[] { "NP", "PP", "NP" },
 				ChunkAdjuster.PARAM_EXTEND_TO_INCLUDE_TOKEN,
 				2));
 		// add lookup windows for each NP
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(CopyNPChunksToLookupWindowAnnotations.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(CopyNPChunksToLookupWindowAnnotations.class));
 		// maximize lookup windows
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				OverlapAnnotator.class,
 				"A_ObjectClass",
 				LookupWindowAnnotation.class,
@@ -494,7 +494,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
         "To",
         "with",
         "With" };
-    AnalysisEngineDescription lvgAnnotator = AnalysisEngineFactory.createPrimitiveDescription(
+    AnalysisEngineDescription lvgAnnotator = AnalysisEngineFactory.createEngineDescription(
         LvgAnnotator.class,
         "UseSegments",
         false,
@@ -528,30 +528,30 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 		aggregateBuilder.add(LvgAnnotator.createAnnotatorDescription());
 
 		// add dependency parser
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ClearNLPDependencyParserAE.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ClearNLPDependencyParserAE.class));
 
 		// add semantic role labeler
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ClearNLPSemanticRoleLabelerAE.class));
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ClearNLPSemanticRoleLabelerAE.class));
 
 		// add gold standard parses to gold view, and adjust gold view to correct a few annotation mis-steps
 		if(this.treebankDirectory != null){
 			aggregateBuilder.add(THYMETreebankReader.getDescription(this.treebankDirectory));
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(TimexAnnotationCorrector.class));
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(TimexAnnotationCorrector.class));
 		}else{
 			// add ctakes constituency parses to system view
-			aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(ConstituencyParser.class,
+			aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ConstituencyParser.class,
 					ConstituencyParser.PARAM_MODEL_FILENAME,
 					"org/apache/ctakes/constituency/parser/models/thyme.bin"));
 			//          "org/apache/ctakes/constituency/parser/models/sharp-3.1.bin"));
 			//            "org/apache/ctakes/constituency/parser/models/thymeNotempeval.bin"));
-			//      aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(BerkeleyParserWrapper.class,
+			//      aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(BerkeleyParserWrapper.class,
 			//          BerkeleyParserWrapper.PARAM_MODEL_FILENAME,
 			//          
 			//        "org/apache/ctakes/constituency/parser/models/thyme.gcg.4sm.bin"));
 			//          "org/apache/ctakes/constituency/parser/models/thyme.4sm.bin"));
 		}
 		// write out the CAS after all the above annotations
-		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(
+		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(
 				XMIWriter.class,
 				XMIWriter.PARAM_XMI_DIRECTORY,
 				this.xmiDirectory));
@@ -645,7 +645,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 	}
 
 	static File getXMIFile(File xmiDirectory, JCas jCas) throws AnalysisEngineProcessException {
-		return getXMIFile(xmiDirectory, new File(ViewURIUtil.getURI(jCas).getPath()));
+		return getXMIFile(xmiDirectory, new File(ViewUriUtil.getURI(jCas).getPath()));
 	}
 
 	public static class XMIWriter extends JCasAnnotator_ImplBase {
@@ -773,7 +773,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 
 		public static AnalysisEngineDescription getDescription(Class<?>... classes)
 				throws ResourceInitializationException {
-			return AnalysisEngineFactory.createPrimitiveDescription(
+			return AnalysisEngineFactory.createEngineDescription(
 					CopyFromGold.class,
 					CopyFromGold.PARAM_ANNOTATION_CLASSES,
 					classes);
@@ -825,7 +825,7 @@ org.cleartk.eval.Evaluation_ImplBase<Int
 				// get the output file name from the input file name and output directory.
 				File outDir = new File(outputDir);
 				if(!outDir.exists()) outDir.mkdirs();
-				File inFile = new File(ViewURIUtil.getURI(jcas));
+				File inFile = new File(ViewUriUtil.getURI(jcas));
 				String outFile = inFile.getName().replace(".txt", "");
 
 				// build the xml

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/PrintRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/PrintRelations.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/PrintRelations.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/PrintRelations.java Tue Sep 16 19:57:19 2014
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -33,14 +34,14 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
 import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.pipeline.JCasIterator;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
-import org.cleartk.util.ViewURIUtil;
+import org.cleartk.util.ViewUriUtil;
 import org.cleartk.util.ae.UriToDocumentTextAnnotator;
 import org.cleartk.util.cr.UriCollectionReader;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.pipeline.JCasIterable;
-import org.uimafit.util.JCasUtil;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Ordering;
@@ -83,8 +84,9 @@ public class PrintRelations {
     aggregateBuilder.add(THYMEKnowtatorXMLReader.getDescription(knowtatorXMLDirectory));
 
     // walk through each document in the collection
-    for (JCas jCas : new JCasIterable(reader, aggregateBuilder.createAggregate())) {
-      System.err.println(ViewURIUtil.getURI(jCas));
+    for (Iterator<JCas> casIter = new JCasIterator(reader, aggregateBuilder.createAggregate()); casIter.hasNext();) {
+      JCas jCas = casIter.next();
+      System.err.println(ViewUriUtil.getURI(jCas));
 
       // collect all relations and sort them by the order they appear in the text
       Collection<BinaryTextRelation> relations = JCasUtil.select(jCas, BinaryTextRelation.class);

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/RemoveTreeAlignedMentions.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/RemoveTreeAlignedMentions.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/RemoveTreeAlignedMentions.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/RemoveTreeAlignedMentions.java Tue Sep 16 19:57:19 2014
@@ -28,9 +28,9 @@ import org.apache.log4j.Logger;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.util.JCasUtil;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.util.JCasUtil;
 
 public class RemoveTreeAlignedMentions extends JCasAnnotator_ImplBase {
 

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventAndTimeExtractionPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventAndTimeExtractionPipeline.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventAndTimeExtractionPipeline.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventAndTimeExtractionPipeline.java Tue Sep 16 19:57:19 2014
@@ -20,16 +20,16 @@ package org.apache.ctakes.temporal.pipel
 
 import java.io.File;
 
+import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
 import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
 import org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator;
 import org.apache.ctakes.temporal.ae.EventAnnotator;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.collection.CollectionReader;
-import org.uimafit.component.xwriter.XWriter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.CollectionReaderFactory;
-import org.uimafit.pipeline.SimplePipeline;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
 
 import com.lexicalscope.jewel.cli.CliFactory;
 import com.lexicalscope.jewel.cli.Option;
@@ -60,7 +60,7 @@ public class EventAndTimeExtractionPipel
 		
 		ETOptions options = CliFactory.parseArguments(ETOptions.class, args);
 
-		CollectionReader collectionReader = CollectionReaderFactory.createCollectionReaderFromPath(
+		CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
 				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
 				options.getInputDirectory());
@@ -68,9 +68,9 @@ public class EventAndTimeExtractionPipel
 		AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(EventAnnotator.createAnnotatorDescription(new File(options.getEventModelDirectory())));
 		aggregateBuilder.add(BackwardsTimeAnnotator.createAnnotatorDescription(options.getTimeModelDirectory() + "model.jar"));
-    AnalysisEngine xWriter = AnalysisEngineFactory.createPrimitive(
-        XWriter.class,
-        XWriter.PARAM_OUTPUT_DIRECTORY_NAME,
+    AnalysisEngine xWriter = AnalysisEngineFactory.createEngine(
+        XmiWriterCasConsumerCtakes.class,
+        XmiWriterCasConsumerCtakes.PARAM_OUTPUTDIR,
         options.getOutputDirectory());
 		
     SimplePipeline.runPipeline(

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventExtractionPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventExtractionPipeline.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventExtractionPipeline.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventExtractionPipeline.java Tue Sep 16 19:57:19 2014
@@ -20,15 +20,15 @@ package org.apache.ctakes.temporal.pipel
 
 import java.io.File;
 
+import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
 import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
 import org.apache.ctakes.temporal.ae.EventAnnotator;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.collection.CollectionReader;
-import org.uimafit.component.xwriter.XWriter;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.CollectionReaderFactory;
-import org.uimafit.pipeline.SimplePipeline;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
 
 import com.lexicalscope.jewel.cli.CliFactory;
 import com.lexicalscope.jewel.cli.Option;
@@ -53,7 +53,7 @@ public class EventExtractionPipeline ext
 		
 		EventOptions options = CliFactory.parseArguments(EventOptions.class, args);
 
-		CollectionReader collectionReader = CollectionReaderFactory.createCollectionReaderFromPath(
+		CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
 				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
 				options.getInputDirectory());
@@ -61,9 +61,9 @@ public class EventExtractionPipeline ext
 		AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(EventAnnotator.createAnnotatorDescription(new File(options.getModelDirectory())));
 		
-    AnalysisEngine xWriter = AnalysisEngineFactory.createPrimitive(
-        XWriter.class,
-        XWriter.PARAM_OUTPUT_DIRECTORY_NAME,
+    AnalysisEngine xWriter = AnalysisEngineFactory.createEngine(
+        XmiWriterCasConsumerCtakes.class,
+        XmiWriterCasConsumerCtakes.PARAM_OUTPUTDIR,
         options.getOutputDirectory());
 		
     SimplePipeline.runPipeline(

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventPrintingPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventPrintingPipeline.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventPrintingPipeline.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventPrintingPipeline.java Tue Sep 16 19:57:19 2014
@@ -30,11 +30,11 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.collection.CollectionReader;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.CollectionReaderFactory;
-import org.uimafit.pipeline.SimplePipeline;
-import org.uimafit.util.JCasUtil;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 
 import com.lexicalscope.jewel.cli.CliFactory;
 import com.lexicalscope.jewel.cli.Option;
@@ -71,7 +71,7 @@ public class EventPrintingPipeline {
       paths[i] = items.get(i).getPath();
     }
     
-    return CollectionReaderFactory.createCollectionReader(
+    return CollectionReaderFactory.createReader(
         XMIReader.class,
         XMIReader.PARAM_FILES,
         paths);
@@ -80,7 +80,7 @@ public class EventPrintingPipeline {
   public static class PrintEventAnnotations extends JCasAnnotator_ImplBase {
 
     public static AnalysisEngine getDescription() throws ResourceInitializationException {
-      return AnalysisEngineFactory.createPrimitive(PrintEventAnnotations.class);
+      return AnalysisEngineFactory.createEngine(PrintEventAnnotations.class);
     }
 
     @Override



Mime
View raw message