Package org.apache.uima.fit.cpe
Class CpePipeline
java.lang.Object
org.apache.uima.fit.cpe.CpePipeline
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrunPipeline(int parallelism, CollectionReaderDescription readerDesc, AnalysisEngineDescription... descs) Run the CollectionReader and AnalysisEngines as a multi-threaded pipeline.static voidrunPipeline(CollectionReaderDescription readerDesc, AnalysisEngineDescription... descs) Run the CollectionReader and AnalysisEngines as a multi-threaded pipeline.
-
Method Details
-
runPipeline
public static void runPipeline(CollectionReaderDescription readerDesc, AnalysisEngineDescription... descs) throws SAXException, CpeDescriptorException, IOException, ResourceInitializationException, InvalidXMLException, AnalysisEngineProcessException Run the CollectionReader and AnalysisEngines as a multi-threaded pipeline. This call uses a number of threads equal to the number of available processors (as reported by Java, so usually boiling down to cores) minus 1 - minimum of 1.- Parameters:
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.- Throws:
SAXException- if there was a XML-related problem materializing the component descriptors that are referenced from the CPE descriptorInvalidXMLException- if there was a XML-related problem materializing the component descriptors that are referenced from the CPE descriptorIOException- if there was a I/O-related problem materializing the component descriptors that are referenced from the CPE descriptorCpeDescriptorException- if there was a problem configuring the CPE descriptorResourceInitializationException- if there was a problem initializing or running the CPE.AnalysisEngineProcessException- if there was a problem initializing or running the CPE.
-
runPipeline
public static void runPipeline(int parallelism, CollectionReaderDescription readerDesc, AnalysisEngineDescription... descs) throws SAXException, CpeDescriptorException, IOException, ResourceInitializationException, InvalidXMLException, AnalysisEngineProcessException Run the CollectionReader and AnalysisEngines as a multi-threaded pipeline.- Parameters:
parallelism- Number of threads to use when running the analysis engines in the CPE.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.- Throws:
SAXException- if there was a XML-related problem materializing the component descriptors that are referenced from the CPE descriptorIOException- if there was a I/O-related problem materializing the component descriptors that are referenced from the CPE descriptorCpeDescriptorException- if there was a problem configuring the CPE descriptorResourceInitializationException- if there was a problem initializing or running the CPE.InvalidXMLException- if there was a problem initializing or running the CPE.AnalysisEngineProcessException- if there was a problem running the CPE.
-