ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1590294 - /ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java
Date Sat, 26 Apr 2014 20:36:51 GMT
Author: tmill
Date: Sat Apr 26 20:36:50 2014
New Revision: 1590294

URL: http://svn.apache.org/r1590294
Log:
CTAKES-297: Added method for getting default descriptor & model-specifying descriptor
for ChunkAdjuster.

Modified:
    ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java

Modified: ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java?rev=1590294&r1=1590293&r2=1590294&view=diff
==============================================================================
--- ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java
(original)
+++ ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/adjuster/ChunkAdjuster.java
Sat Apr 26 20:36:50 2014
@@ -26,6 +26,7 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.textspan.Sentence;
 import org.apache.log4j.Logger;
 import org.apache.uima.UimaContext;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException;
 import org.apache.uima.analysis_engine.annotator.AnnotatorProcessException;
@@ -33,6 +34,7 @@ import org.apache.uima.jcas.JCas;
 import org.apache.uima.resource.ResourceInitializationException;
 import org.uimafit.component.JCasAnnotator_ImplBase;
 import org.uimafit.descriptor.ConfigurationParameter;
+import org.uimafit.factory.AnalysisEngineFactory;
 import org.uimafit.util.JCasUtil;
 
 /**
@@ -281,4 +283,11 @@ public class ChunkAdjuster extends JCasA
 
 	}
 
+	public static AnalysisEngineDescription createAnnotatorDescription(String[] chunkPattern,
int patternIndex) throws ResourceInitializationException{
+	  return AnalysisEngineFactory.createPrimitiveDescription(ChunkAdjuster.class, 
+	      ChunkAdjuster.PARAM_CHUNK_PATTERN,
+	      chunkPattern,
+	      ChunkAdjuster.PARAM_EXTEND_TO_INCLUDE_TOKEN,
+	      patternIndex);
+	}
 }



Mime
View raw message