-
Notifications
You must be signed in to change notification settings - Fork 24
PipelineBuilder
Creates a pipeline using a small set of simple methods.
Some methods are order-specific and calls will directly impact ordering within the pipeline.
- Author: SPF , chip-nlp
- Version: %I%
-
Since: 10/9/2016
Use of this method is order-specific
-
Parameters:
-
parametersadd ae parameter name value pairs
-
-
Returns: this PipelineBuilder
Use of this method is order-specific. If any given parameter is already set it is ignored.
-
Parameters:
-
parametersadd ae parameter name value pairs
-
-
Returns: this PipelineBuilder
Use of this method is not order-specific
-
Parameters:
-
descriptionCollection Reader Description to place at the beginning of the pipeline
-
-
Returns: this PipelineBuilder
public PipelineBuilder reader( final Class<? extends CollectionReader> readerClass, final Object... parameters ) throws UIMAException
Use of this method is not order-specific
-
Parameters:
-
readerClassCollection Reader class to place at the beginning of the pipeline -
parametersreader parameter name value pairs. May be empty.
-
-
Returns: this PipelineBuilder
Adds a Collection reader to the beginning of the pipeline that will read files in a directory tree. Relies upon {@link org.apache.ctakes.core.config.ConfigParameterConstants#PARAM_INPUTDIR} having been specified Use of this method is not order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
UIMAExceptionif the collection reader cannot be created
-
Adds a Collection reader to the beginning of the pipeline that will read files in a directory tree. Use of this method is not order-specific
-
Parameters:
-
inputDirectorydirectory with input files
-
- Returns: this PipelineBuilder
-
Exceptions:
-
UIMAExceptionif the collection reader cannot be created
-
-
Returns: the Collection Reader for the pipeline or null if none has been specified
public PipelineBuilder add( final Class<? extends AnalysisComponent> component ) throws ResourceInitializationException
Use of this method is order-specific.
-
Parameters:
-
componentae or cc component class to add to the pipeline
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the component cannot be created
-
public PipelineBuilder add( final Class<? extends AnalysisComponent> component, final Collection<String> views, final Object... parameters ) throws ResourceInitializationException
Use of this method is order-specific.
-
Parameters:
-
componentae or cc component class to add to the pipeline -
viewscas views to use for the component -
parametersae or cc parameter name value pairs. May be empty.
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the component cannot be created
-
public PipelineBuilder addLogged( final Class<? extends AnalysisComponent> component, final Collection<String> views, final Object... parameters ) throws ResourceInitializationException
Adds an ae or cc wrapped with "Starting processing" and "Finished processing" log messages Use of this method is order-specific.
-
Parameters:
-
componentae or cc component class to add to the pipeline -
viewscas views to use for the component -
parametersae or cc parameter name value pairs. May be empty.
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the component cannot be created
-
Use of this method is order-specific.
-
Parameters:
-
descriptionae or cc component class description to add to the pipeline
-
-
Returns: this PipelineBuilder
public PipelineBuilder addDescription( final AnalysisEngineDescription description, final Collection<String> views )
Use of this method is order-specific.
-
Parameters:
-
descriptionae or cc component class description to add to the pipeline -
viewscas views to use for the component
-
-
Returns: this PipelineBuilder
public PipelineBuilder addLast( final Class<? extends AnalysisComponent> component, final Collection<String> views, final Object... parameters ) throws ResourceInitializationException
Adds an ae or cc component t othe very end of the pipeline. Use of this method is order-specific.
-
Parameters:
-
componentae or cc component class to add to the end of the pipeline -
viewscas views to use for the component -
parametersae or cc parameter name value pairs. May be empty.
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the component cannot be created
-
-
Returns: an ordered list of the annotation engines in the pipeline
Adds ae that maintains CUI information throughout the run. CUI information can later be accessed using the {@link CuiCollector} singleton Use of this method is order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the CuiCollector engine cannot be created
-
Adds ae that maintains simple Entity information throughout the run. Entity information can later be accessed using the {@link EntityCollector} singleton Use of this method is order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the EntityCollector engine cannot be created
-
Adds ae that writes an xmi file at the end of the pipeline. Relies upon {@link ConfigParameterConstants#PARAM_OUTPUTDIR} having been specified Use of this method is order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the Xmi writer engine cannot be created
-
public PipelineBuilder writeXMIs( final String outputDirectory ) throws ResourceInitializationException
Adds ae that writes an xmi file at the end of the pipeline. Use of this method is order-specific.
-
Parameters:
-
outputDirectorydirectory in which xmi files should be written
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the Xmi writer engine cannot be created
-
Adds ae that writes an html file at the end of the pipeline. Relies upon {@link ConfigParameterConstants#PARAM_OUTPUTDIR} having been specified Use of this method is order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the html writer engine cannot be created
-
public PipelineBuilder writeHtml( final String outputDirectory ) throws ResourceInitializationException
Adds ae that writes an html file at the end of the pipeline. Use of this method is order-specific.
-
Parameters:
-
outputDirectorydirectory in which html files should be written
-
- Returns: this PipelineBuilder
-
Exceptions:
-
ResourceInitializationExceptionif the html writer engine cannot be created
-
Initialize a pipeline that can be used repeatedly using {@link #run} and {@link #run(String)}. A pipeline can be extended between builds, but the full pipeline will be rebuilt on each call. Use of this method is order-specific.
- Returns: this PipelineBuilder
-
Exceptions:
-
IOExceptionif the pipeline could not be built -
UIMAExceptionif the pipeline could not be built
-
Run the pipeline using some specified collection reader. Use of this method is order-specific. This method will call {@link #build()} if the pipeline has not already been initialized.
- Returns: this PipelineBuilder
-
Exceptions:
-
IOExceptionif the pipeline could not be run -
UIMAExceptionif the pipeline could not be run
-
Run the pipeline on the given text. Use of this method is order-specific. This method will call {@link #build()} if the pipeline has not already been initialized.
-
Parameters:
-
texttext upon which to run this pipeline
-
- Returns: this PipelineBuilder
-
Exceptions:
-
IOExceptionif the pipeline could not be run -
UIMAExceptionif the pipeline could not be run
-
Run the pipeline on the given jcas. Use of this method is order-specific. This method will call {@link #build()} if the pipeline has not already been initialized.
-
Parameters:
-
jCasye olde ...
-
- Returns: this PipelineBuilder
-
Exceptions:
-
IOExceptionif the pipeline could not be run -
UIMAExceptionif the pipeline could not be run
-
- Returns: an analysis engine description, for use in creating xml descriptor files, etc.
-
Exceptions:
-
IOExceptionif the description could not be built -
UIMAExceptionif the description could not be built
-
- Java API
- Running a Pipeline
- Working with Data
- Utilities
- Text Searching
patient
AbstractPatientConsumer
AbstractPatientFileWriter
PatientNoteCollector
PatientNoteStore
PatientViewUtil
pipeline
PipeBitLocator
PipelineBuilder
PiperFileReader
PiperFileRunner
resource
FileLocator
util
CalendarUtil
MutableUimaContext
NumberedSuffixComparator
Pair
RelationArgumentUtil
StringUtil
annotation
ConceptBuilder
EssentialAnnotationUtil
IdentifiedAnnotationBuilder
IdentifiedAnnotationUtil
OntologyConceptUtil
SemanticGroup
SemanticTui
doc
DocIdUtil
JCasBuilder
TextBySectionBuilder
TextBySentenceBuilder
log
DotLogger
FinishedLogger
regex
RegexSpanFinder
TimeoutMatcher
textspan
DefaultAspanComparator
DefaultTextSpanComparator
DefaultTextSpan
TextSpan
