public final class SimplePipeline extends Object
Modifier and Type | Method and Description |
---|---|
static JCasIterable |
iteratePipeline(CollectionReaderDescription aReader,
AnalysisEngineDescription... aEngines)
Iterate through the
JCases processed by the pipeline, allowing to access each one
after it has been processed. |
static void |
runPipeline(CAS cas,
AnalysisEngine... engines)
Run a sequence of
analysis engines over a CAS . |
static void |
runPipeline(CAS aCas,
AnalysisEngineDescription... aDescs)
Run a sequence of
analysis engines over a JCas . |
static void |
runPipeline(CollectionReader reader,
AnalysisEngine... engines)
Provides a simple way to run a pipeline for a given collection reader and sequence of analysis
engines.
|
static void |
runPipeline(CollectionReader reader,
AnalysisEngineDescription... descs)
Run the CollectionReader and AnalysisEngines as a pipeline.
|
static void |
runPipeline(CollectionReaderDescription readerDesc,
AnalysisEngineDescription... descs)
Run the CollectionReader and AnalysisEngines as a pipeline.
|
static void |
runPipeline(JCas jCas,
AnalysisEngine... engines)
Run a sequence of
analysis engines over a JCas . |
static void |
runPipeline(JCas jCas,
AnalysisEngineDescription... descs)
Run a sequence of
analysis engines over a JCas . |
public static void runPipeline(CollectionReader reader, AnalysisEngineDescription... descs) throws UIMAException, IOException
collectionProcessComplete()
on the engines and destroy()
on all
engines.reader
- The CollectionReader that loads the documents into the CAS.descs
- Primitive AnalysisEngineDescriptions that process the CAS, in order. If you have a mix
of primitive and aggregate engines, then please create the AnalysisEngines yourself
and call the other runPipeline method.UIMAException
IOException
public static void runPipeline(CollectionReaderDescription readerDesc, AnalysisEngineDescription... descs) throws UIMAException, IOException
collectionProcessComplete()
on the engines, close()
on the
reader and destroy()
on the reader and all engines.readerDesc
- The CollectionReader that loads the documents into the CAS.descs
- Primitive AnalysisEngineDescriptions that process the CAS, in order. If you have a mix
of primitive and aggregate engines, then please create the AnalysisEngines yourself
and call the other runPipeline method.UIMAException
IOException
public static void runPipeline(CollectionReader reader, AnalysisEngine... engines) throws UIMAException, IOException
collectionProcessComplete()
on the engines.reader
- a collection readerengines
- a sequence of analysis enginesUIMAException
IOException
public static void runPipeline(CAS aCas, AnalysisEngineDescription... aDescs) throws ResourceInitializationException, AnalysisEngineProcessException
analysis engines
over a JCas
. The result of
the analysis can be read from the JCas.aCas
- the CAS to processaDescs
- a sequence of analysis engines to run on the jCasResourceInitializationException
AnalysisEngineProcessException
public static void runPipeline(JCas jCas, AnalysisEngineDescription... descs) throws AnalysisEngineProcessException, ResourceInitializationException
analysis engines
over a JCas
. The result of
the analysis can be read from the JCas.jCas
- the jCas to processdescs
- a sequence of analysis engines to run on the jCasAnalysisEngineProcessException
ResourceInitializationException
public static void runPipeline(JCas jCas, AnalysisEngine... engines) throws AnalysisEngineProcessException
analysis engines
over a JCas
. This method does
not destroy
the engines or send them other events like
AnalysisEngine.collectionProcessComplete()
. This is left to the caller.jCas
- the jCas to processengines
- a sequence of analysis engines to run on the jCasAnalysisEngineProcessException
public static void runPipeline(CAS cas, AnalysisEngine... engines) throws AnalysisEngineProcessException
analysis engines
over a CAS
. This method does
not destroy
the engines or send them other events like
AnalysisEngine.collectionProcessComplete()
. This is left to the caller.cas
- the CAS to processengines
- a sequence of analysis engines to run on the jCasAnalysisEngineProcessException
public static JCasIterable iteratePipeline(CollectionReaderDescription aReader, AnalysisEngineDescription... aEngines)
JCases
processed by the pipeline, allowing to access each one
after it has been processed.Copyright © 2012–2013 The Apache Software Foundation. All rights reserved.