public class Main extends AbstractMain
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected File |
indirectory
input directory (or file) containing data to run.
|
protected NERAnnotator |
nerAnnotator
the NER annotator.
|
protected File |
outdirectory
output directory (or file) for resulting tagged data.
|
protected TextAnnotationBuilder |
tab
this helper can create text annotations from text.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Main(String[] args)
The only argument we take is the config file.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getCommandSyntax()
This method will return a string which documents the command line arguments before a system
exit.
|
protected void |
inputMenu()
render the input menu to standard out.
|
static void |
main(String[] args)
All we need to do is call the constructor, it will parse args, set everything up and run
itself (it is a thread).
|
protected int |
processArgument(String[] args,
int current)
The only argument is
<config_file_name> . |
protected void |
processCommand(String line)
We can be processing menu commands, input file or directory names, output file or directory
names, or we may be entering a string for NER processing directly.
|
errorProcessingArguments, processArguments, run
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected File indirectory
protected File outdirectory
protected final TextAnnotationBuilder tab
protected NERAnnotator nerAnnotator
public Main(String[] args)
args
- protected int processArgument(String[] args, int current) throws Exception
<config_file_name>
. This method will capture the config file
name, and initialize the system when it does.processArgument
in class AbstractMain
args
- the arguments.current
- the index of the current argument.IOException
Exception
- if fatal error, throw an exception will cause a system exit.AbstractMain.processArgument(java.lang.String[], int)
protected String getCommandSyntax()
AbstractMain
getCommandSyntax
in class AbstractMain
protected void processCommand(String line) throws Exception
processCommand
in class AbstractMain
line
- the command to process.Exception
protected void inputMenu()
inputMenu
in class AbstractMain
public static void main(String[] args)
args
- the command arguents, in this case only a config file.Copyright © 2017. All rights reserved.