ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1783046 - in /ctakes/trunk: ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/ ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/
Date Tue, 14 Feb 2017 23:02:15 GMT
Author: seanfinan
Date: Tue Feb 14 23:02:14 2017
New Revision: 1783046

URL: http://svn.apache.org/viewvc?rev=1783046&view=rev
Log:
PreprocessAndWriteXmi refactor to ConfigParameterConstants
Temporal Pipelines refactor to ConfigParameterConstants

Modified:
    ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/PreprocessAndWriteXmi.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventAndTimeExtractionPipeline.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/EventExtractionPipeline.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/FullTemporalExtractionPipeline.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/TimeExtractionPipeline.java

Modified: ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/PreprocessAndWriteXmi.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/PreprocessAndWriteXmi.java?rev=1783046&r1=1783045&r2=1783046&view=diff
==============================================================================
--- ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/PreprocessAndWriteXmi.java
(original)
+++ ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/cc/PreprocessAndWriteXmi.java
Tue Feb 14 23:02:14 2017
@@ -18,7 +18,7 @@
  */
 package org.apache.ctakes.coreference.cc;
 
-import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
+import org.apache.ctakes.core.config.ConfigParameterConstants;
 import org.apache.ctakes.core.util.DocumentIDAnnotationUtil;
 import org.apache.uima.UIMAException;
 import org.apache.uima.UimaContext;
@@ -90,7 +90,7 @@ public class PreprocessAndWriteXmi {
 
       CollectionReader reader = CollectionReaderFactory.createReaderFromPath(
             "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
-            FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
+            ConfigParameterConstants.PARAM_INPUTDIR,
             inputRoot );
 
       AnalysisEngine serializer = AnalysisEngineFactory.createEngine(

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=1783046&r1=1783045&r2=1783046&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 Feb 14 23:02:14 2017
@@ -18,10 +18,10 @@
  */
 package org.apache.ctakes.temporal.pipelines;
 
-import java.io.File;
-
+import com.lexicalscope.jewel.cli.CliFactory;
+import com.lexicalscope.jewel.cli.Option;
 import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
-import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
+import org.apache.ctakes.core.config.ConfigParameterConstants;
 import org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator;
 import org.apache.ctakes.temporal.ae.EventAnnotator;
 import org.apache.uima.analysis_engine.AnalysisEngine;
@@ -31,8 +31,7 @@ import org.apache.uima.fit.factory.Analy
 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;
+import java.io.File;
 
 /**
  * Given a trained event extraction model, run the event extractor on files in a directory.
@@ -62,8 +61,8 @@ public class EventAndTimeExtractionPipel
 
 		CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
-				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
-				options.getInputDirectory());
+            ConfigParameterConstants.PARAM_INPUTDIR,
+            options.getInputDirectory());
 
 		AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(EventAnnotator.createAnnotatorDescription(new File(options.getEventModelDirectory())));

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=1783046&r1=1783045&r2=1783046&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 Feb 14 23:02:14 2017
@@ -18,10 +18,10 @@
  */
 package org.apache.ctakes.temporal.pipelines;
 
-import java.io.File;
-
+import com.lexicalscope.jewel.cli.CliFactory;
+import com.lexicalscope.jewel.cli.Option;
 import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
-import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
+import org.apache.ctakes.core.config.ConfigParameterConstants;
 import org.apache.ctakes.temporal.ae.EventAnnotator;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.collection.CollectionReader;
@@ -30,8 +30,7 @@ import org.apache.uima.fit.factory.Analy
 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;
+import java.io.File;
 
 /**
  * Given a trained event extraction model, run the event extractor on files in a directory.
@@ -55,8 +54,8 @@ public class EventExtractionPipeline ext
 
 		CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
-				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
-				options.getInputDirectory());
+            ConfigParameterConstants.PARAM_INPUTDIR,
+            options.getInputDirectory());
 
 		AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(EventAnnotator.createAnnotatorDescription(new File(options.getModelDirectory())));

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/FullTemporalExtractionPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/FullTemporalExtractionPipeline.java?rev=1783046&r1=1783045&r2=1783046&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/FullTemporalExtractionPipeline.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/FullTemporalExtractionPipeline.java
Tue Feb 14 23:02:14 2017
@@ -18,14 +18,10 @@
  */
 package org.apache.ctakes.temporal.pipelines;
 
-import java.io.File;
-
-import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
-import org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator;
-import org.apache.ctakes.temporal.ae.DocTimeRelAnnotator;
-import org.apache.ctakes.temporal.ae.EventAnnotator;
-import org.apache.ctakes.temporal.ae.EventEventRelationAnnotator;
-import org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator;
+import com.lexicalscope.jewel.cli.CliFactory;
+import com.lexicalscope.jewel.cli.Option;
+import org.apache.ctakes.core.config.ConfigParameterConstants;
+import org.apache.ctakes.temporal.ae.*;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
@@ -38,8 +34,7 @@ import org.apache.uima.fit.pipeline.Simp
 import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 
-import com.lexicalscope.jewel.cli.CliFactory;
-import com.lexicalscope.jewel.cli.Option;
+import java.io.File;
 
 public class FullTemporalExtractionPipeline extends
     TemporalExtractionPipeline_ImplBase {
@@ -91,7 +86,7 @@ public class FullTemporalExtractionPipel
     
     CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
         "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
-        FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
+          ConfigParameterConstants.PARAM_INPUTDIR,
         options.getInputDirectory());
 
     AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/TimeExtractionPipeline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/TimeExtractionPipeline.java?rev=1783046&r1=1783045&r2=1783046&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/TimeExtractionPipeline.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/pipelines/TimeExtractionPipeline.java
Tue Feb 14 23:02:14 2017
@@ -18,9 +18,9 @@
  */
 package org.apache.ctakes.temporal.pipelines;
 
-import java.io.File;
-
-import org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader;
+import com.lexicalscope.jewel.cli.CliFactory;
+import com.lexicalscope.jewel.cli.Option;
+import org.apache.ctakes.core.config.ConfigParameterConstants;
 import org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.collection.CollectionReader;
@@ -28,9 +28,6 @@ import org.apache.uima.fit.factory.Aggre
 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;
-
 /**
  * Given a temporal expression extraction model, run the time expression extractor 
  * on files in a directory of notes. Save the resulting annotations in XMI files. 
@@ -54,8 +51,8 @@ public class TimeExtractionPipeline exte
 
 		CollectionReader collectionReader = CollectionReaderFactory.createReaderFromPath(
 				"../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml",
-				FilesInDirectoryCollectionReader.PARAM_INPUTDIR,
-				options.getInputDirectory());
+            ConfigParameterConstants.PARAM_INPUTDIR,
+            options.getInputDirectory());
 
 		AggregateBuilder aggregateBuilder = getPreprocessorAggregateBuilder();
 		aggregateBuilder.add(BackwardsTimeAnnotator.createAnnotatorDescription(options.getTimeModelDirectory()
+ "model.jar"));



Mime
View raw message