Class RunAE
- All Implemented Interfaces:
BaseStatusCallbackListener
,StatusCallbackListener
CollectionProcessingEngine
to drive the processing. For a simpler introduction to using
AEs in an application, see class ExampleApplication in the uimaj-examples project.
Usage: java org.apache.uima.examples.RunAE [OPTIONS]
<AE descriptor or JAR file name> <input dir>
[<output dir>]
If output dir
is not specified, the analysis results will not be output. This can
be useful when only interested in performance statistics.
OPTIONS
-t <TagName> (XML Text Tag) - specifies the name of an XML tag, found within the input
documents, that contains the text to be analyzed. The text will also be detagged. If this option
is not specified, the entire document will be processed.
-l <ISO code> (Language) - specifies the ISO code for the language of the input documents.
Some AEs (e.g. PersonTitleAnnotator) require this.
-e <Encoding> - specifies character encoding of the input documents. The default is UTF-8.
-q (Quiet) - supresses progress messages that are normally printed as each document is processed.
-s<x> (Stats level) - determines the verboseness of performance statistics. s0=none,
s1=brief, s2=full. The default is brief.
-x - process input files as XCAS files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
aborted()
Called when the processing has been aborted.void
Called when the processing of a batch has completed.void
Called when the processing of an entire collection has completed.void
entityProcessComplete
(CAS aCas, EntityProcessStatus aStatus) Called when the processing of each entity has completed.void
Called when the Collection Processing Manager's initialization has completed.static void
void
paused()
Called when the processing has been paused.private void
Prints usage message.private boolean
processCmdLineArgs
(String[] args) Reads command line arguments and sets static class variables appropriately.void
resumed()
Called when the processing has been resumed (after it had been previously paused).
-
Field Details
-
aeSpecifierFile
-
inputDir
-
outputDir
-
xmlTagName
-
language
-
encoding
-
genProgressMessages
private boolean genProgressMessages -
statsLevel
private int statsLevel -
xcasInput
private boolean xcasInput -
xmiInput
private boolean xmiInput -
xLenient
private boolean xLenient -
docsProcessed
int docsProcessed -
mCPE
-
-
Constructor Details
-
RunAE
Constructor. Sets up and runs an Analysis Engine.
-
-
Method Details
-
initializationComplete
public void initializationComplete()Description copied from interface:BaseStatusCallbackListener
Called when the Collection Processing Manager's initialization has completed.- Specified by:
initializationComplete
in interfaceBaseStatusCallbackListener
- See Also:
-
entityProcessComplete
Description copied from interface:StatusCallbackListener
Called when the processing of each entity has completed.- Specified by:
entityProcessComplete
in interfaceStatusCallbackListener
- Parameters:
aCas
- the CAS containing the processed entity and the analysis resultsaStatus
- the status of the processing. This object contains a record of any Exception that occurred, as well as timing information.- See Also:
-
aborted
public void aborted()Description copied from interface:BaseStatusCallbackListener
Called when the processing has been aborted.- Specified by:
aborted
in interfaceBaseStatusCallbackListener
- See Also:
-
batchProcessComplete
public void batchProcessComplete()Description copied from interface:BaseStatusCallbackListener
Called when the processing of a batch has completed.- Specified by:
batchProcessComplete
in interfaceBaseStatusCallbackListener
- See Also:
-
collectionProcessComplete
public void collectionProcessComplete()Description copied from interface:BaseStatusCallbackListener
Called when the processing of an entire collection has completed.- Specified by:
collectionProcessComplete
in interfaceBaseStatusCallbackListener
- See Also:
-
paused
public void paused()Description copied from interface:BaseStatusCallbackListener
Called when the processing has been paused.- Specified by:
paused
in interfaceBaseStatusCallbackListener
- See Also:
-
resumed
public void resumed()Description copied from interface:BaseStatusCallbackListener
Called when the processing has been resumed (after it had been previously paused).- Specified by:
resumed
in interfaceBaseStatusCallbackListener
- See Also:
-
printUsageMessage
private void printUsageMessage()Prints usage message. -
processCmdLineArgs
Reads command line arguments and sets static class variables appropriately.- Returns:
- true if command line args were valid, false if not
-
main
-