Class RunAE
- java.lang.Object
-
- org.apache.uima.tools.RunAE
-
- All Implemented Interfaces:
BaseStatusCallbackListener,StatusCallbackListener
public class RunAE extends java.lang.Object implements StatusCallbackListener
An example application that reads documents from the file system, sends them though an Analysis Engine(AE), and produces XML files with inline annotations. This application uses aCollectionProcessingEngineto 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 diris 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 Modifier and Type Field Description private java.io.FileaeSpecifierFileThe ae specifier file.(package private) intdocsProcessedThe docs processed.private java.lang.StringencodingThe encoding.private booleangenProgressMessagesThe gen progress messages.private java.io.FileinputDirThe input dir.private java.lang.StringlanguageThe language.private CollectionProcessingEnginemCPEThe m CPE.private java.io.FileoutputDirThe output dir.private intstatsLevelThe stats level.private booleanxcasInputThe xcas input.private booleanxLenientThe x lenient.private booleanxmiInputThe xmi input.private java.lang.StringxmlTagNameThe xml tag name.
-
Constructor Summary
Constructors Constructor Description RunAE(java.lang.String[] args)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaborted()Aborted.voidbatchProcessComplete()Batch process complete.voidcollectionProcessComplete()Collection process complete.voidentityProcessComplete(CAS aCas, EntityProcessStatus aStatus)Entity process complete.voidinitializationComplete()Initialization complete.static voidmain(java.lang.String[] args)The main method.voidpaused()Paused.private voidprintUsageMessage()Prints usage message.private booleanprocessCmdLineArgs(java.lang.String[] args)Reads command line arguments and sets static class variables appropriately.voidresumed()Resumed.
-
-
-
Field Detail
-
aeSpecifierFile
private java.io.File aeSpecifierFile
The ae specifier file.
-
inputDir
private java.io.File inputDir
The input dir.
-
outputDir
private java.io.File outputDir
The output dir.
-
xmlTagName
private java.lang.String xmlTagName
The xml tag name.
-
language
private java.lang.String language
The language.
-
encoding
private java.lang.String encoding
The encoding.
-
genProgressMessages
private boolean genProgressMessages
The gen progress messages.
-
statsLevel
private int statsLevel
The stats level.
-
xcasInput
private boolean xcasInput
The xcas input.
-
xmiInput
private boolean xmiInput
The xmi input.
-
xLenient
private boolean xLenient
The x lenient.
-
docsProcessed
int docsProcessed
The docs processed.
-
mCPE
private CollectionProcessingEngine mCPE
The m CPE.
-
-
Method Detail
-
initializationComplete
public void initializationComplete()
Initialization complete.- Specified by:
initializationCompletein interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.initializationComplete()
-
entityProcessComplete
public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus)
Entity process complete.- Specified by:
entityProcessCompletein interfaceStatusCallbackListener- Parameters:
aCas- the a casaStatus- the a status- See Also:
StatusCallbackListener.entityProcessComplete(org.apache.uima.cas.CAS, org.apache.uima.collection.EntityProcessStatus)
-
aborted
public void aborted()
Aborted.- Specified by:
abortedin interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.aborted()
-
batchProcessComplete
public void batchProcessComplete()
Batch process complete.- Specified by:
batchProcessCompletein interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.batchProcessComplete()
-
collectionProcessComplete
public void collectionProcessComplete()
Collection process complete.- Specified by:
collectionProcessCompletein interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.collectionProcessComplete()
-
paused
public void paused()
Paused.- Specified by:
pausedin interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.paused()
-
resumed
public void resumed()
Resumed.- Specified by:
resumedin interfaceBaseStatusCallbackListener- See Also:
BaseStatusCallbackListener.resumed()
-
printUsageMessage
private void printUsageMessage()
Prints usage message.
-
processCmdLineArgs
private boolean processCmdLineArgs(java.lang.String[] args)
Reads command line arguments and sets static class variables appropriately.- Parameters:
args- the args- Returns:
- true if command line args were valid, false if not
-
main
public static void main(java.lang.String[] args)
The main method.- Parameters:
args- the arguments
-
-