ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1625365 [6/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-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationAnnotationViewer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationAnnotationViewer.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationAnnotationViewer.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationAnnotationViewer.java Tue Sep 16 19:57:19 2014
@@ -32,14 +32,14 @@ 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.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
-import org.cleartk.util.Options_ImplBase;
+import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.Option;
-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;
 
 /**
  * View the annotations obtained by running the relation extractor on clinical notes.
@@ -49,7 +49,7 @@ import org.uimafit.util.JCasUtil;
  */
 public class RelationAnnotationViewer {
 
-  public static class Options extends Options_ImplBase {
+  public static class Options {
 
     @Option(
         name = "--input-dir",
@@ -61,12 +61,13 @@ public class RelationAnnotationViewer {
 	public static void main(String[] args) throws Exception {
 		
 		Options options = new Options();
-		options.parseOptions(args);
+		CmdLineParser parser = new CmdLineParser(options);
+		parser.parseArgument(args);
 
 		List<File> trainFiles = Arrays.asList(options.inputDirectory.listFiles());
     CollectionReader collectionReader = getCollectionReader(trainFiles);
 		
-    AnalysisEngine relationExtractorPrinter = AnalysisEngineFactory.createPrimitive(
+    AnalysisEngine relationExtractorPrinter = AnalysisEngineFactory.createEngine(
     		RelationExtractorPrinter.class);
     		
 		SimplePipeline.runPipeline(collectionReader, relationExtractorPrinter);
@@ -126,7 +127,7 @@ public class RelationAnnotationViewer {
       paths[i] = items.get(i).getPath();
     }
     
-    return CollectionReaderFactory.createCollectionReader(
+    return CollectionReaderFactory.createReader(
         XMIReader.class,
         XMIReader.PARAM_FILES,
         paths);

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorConsumer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorConsumer.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorConsumer.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorConsumer.java Tue Sep 16 19:57:19 2014
@@ -24,8 +24,8 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.jcas.JCas;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.util.JCasUtil;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.util.JCasUtil;
 
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipeline.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipeline.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipeline.java Tue Sep 16 19:57:19 2014
@@ -18,18 +18,21 @@
  */
 package org.apache.ctakes.relationextractor.pipelines;
 
+import java.io.File;
 import java.io.IOException;
 
 import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
 import org.apache.uima.UIMAException;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.collection.CollectionReader;
-import org.cleartk.util.Options_ImplBase;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.collection.CollectionReaderDescription;
+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.CasIOUtil;
+import org.apache.uima.jcas.JCas;
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.Option;
-import org.uimafit.component.xwriter.XWriter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.CollectionReaderFactory;
-import org.uimafit.pipeline.SimplePipeline;
 
 /**
  * A simple pipeline that runs relation extraction on all files in a directory and saves
@@ -42,7 +45,7 @@ import org.uimafit.pipeline.SimplePipeli
  */
 public class RelationExtractorPipeline {
 
-  public static class Options extends Options_ImplBase {
+  public static class Options {
 
     @Option(
         name = "--input-dir",
@@ -57,25 +60,25 @@ public class RelationExtractorPipeline {
     public String outputDirectory;
   }
   
-	public static void main(String[] args) throws UIMAException, IOException {
+	public static void main(String[] args) throws UIMAException, IOException, CmdLineException {
 		
 		Options options = new Options();
-		options.parseOptions(args);
+		CmdLineParser parser = new CmdLineParser(options);
+		parser.parseArgument(args);
 
-		CollectionReader collectionReader = CollectionReaderFactory.createCollectionReaderFromPath(
+		CollectionReaderDescription collectionReader = CollectionReaderFactory.createReaderDescriptionFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
 				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
 				options.inputDirectory);
 
 		// make sure the model parameters match those used for training
-		AnalysisEngine relationExtractor = AnalysisEngineFactory.createAnalysisEngineFromPath(
+		AnalysisEngineDescription relationExtractor = AnalysisEngineFactory.createEngineDescriptionFromPath(
 				"desc/analysis_engine/RelationExtractorAggregate.xml");
     
-    AnalysisEngine xWriter = AnalysisEngineFactory.createPrimitive(
-    		XWriter.class,
-    		XWriter.PARAM_OUTPUT_DIRECTORY_NAME,
-    		options.outputDirectory);
-		
-		SimplePipeline.runPipeline(collectionReader, relationExtractor, xWriter);
+		int fileNum = 0;
+		for(JCas jcas : SimplePipeline.iteratePipeline(collectionReader, relationExtractor)){
+			CasIOUtil.writeXmi(jcas, new File(options.outputDirectory, String.format("%d.txt", fileNum++)));
+		}
+    
 	}
 }

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipelineSingleCas.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipelineSingleCas.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipelineSingleCas.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorPipelineSingleCas.java Tue Sep 16 19:57:19 2014
@@ -47,9 +47,9 @@ import java.io.IOException;
 import org.apache.uima.UIMAException;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.jcas.JCas;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.JCasFactory;
-import org.uimafit.pipeline.SimplePipeline;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.JCasFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
 
 /**
  * Run relation extraction AE on a single sentence.
@@ -66,10 +66,10 @@ public class RelationExtractorPipelineSi
 			JCas jCas = JCasFactory.createJCas();
 			jCas.setDocumentText(sampleSentence);
 
-			AnalysisEngine relationExtractor = AnalysisEngineFactory.createAnalysisEngineFromPath(
+			AnalysisEngine relationExtractor = AnalysisEngineFactory.createEngineFromPath(
 					"desc/analysis_engine/RelationExtractorAggregate.xml");
 
-		  AnalysisEngine relationConsumer = AnalysisEngineFactory.createPrimitive(
+		  AnalysisEngine relationConsumer = AnalysisEngineFactory.createEngine(
 	    		RelationExtractorConsumer.class);
 
 			SimplePipeline.runPipeline(jCas, relationExtractor, relationConsumer);

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/RelationExtractorTrain.java Tue Sep 16 19:57:19 2014
@@ -34,13 +34,13 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.relation.LocationOfTextRelation;
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
 import org.apache.uima.util.XMLInputSource;
 import org.apache.uima.util.XMLParser;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.cleartk.classifier.jar.JarClassifierBuilder;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.factory.TypeSystemDescriptionFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
+import org.cleartk.ml.jar.JarClassifierBuilder;
 import org.xml.sax.SAXException;
 
 import com.google.common.collect.ObjectArrays;
@@ -112,7 +112,7 @@ public class RelationExtractorTrain {
             ModifierExtractorEvaluation.BEST_PARAMETERS);
     evaluation.train(evaluation.getCollectionReader(trainFiles), modifierTrainDirectory);
     AnalysisEngineDescription modifierExtractorDesc =
-        AnalysisEngineFactory.createPrimitiveDescription(
+        AnalysisEngineFactory.createEngineDescription(
             ModifierExtractorAnnotator.class,
             GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
             "/" + modifierModelPath + "/model.jar");
@@ -184,7 +184,7 @@ public class RelationExtractorTrain {
         new Object[] { GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
             "/" + modelPath + "/model.jar" };
     AnalysisEngineDescription relationExtractorDescription =
-        AnalysisEngineFactory.createPrimitiveDescription(
+        AnalysisEngineFactory.createEngineDescription(
             annotatorClass,
             ObjectArrays.concat(params.configurationParameters, pathParameters, Object.class));
 

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/SelectiveRelationAnnotationViewer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/SelectiveRelationAnnotationViewer.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/SelectiveRelationAnnotationViewer.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/SelectiveRelationAnnotationViewer.java Tue Sep 16 19:57:19 2014
@@ -40,16 +40,16 @@ import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.collection.CollectionReader;
+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 org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.cas.FSArray;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.util.Options_ImplBase;
+import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.Option;
-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;
 
 /**
  * View relation instances in xmi files. Only display the relations
@@ -59,7 +59,7 @@ import org.uimafit.util.JCasUtil;
  */
 public class SelectiveRelationAnnotationViewer {
 
-  public static class Options extends Options_ImplBase {
+  public static class Options {
 
     @Option(
         name = "--input-dir",
@@ -71,12 +71,13 @@ public class SelectiveRelationAnnotation
 	public static void main(String[] args) throws Exception {
 		
 		Options options = new Options();
-		options.parseOptions(args);
+		CmdLineParser parser = new CmdLineParser(options);
+		parser.parseArgument(args);
 
 		List<File> trainFiles = Arrays.asList(options.inputDirectory.listFiles());
     CollectionReader collectionReader = getCollectionReader(trainFiles);
 		
-    AnalysisEngine relationExtractorPrinter = AnalysisEngineFactory.createPrimitive(
+    AnalysisEngine relationExtractorPrinter = AnalysisEngineFactory.createEngine(
     		RelationExtractorPrinter.class);
     		
 		SimplePipeline.runPipeline(collectionReader, relationExtractorPrinter);
@@ -161,7 +162,7 @@ public class SelectiveRelationAnnotation
     }
     
     // return a reader that will load each of the XMI files
-    return CollectionReaderFactory.createCollectionReader(
+    return CollectionReaderFactory.createReader(
         XMIReader.class,
         XMIReader.PARAM_FILES,
         paths);

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java Tue Sep 16 19:57:19 2014
@@ -46,11 +46,11 @@ import org.apache.uima.collection.Collec
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.uimafit.descriptor.ConfigurationParameter;
-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.descriptor.ConfigurationParameter;
+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;
 
 /*
  * This class is for writing trees to a file which are then used by a tree-kernel
@@ -58,7 +58,7 @@ import org.uimafit.util.JCasUtil;
  * 
  * @author Tim Miller (timothy.miller@childrens.harvard.edu)
  */
-public class TreeFeatureConsumer extends org.uimafit.component.JCasAnnotator_ImplBase {
+public class TreeFeatureConsumer extends org.apache.uima.fit.component.JCasAnnotator_ImplBase {
 	private static final String NO_RELATION_CATEGORY = "-NONE-";
 	public static final String PARAM_OUTFILE = "outputFilename";
 	public static final String PARAM_CLASSIFY_BOTH_DIRECTIONS = "ClassifyBothDirections";
@@ -231,8 +231,8 @@ public class TreeFeatureConsumer extends
 		}
 //		TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("../common-type-system/desc/common_type_system.xml");
 		try {
-			CollectionReader xmiReader = CollectionReaderFactory.createCollectionReader(XMIReader.class, XMIReader.PARAM_FILES, paths);
-			AnalysisEngine treeConsumer = AnalysisEngineFactory.createPrimitive(TreeFeatureConsumer.class, 
+			CollectionReader xmiReader = CollectionReaderFactory.createReader(XMIReader.class, XMIReader.PARAM_FILES, paths);
+			AnalysisEngine treeConsumer = AnalysisEngineFactory.createEngine(TreeFeatureConsumer.class, 
 													TreeFeatureConsumer.PARAM_OUTFILE, args[1], 
 													TreeFeatureConsumer.PARAM_CLASSIFY_BOTH_DIRECTIONS, true);
 			SimplePipeline.runPipeline(xmiReader, treeConsumer);

Modified: ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/NamedEntityFeaturesExtractorTest.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/NamedEntityFeaturesExtractorTest.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/NamedEntityFeaturesExtractorTest.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/NamedEntityFeaturesExtractorTest.java Tue Sep 16 19:57:19 2014
@@ -22,13 +22,12 @@ import static org.junit.Assert.assertTru
 
 import java.util.List;
 
-import org.apache.uima.jcas.JCas;
 import org.apache.ctakes.relationextractor.ae.features.NamedEntityFeaturesExtractor;
-import org.cleartk.classifier.Feature;
-import org.junit.Test;
-import org.uimafit.factory.JCasFactory;
-
 import org.apache.ctakes.typesystem.type.textsem.EntityMention;
+import org.apache.uima.fit.factory.JCasFactory;
+import org.apache.uima.jcas.JCas;
+import org.cleartk.ml.Feature;
+import org.junit.Test;
 
 public class NamedEntityFeaturesExtractorTest {
 

Modified: ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/RelationExtractorAnnotatorsTest.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/RelationExtractorAnnotatorsTest.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/RelationExtractorAnnotatorsTest.java (original)
+++ ctakes/trunk/ctakes-relation-extractor/src/test/java/org/apache/ctakes/relationextractor/ae/RelationExtractorAnnotatorsTest.java Tue Sep 16 19:57:19 2014
@@ -37,14 +37,14 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AggregateBuilder;
+import org.apache.uima.fit.testing.factory.TokenBuilder;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.util.XMLInputSource;
 import org.apache.uima.util.XMLParser;
 import org.junit.Test;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AggregateBuilder;
-import org.uimafit.testing.factory.TokenBuilder;
-import org.uimafit.util.JCasUtil;
 
 public class RelationExtractorAnnotatorsTest {
 

Modified: ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/contextualmodality/model.jar
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/contextualmodality/model.jar?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/doctimerel/model.jar
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/doctimerel/model.jar?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/eventannotator/model.jar
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/eventannotator/model.jar?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/timeannotator/model.jar
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal-res/src/main/resources/org/apache/ctakes/temporal/ae/timeannotator/model.jar?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/pom.xml?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/pom.xml (original)
+++ ctakes/trunk/ctakes-temporal/pom.xml Tue Sep 16 19:57:19 2014
@@ -109,10 +109,6 @@
 		</dependency>
 		<dependency>
 			<groupId>org.cleartk</groupId>
-			<artifactId>cleartk-syntax</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.cleartk</groupId>
 			<artifactId>cleartk-ml-libsvm</artifactId>
 		</dependency>
 		<dependency>

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/BackwardsTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/BackwardsTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/BackwardsTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/BackwardsTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -33,28 +33,28 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.chunking.BIOChunking;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor.PatternType;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.chunking.BioChunking;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.FeatureExtractor1;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction.PatternType;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 import com.google.common.collect.Lists;
 
@@ -71,7 +71,7 @@ public class BackwardsTimeAnnotator exte
   public static AnalysisEngineDescription createDataWriterDescription(
       Class<? extends DataWriter<String>> dataWriterClass, File outputDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         BackwardsTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -83,7 +83,7 @@ public class BackwardsTimeAnnotator exte
 
   public static AnalysisEngineDescription createAnnotatorDescription(
 	      String modelPath) throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        BackwardsTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -93,7 +93,7 @@ public class BackwardsTimeAnnotator exte
   
   public static AnalysisEngineDescription createEnsembleDescription(String modelPath,
 	      String viewName) throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        BackwardsTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -110,7 +110,7 @@ public class BackwardsTimeAnnotator exte
    */
   public static AnalysisEngineDescription createAnnotatorDescription(
       File modelDirectory) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         BackwardsTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -124,7 +124,7 @@ public class BackwardsTimeAnnotator exte
    */
   public static AnalysisEngineDescription createEnsembleDescription(File modelDirectory,
       String viewName) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         BackwardsTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -134,33 +134,33 @@ public class BackwardsTimeAnnotator exte
         new File(modelDirectory, "model.jar"));
   }
 
-  protected List<SimpleFeatureExtractor> tokenFeatureExtractors;
+  protected List<FeatureExtractor1> tokenFeatureExtractors;
 
   protected List<CleartkExtractor> contextFeatureExtractors;
   
-//  protected List<SimpleFeatureExtractor> parseFeatureExtractors;
+//  protected List<FeatureExtractor1> parseFeatureExtractors;
   protected ParseSpanFeatureExtractor parseExtractor;
   
-  private BIOChunking<BaseToken, TimeMention> timeChunking;
+  private BioChunking<BaseToken, TimeMention> timeChunking;
 
   @Override
   public void initialize(UimaContext context) throws ResourceInitializationException {
     super.initialize(context);
 
     // define chunking
-    this.timeChunking = new BIOChunking<BaseToken, TimeMention>(BaseToken.class, TimeMention.class);
+    this.timeChunking = new BioChunking<BaseToken, TimeMention>(BaseToken.class, TimeMention.class);
 
-    CombinedExtractor allExtractors = new CombinedExtractor(
-        new CoveredTextExtractor(),
-        new CharacterCategoryPatternExtractor(PatternType.REPEATS_MERGED),
-        new CharacterCategoryPatternExtractor(PatternType.ONE_PER_CHAR),
-        new TypePathExtractor(BaseToken.class, "partOfSpeech"),
-        new TimeWordTypeExtractor());
+    CombinedExtractor1<BaseToken> allExtractors = new CombinedExtractor1<>(
+        new CoveredTextExtractor<BaseToken>(),
+        CharacterCategoryPatternFunction.<BaseToken>createExtractor(PatternType.REPEATS_MERGED),
+        CharacterCategoryPatternFunction.<BaseToken>createExtractor(PatternType.ONE_PER_CHAR),
+        new TypePathExtractor<>(BaseToken.class, "partOfSpeech"),
+        new TimeWordTypeExtractor<BaseToken>());
 
-//    CombinedExtractor parseExtractors = new CombinedExtractor(
+//    CombinedExtractor1 parseExtractors = new CombinedExtractor(
 //        new ParseSpanFeatureExtractor()
 //        );
-    this.tokenFeatureExtractors = new ArrayList<SimpleFeatureExtractor>();
+    this.tokenFeatureExtractors = new ArrayList<FeatureExtractor1>();
     this.tokenFeatureExtractors.add(allExtractors);
 
     this.contextFeatureExtractors = new ArrayList<CleartkExtractor>();
@@ -201,7 +201,7 @@ public class BackwardsTimeAnnotator exte
 
         List<Feature> features = new ArrayList<Feature>();
         // features from token attributes
-        for (SimpleFeatureExtractor extractor : this.tokenFeatureExtractors) {
+        for (FeatureExtractor1 extractor : this.tokenFeatureExtractors) {
           features.addAll(extractor.extract(jCas, token));
         }
         // features from surrounding tokens
@@ -216,7 +216,7 @@ public class BackwardsTimeAnnotator exte
           features.add(new Feature("PreviousOutcome_" + i, previousOutcome));
         }
         // features from dominating parse tree
-//        for(SimpleFeatureExtractor extractor : this.parseFeatureExtractors){
+//        for(FeatureExtractor1 extractor : this.parseFeatureExtractors){
         BaseToken startToken = token;
         for(int i = tokenIndex-1; i >= 0; --i){
           String outcome = outcomes.get(i);

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CRFTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CRFTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CRFTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CRFTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -33,23 +33,23 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instances;
-import org.cleartk.classifier.chunking.BIOChunking;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instances;
+import org.cleartk.ml.chunking.BioChunking;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.FeatureExtractor1;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 public class CRFTimeAnnotator extends TemporalSequenceAnnotator_ImplBase {
   public static final String PARAM_TIMEX_VIEW = "TimexView";
@@ -62,7 +62,7 @@ public class CRFTimeAnnotator extends Te
 //  public static AnalysisEngineDescription createDataWriterDescription(
 //      Class<? extends DataWriter<String>> dataWriterClass,
 //      File outputDirectory) throws ResourceInitializationException {
-//    return AnalysisEngineFactory.createPrimitiveDescription(
+//    return AnalysisEngineFactory.createEngineDescription(
 //        CRFTimeAnnotator.class,
 //        CleartkAnnotator.PARAM_IS_TRAINING,
 //        true,
@@ -74,7 +74,7 @@ public class CRFTimeAnnotator extends Te
 
   public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 	      throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        CRFTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -84,7 +84,7 @@ public class CRFTimeAnnotator extends Te
   
   public static AnalysisEngineDescription createEnsembleDescription(String modelPath,
 	      String viewName) throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        CRFTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -101,7 +101,7 @@ public class CRFTimeAnnotator extends Te
    */
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         CRFTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -116,7 +116,7 @@ public class CRFTimeAnnotator extends Te
    */
   public static AnalysisEngineDescription createEnsembleDescription(File modelDirectory,
       String viewName) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         CRFTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -126,32 +126,32 @@ public class CRFTimeAnnotator extends Te
         new File(modelDirectory, "model.jar"));
   }
 
-  protected List<SimpleFeatureExtractor> tokenFeatureExtractors;
+  protected List<FeatureExtractor1> tokenFeatureExtractors;
 
   protected List<CleartkExtractor> contextFeatureExtractors;
   
-//  protected List<SimpleFeatureExtractor> parseFeatureExtractors;
+//  protected List<FeatureExtractor1> parseFeatureExtractors;
   protected ParseSpanFeatureExtractor parseExtractor;
 
-  private BIOChunking<BaseToken, TimeMention> timeChunking;
+  private BioChunking<BaseToken, TimeMention> timeChunking;
 
   @Override
   public void initialize(UimaContext context) throws ResourceInitializationException {
     super.initialize(context);
 
     // define chunking
-    this.timeChunking = new BIOChunking<BaseToken, TimeMention>(BaseToken.class, TimeMention.class);
-    CombinedExtractor allExtractors = new CombinedExtractor(
+    this.timeChunking = new BioChunking<BaseToken, TimeMention>(BaseToken.class, TimeMention.class);
+    CombinedExtractor1 allExtractors = new CombinedExtractor1(
         new CoveredTextExtractor(),
 //        new CharacterCategoryPatternExtractor(PatternType.REPEATS_MERGED),
 //        new CharacterCategoryPatternExtractor(PatternType.ONE_PER_CHAR),
         new TypePathExtractor(BaseToken.class, "partOfSpeech"),
         new TimeWordTypeExtractor());
 
-//    CombinedExtractor parseExtractors = new CombinedExtractor(
+//    CombinedExtractor1 parseExtractors = new CombinedExtractor(
 //        new ParseSpanFeatureExtractor()
 //        );
-    this.tokenFeatureExtractors = new ArrayList<SimpleFeatureExtractor>();
+    this.tokenFeatureExtractors = new ArrayList<>();
     this.tokenFeatureExtractors.add(allExtractors);
 
     this.contextFeatureExtractors = new ArrayList<CleartkExtractor>();
@@ -191,7 +191,7 @@ public class CRFTimeAnnotator extends Te
 
         List<Feature> features = new ArrayList<Feature>();
         // features from token attributes
-        for (SimpleFeatureExtractor extractor : this.tokenFeatureExtractors) {
+        for (FeatureExtractor1 extractor : this.tokenFeatureExtractors) {
           features.addAll(extractor.extract(jCas, token));
         }
         // features from surrounding tokens

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocTimeRelAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocTimeRelAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocTimeRelAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocTimeRelAnnotator.java Tue Sep 16 19:57:19 2014
@@ -28,9 +28,9 @@ import org.apache.uima.resource.Resource
 import org.cleartk.timeml.type.Anchor;
 import org.cleartk.timeml.type.DocumentCreationTime;
 import org.cleartk.timeml.type.TemporalLink;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
-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.util.JCasUtil;
 
 import com.google.common.collect.Maps;
 
@@ -76,7 +76,7 @@ public class ClearTKDocTimeRelAnnotator 
 
 	public static AnalysisEngineDescription getAnnotatorDescription()
 			throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(ClearTKDocTimeRelAnnotator.class);
+		return AnalysisEngineFactory.createEngineDescription(ClearTKDocTimeRelAnnotator.class);
 	}
 
 }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocumentCreationTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocumentCreationTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocumentCreationTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKDocumentCreationTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -23,8 +23,8 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.cleartk.timeml.type.DocumentCreationTime;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
 
 /**
  * for every cTAKES JCas, create a ClearTK Document Creation Time Annotation, fake span, no attribute. 
@@ -47,7 +47,7 @@ public class ClearTKDocumentCreationTime
 	}
 
 	public static AnalysisEngineDescription getAnnotatorDescription() throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(ClearTKDocumentCreationTimeAnnotator.class);
+		return AnalysisEngineFactory.createEngineDescription(ClearTKDocumentCreationTimeAnnotator.class);
 	}
 
 }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKLinkToTHYMELinkAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKLinkToTHYMELinkAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKLinkToTHYMELinkAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ClearTKLinkToTHYMELinkAnnotator.java Tue Sep 16 19:57:19 2014
@@ -29,9 +29,9 @@ import org.apache.uima.jcas.tcas.Annotat
 import org.apache.uima.resource.ResourceInitializationException;
 import org.cleartk.timeml.type.Anchor;
 import org.cleartk.timeml.type.TemporalLink;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
-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.util.JCasUtil;
 
 public class ClearTKLinkToTHYMELinkAnnotator extends JCasAnnotator_ImplBase {
 
@@ -66,7 +66,7 @@ public class ClearTKLinkToTHYMELinkAnnot
   }
 
   public static AnalysisEngineDescription getAnnotatorDescription() throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(ClearTKLinkToTHYMELinkAnnotator.class);
+    return AnalysisEngineFactory.createEngineDescription(ClearTKLinkToTHYMELinkAnnotator.class);
   }
 
   private static String getMappedCategory(String cleartkCat){

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ConstituencyBasedTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ConstituencyBasedTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ConstituencyBasedTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ConstituencyBasedTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -39,28 +39,28 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.cas.CAS;
 import org.apache.uima.cas.CASException;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Bag;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor.PatternType;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Bag;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.FeatureExtractor1;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction.PatternType;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 import org.cleartk.timeml.util.TimeWordsExtractor;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
 
 import com.google.common.base.Charsets;
 import com.google.common.collect.Maps;
@@ -84,7 +84,7 @@ TemporalEntityAnnotator_ImplBase {
   public static AnalysisEngineDescription createDataWriterDescription(
       Class<? extends DataWriter<String>> dataWriterClass,
           File outputDirectory) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         ConstituencyBasedTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -96,7 +96,7 @@ TemporalEntityAnnotator_ImplBase {
 
   public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 	      throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        ConstituencyBasedTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -106,7 +106,7 @@ TemporalEntityAnnotator_ImplBase {
   
   public static AnalysisEngineDescription createEnsembleDescription(String modelPath,
 	      String viewName) throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        ConstituencyBasedTimeAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -122,7 +122,7 @@ TemporalEntityAnnotator_ImplBase {
    */
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         ConstituencyBasedTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -137,7 +137,7 @@ TemporalEntityAnnotator_ImplBase {
    */
   public static AnalysisEngineDescription createEnsembleDescription(File modelDirectory,
       String viewName) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         ConstituencyBasedTimeAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -147,9 +147,9 @@ TemporalEntityAnnotator_ImplBase {
         new File(modelDirectory, "model.jar"));
   }
 
-  protected List<SimpleFeatureExtractor> featureExtractors;
+  protected List<FeatureExtractor1> featureExtractors;
   
-  protected SimpleFeatureExtractor wordTypeExtractor;
+  protected FeatureExtractor1 wordTypeExtractor;
   
   private static final String LOOKUP_PATH = "/org/apache/ctakes/temporal/time_word_types.txt";
   
@@ -160,8 +160,8 @@ TemporalEntityAnnotator_ImplBase {
       throws ResourceInitializationException {
     super.initialize(context);
 
-    CombinedExtractor charExtractors = new CombinedExtractor(new CharacterCategoryPatternExtractor(PatternType.REPEATS_MERGED),
-            new CharacterCategoryPatternExtractor(PatternType.ONE_PER_CHAR));
+    CombinedExtractor1<BaseToken> charExtractors = new CombinedExtractor1<>(CharacterCategoryPatternFunction.<BaseToken>createExtractor(PatternType.REPEATS_MERGED),
+            CharacterCategoryPatternFunction.<BaseToken>createExtractor(PatternType.ONE_PER_CHAR));
     
     this.wordTypes = Maps.newHashMap();
     URL url = TimeWordsExtractor.class.getResource(LOOKUP_PATH);
@@ -177,17 +177,17 @@ TemporalEntityAnnotator_ImplBase {
       throw new ResourceInitializationException(e);
     }
     
-    CombinedExtractor allExtractors = new CombinedExtractor(
-        new CoveredTextExtractor(),
+    CombinedExtractor1<BaseToken> allExtractors = new CombinedExtractor1<>(
+        new CoveredTextExtractor<BaseToken>(),
 //        new TimeWordTypeExtractor(),
         charExtractors,
-        new TypePathExtractor(BaseToken.class, "partOfSpeech"));
+        new TypePathExtractor<>(BaseToken.class, "partOfSpeech"));
     
-    featureExtractors = new ArrayList<SimpleFeatureExtractor>();
+    featureExtractors = new ArrayList<FeatureExtractor1>();
 //    featureExtractors.add(new CleartkExtractor(BaseToken.class, new CoveredTextExtractor(), new Bag(new Covered())));
     featureExtractors.add(new CleartkExtractor(BaseToken.class, allExtractors, new Bag(new Covered())));
 //    featureExtractors.add(charExtractors);
-    wordTypeExtractor = new CleartkExtractor(BaseToken.class, new TimeWordTypeExtractor(), new Bag(new Covered()));
+    wordTypeExtractor = new CleartkExtractor(BaseToken.class, new TimeWordTypeExtractor<BaseToken>(), new Bag(new Covered()));
 //    featureExtractors.add(new CleartkExtractor(BaseToken.class, new CoveredTextExtractor(), new Bag(new Preceding(1))));
  //   featureExtractors.add(new CleartkExtractor(BaseToken.class, new CoveredTextExtractor(), new Bag(new Following(1))));
     // bag of constituent descendent labels
@@ -247,7 +247,7 @@ TemporalEntityAnnotator_ImplBase {
     }
     
     // other feature types:
-    for(SimpleFeatureExtractor extractor : featureExtractors){
+    for(FeatureExtractor1 extractor : featureExtractors){
       features.addAll(extractor.extract(jCas, node));
     }
       
@@ -269,7 +269,8 @@ TemporalEntityAnnotator_ImplBase {
         this.dataWriter.write(new Instance<String>(category, features));
       }
     }else{
-      score = this.classifier.score(features, 1).get(0).getScore();
+      Map<String,Double> outcomes = this.classifier.score(features);
+      score = outcomes.get(MENTION);
       category = this.classifier.classify(features);
       if(category.equals(MENTION)){
         // add to cas

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ContextualModalityAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ContextualModalityAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ContextualModalityAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/ContextualModalityAnnotator.java Tue Sep 16 19:57:19 2014
@@ -26,30 +26,30 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 public class ContextualModalityAnnotator extends CleartkAnnotator<String> {
   public static AnalysisEngineDescription createDataWriterDescription(
       Class<? extends DataWriter<String>> dataWriterClass,
       File outputDirectory) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         ContextualModalityAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -61,7 +61,7 @@ public class ContextualModalityAnnotator
   
   public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 	      throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        ContextualModalityAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -76,7 +76,7 @@ public class ContextualModalityAnnotator
    */
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         ContextualModalityAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -89,7 +89,7 @@ public class ContextualModalityAnnotator
   @Override
   public void initialize(UimaContext context) throws ResourceInitializationException {
     super.initialize(context);
-    CombinedExtractor baseExtractor = new CombinedExtractor(
+    CombinedExtractor1 baseExtractor = new CombinedExtractor1(
         new CoveredTextExtractor(),
         new TypePathExtractor(BaseToken.class, "partOfSpeech"));
 

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CoreferenceChainAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CoreferenceChainAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CoreferenceChainAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/CoreferenceChainAnnotator.java Tue Sep 16 19:57:19 2014
@@ -19,9 +19,9 @@ import org.apache.uima.jcas.cas.EmptyFSL
 import org.apache.uima.jcas.cas.NonEmptyFSList;
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.uimafit.component.JCasAnnotator_ImplBase;
-import org.uimafit.factory.AnalysisEngineFactory;
-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.util.JCasUtil;
 
 /*
  * Does not find coreference -- simply turns annotated pairs into chains of clustered mentions
@@ -118,6 +118,6 @@ public class CoreferenceChainAnnotator e
   }
   
   public static AnalysisEngineDescription createAnnotatorDescription() throws ResourceInitializationException{
-    return AnalysisEngineFactory.createPrimitiveDescription(CoreferenceChainAnnotator.class);
+    return AnalysisEngineFactory.createEngineDescription(CoreferenceChainAnnotator.class);
   }
 }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java Tue Sep 16 19:57:19 2014
@@ -37,24 +37,24 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 //import com.google.common.base.Charsets;
 
@@ -63,7 +63,7 @@ public class DocTimeRelAnnotator extends
   public static AnalysisEngineDescription createDataWriterDescription(
       Class<? extends DataWriter<String>> dataWriterClass,
       File outputDirectory) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         DocTimeRelAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -75,7 +75,7 @@ public class DocTimeRelAnnotator extends
 
   public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 	      throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        DocTimeRelAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -90,7 +90,7 @@ public class DocTimeRelAnnotator extends
    */
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         DocTimeRelAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -112,7 +112,7 @@ public class DocTimeRelAnnotator extends
   @Override
   public void initialize(UimaContext context) throws ResourceInitializationException {
     super.initialize(context);
-    CombinedExtractor baseExtractor = new CombinedExtractor(
+    CombinedExtractor1 baseExtractor = new CombinedExtractor1(
         new CoveredTextExtractor(),
         new TypePathExtractor(BaseToken.class, "partOfSpeech"));
     this.contextExtractor = new CleartkExtractor(

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelWithTreeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelWithTreeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelWithTreeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelWithTreeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -58,29 +58,29 @@
 //import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 //import org.apache.uima.jcas.JCas;
 //import org.apache.uima.resource.ResourceInitializationException;
-//import org.cleartk.classifier.CleartkAnnotator;
-//import org.cleartk.classifier.DataWriter;
-//import org.cleartk.classifier.Feature;
-//import org.cleartk.classifier.Instance;
-//import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-//import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-//import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-//import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-//import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-//import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-//import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-//import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-//import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-//import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-//import org.uimafit.factory.AnalysisEngineFactory;
-//import org.uimafit.util.JCasUtil;
+//import org.cleartk.ml.CleartkAnnotator;
+//import org.cleartk.ml.DataWriter;
+//import org.cleartk.ml.Feature;
+//import org.cleartk.ml.Instance;
+//import org.cleartk.ml.feature.extractor.CleartkExtractor;
+//import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+//import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+//import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+//import org.cleartk.ml.feature.extractor.simple.CombinedExtractor;
+//import org.cleartk.ml.feature.extractor.simple.CoveredTextExtractor;
+//import org.cleartk.ml.feature.extractor.simple.TypePathExtractor;
+//import org.cleartk.ml.jar.DefaultDataWriterFactory;
+//import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+//import org.cleartk.ml.jar.GenericJarClassifierFactory;
+//import org.apache.uima.fit.factory.AnalysisEngineFactory;
+//import org.apache.uima.fit.util.JCasUtil;
 //
 //public class DocTimeRelWithTreeAnnotator extends CleartkAnnotator<String> {
 //
 //  public static AnalysisEngineDescription createDataWriterDescription(
 //      Class<? extends DataWriter<String>> dataWriterClass,
 //      File outputDirectory) throws ResourceInitializationException {
-//    return AnalysisEngineFactory.createPrimitiveDescription(
+//    return AnalysisEngineFactory.createEngineDescription(
 //        DocTimeRelWithTreeAnnotator.class,
 //        CleartkAnnotator.PARAM_IS_TRAINING,
 //        true,
@@ -92,7 +92,7 @@
 //
 //  public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
 //      throws ResourceInitializationException {
-//    return AnalysisEngineFactory.createPrimitiveDescription(
+//    return AnalysisEngineFactory.createEngineDescription(
 //        DocTimeRelWithTreeAnnotator.class,
 //        CleartkAnnotator.PARAM_IS_TRAINING,
 //        false,
@@ -118,7 +118,7 @@
 //  @Override
 //  public void initialize(UimaContext context) throws ResourceInitializationException {
 //    super.initialize(context);
-//    CombinedExtractor baseExtractor = new CombinedExtractor(
+//    CombinedExtractor1 baseExtractor = new CombinedExtractor(
 //        new CoveredTextExtractor(),
 //        new TypePathExtractor(BaseToken.class, "partOfSpeech"));
 //    this.contextExtractor = new CleartkExtractor(

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAdmissionTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAdmissionTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAdmissionTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAdmissionTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -43,25 +43,25 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+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.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 //import com.google.common.base.Charsets;
 
@@ -70,7 +70,7 @@ public class EventAdmissionTimeAnnotator
 	public static AnalysisEngineDescription createDataWriterDescription(
 			Class<? extends DataWriter<String>> dataWriterClass,
 					File outputDirectory) throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventAdmissionTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				true,
@@ -82,7 +82,7 @@ public class EventAdmissionTimeAnnotator
 	
 	public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 			throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventAdmissionTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				false,
@@ -97,7 +97,7 @@ public class EventAdmissionTimeAnnotator
 	   */
 	public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
 			throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventAdmissionTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				false,
@@ -119,7 +119,7 @@ public class EventAdmissionTimeAnnotator
 	@Override
 	public void initialize(UimaContext context) throws ResourceInitializationException {
 		super.initialize(context);
-		CombinedExtractor baseExtractor = new CombinedExtractor(
+		CombinedExtractor1 baseExtractor = new CombinedExtractor1(
 				new CoveredTextExtractor(),
 				new TypePathExtractor(BaseToken.class, "partOfSpeech"));
 		this.contextExtractor = new CleartkExtractor(

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventAnnotator.java Tue Sep 16 19:57:19 2014
@@ -41,27 +41,27 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.chunking.BIOChunking;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CharacterCategoryPatternExtractor.PatternType;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.chunking.BioChunking;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.FeatureExtractor1;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction;
+import org.cleartk.ml.feature.function.CharacterCategoryPatternFunction.PatternType;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 import com.google.common.base.Predicate;
 import com.google.common.collect.HashMultimap;
@@ -108,7 +108,7 @@ public class EventAnnotator extends Temp
       File outputDirectory,
       float downratio,
       float featureSelect, float smoteNeighborNumber) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         EventAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -126,7 +126,7 @@ public class EventAnnotator extends Temp
 
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         EventAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -138,7 +138,7 @@ public class EventAnnotator extends Temp
 
   public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 	      throws ResourceInitializationException {
-	    return AnalysisEngineFactory.createPrimitiveDescription(
+	    return AnalysisEngineFactory.createEngineDescription(
 	        EventAnnotator.class,
 	        CleartkAnnotator.PARAM_IS_TRAINING,
 	        false,
@@ -148,7 +148,7 @@ public class EventAnnotator extends Temp
   
   public static AnalysisEngineDescription createAnnotatorDescription()
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         EventAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,
@@ -158,13 +158,13 @@ public class EventAnnotator extends Temp
             EventAnnotator.class.getName().toLowerCase().replace('.', '/')));
   }
 
-  private BIOChunking<BaseToken, IdentifiedAnnotation> entityChunking;
+  private BioChunking<BaseToken, IdentifiedAnnotation> entityChunking;
 
-  private BIOChunking<BaseToken, EventMention> eventChunking;
+  private BioChunking<BaseToken, EventMention> eventChunking;
 
-  private BIOChunking<BaseToken, Chunk> phraseChunking;
+  private BioChunking<BaseToken, Chunk> phraseChunking;
 
-  protected SimpleFeatureExtractor tokenFeatureExtractor;
+  protected FeatureExtractor1 tokenFeatureExtractor;
 
   protected CleartkExtractor contextFeatureExtractor;
   
@@ -185,21 +185,21 @@ public class EventAnnotator extends Temp
     super.initialize(context);
 
     // define chunkings
-    this.entityChunking = new BIOChunking<BaseToken, IdentifiedAnnotation>(
+    this.entityChunking = new BioChunking<BaseToken, IdentifiedAnnotation>(
         BaseToken.class,
         IdentifiedAnnotation.class,
         "typeID");
-    this.phraseChunking = new BIOChunking<BaseToken, Chunk>(
+    this.phraseChunking = new BioChunking<BaseToken, Chunk>(
         BaseToken.class,
         Chunk.class,
         "chunkType");
-    this.eventChunking = new BIOChunking<BaseToken, EventMention>(
+    this.eventChunking = new BioChunking<BaseToken, EventMention>(
         BaseToken.class,
         EventMention.class);
 
-    this.tokenFeatureExtractor = new CombinedExtractor(
+    this.tokenFeatureExtractor = new CombinedExtractor1(
         new CoveredTextExtractor(),
-        new CharacterCategoryPatternExtractor(PatternType.ONE_PER_CHAR),
+        CharacterCategoryPatternFunction.<BaseToken>createExtractor(PatternType.ONE_PER_CHAR),
         new TypePathExtractor(BaseToken.class, "partOfSpeech"));
     this.contextFeatureExtractor = new CleartkExtractor(
         BaseToken.class,

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventCoreferenceAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventCoreferenceAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventCoreferenceAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventCoreferenceAnnotator.java Tue Sep 16 19:57:19 2014
@@ -29,14 +29,14 @@ import org.apache.uima.jcas.cas.FloatArr
 import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.jcas.tcas.DocumentAnnotation;
 import org.apache.uima.resource.ResourceInitializationException;
-import org.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.descriptor.ConfigurationParameter;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
+import org.apache.uima.fit.descriptor.ConfigurationParameter;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.util.JCasUtil;
 
 public class EventCoreferenceAnnotator extends RelationExtractorAnnotator {
 
@@ -54,7 +54,7 @@ public class EventCoreferenceAnnotator e
       Class<? extends DataWriter<String>> dataWriterClass,
       File outputDirectory,
       float downsamplingRate) throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         EventCoreferenceAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         true,
@@ -68,7 +68,7 @@ public class EventCoreferenceAnnotator e
   
   public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
       throws ResourceInitializationException {
-    return AnalysisEngineFactory.createPrimitiveDescription(
+    return AnalysisEngineFactory.createEngineDescription(
         EventCoreferenceAnnotator.class,
         CleartkAnnotator.PARAM_IS_TRAINING,
         false,

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventDischargeTimeAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventDischargeTimeAnnotator.java?rev=1625365&r1=1625364&r2=1625365&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventDischargeTimeAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventDischargeTimeAnnotator.java Tue Sep 16 19:57:19 2014
@@ -43,25 +43,25 @@ import org.apache.ctakes.typesystem.type
 import org.apache.uima.UimaContext;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+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.cleartk.classifier.CleartkAnnotator;
-import org.cleartk.classifier.DataWriter;
-import org.cleartk.classifier.Feature;
-import org.cleartk.classifier.Instance;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Covered;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Following;
-import org.cleartk.classifier.feature.extractor.CleartkExtractor.Preceding;
-import org.cleartk.classifier.feature.extractor.simple.CombinedExtractor;
-import org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor;
-import org.cleartk.classifier.feature.extractor.simple.TypePathExtractor;
-import org.cleartk.classifier.jar.DefaultDataWriterFactory;
-import org.cleartk.classifier.jar.DirectoryDataWriterFactory;
-import org.cleartk.classifier.jar.GenericJarClassifierFactory;
-import org.uimafit.factory.AnalysisEngineFactory;
-import org.uimafit.util.JCasUtil;
+import org.cleartk.ml.CleartkAnnotator;
+import org.cleartk.ml.DataWriter;
+import org.cleartk.ml.Feature;
+import org.cleartk.ml.Instance;
+import org.cleartk.ml.feature.extractor.CleartkExtractor;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Covered;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Following;
+import org.cleartk.ml.feature.extractor.CleartkExtractor.Preceding;
+import org.cleartk.ml.feature.extractor.CombinedExtractor1;
+import org.cleartk.ml.feature.extractor.CoveredTextExtractor;
+import org.cleartk.ml.feature.extractor.TypePathExtractor;
+import org.cleartk.ml.jar.DefaultDataWriterFactory;
+import org.cleartk.ml.jar.DirectoryDataWriterFactory;
+import org.cleartk.ml.jar.GenericJarClassifierFactory;
 
 //import com.google.common.base.Charsets;
 
@@ -70,7 +70,7 @@ public class EventDischargeTimeAnnotator
 	public static AnalysisEngineDescription createDataWriterDescription(
 			Class<? extends DataWriter<String>> dataWriterClass,
 					File outputDirectory) throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventDischargeTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				true,
@@ -82,7 +82,7 @@ public class EventDischargeTimeAnnotator
 
 	public static AnalysisEngineDescription createAnnotatorDescription(String modelPath)
 			throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventDischargeTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				false,
@@ -96,7 +96,7 @@ public class EventDischargeTimeAnnotator
 	   */
 	public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
 			throws ResourceInitializationException {
-		return AnalysisEngineFactory.createPrimitiveDescription(
+		return AnalysisEngineFactory.createEngineDescription(
 				EventDischargeTimeAnnotator.class,
 				CleartkAnnotator.PARAM_IS_TRAINING,
 				false,
@@ -118,7 +118,7 @@ public class EventDischargeTimeAnnotator
 	@Override
 	public void initialize(UimaContext context) throws ResourceInitializationException {
 		super.initialize(context);
-		CombinedExtractor baseExtractor = new CombinedExtractor(
+		CombinedExtractor1 baseExtractor = new CombinedExtractor1(
 				new CoveredTextExtractor(),
 				new TypePathExtractor(BaseToken.class, "partOfSpeech"));
 		this.contextExtractor = new CleartkExtractor(



Mime
View raw message