ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1590292 - /ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/Chunker.java
Date Sat, 26 Apr 2014 20:24:19 GMT
Author: tmill
Date: Sat Apr 26 20:24:18 2014
New Revision: 1590292

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

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

Modified: ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/Chunker.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/Chunker.java?rev=1590292&r1=1590291&r2=1590292&view=diff
==============================================================================
--- ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/Chunker.java (original)
+++ ctakes/trunk/ctakes-chunker/src/main/java/org/apache/ctakes/chunker/ae/Chunker.java Sat
Apr 26 20:24:18 2014
@@ -31,11 +31,13 @@ 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.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;
 
 /**
@@ -164,4 +166,14 @@ public class Chunker extends JCasAnnotat
 			}
 		}
 	}
+	
+	public static AnalysisEngineDescription createAnnotatorDescription() throws ResourceInitializationException{
+	  return AnalysisEngineFactory.createPrimitiveDescription(Chunker.class);
+	}
+
+	 public static AnalysisEngineDescription createAnnotatorDescription(String modelFile) throws
ResourceInitializationException{
+	    return AnalysisEngineFactory.createPrimitiveDescription(Chunker.class,
+	        Chunker.PARAM_CHUNKER_MODEL_FILE,
+	        modelFile);
+	  }
 }



Mime
View raw message