*
* @param args command-line arguments
*/
public void startEngine(String[] args) {
try {
final OptionManager om = OptionManager.instance();
final boolean hasArg = om.parseCommandLine(args,OPTION_CONTAINER);
/* Update the verbosity level according to the verbosity option */
String verbosity = null;
if (hasArg) {
verbosity = (String)OptionManager.instance().getOptionValue(OPTION_CONTAINER,"system", "verbosity");
} else {
verbosity = (String)OptionManager.instance().getOptionDefaultValue("system", "verbosity");
}
if (verbosity != null) {
SystemLogger.instance().setSystemVerbosityLevel(verbosity.toUpperCase());
}
/* Help or reading the option file */
if (!hasArg || om.getNumberOfOptionValues(OPTION_CONTAINER) == 0) {
SystemLogger.logger().info(SystemInfo.header());
SystemLogger.logger().info(SystemInfo.shortHelp());
return;
} else if (om.getOptionValue(OPTION_CONTAINER,"system", "help") != null) {
SystemLogger.logger().info(SystemInfo.header());
SystemLogger.logger().info(om.getOptionDescriptions());
return;
} else {
if (om.getOptionValue(OPTION_CONTAINER,"system", "option_file") != null && om.getOptionValue(0,"system", "option_file").toString().length() > 0) {
om.parseOptionInstanceXMLfile((String)om.getOptionValue(OPTION_CONTAINER,"system", "option_file"));
}
}
maltParser();
} catch (MaltChainedException e) {
if (SystemLogger.logger().isDebugEnabled()) {