public static void main(String[] args) throws WikiInitializationException, WikiTitleParsingException, IOException { if (args.length==0) { System.out.println("Missing configuration file path on first argument"); return; } System.out.println("Configurationm file: " + args[0]); ConfigurationFile conf; try { conf = new ConfigurationFile(args[0]); } catch (ConfigurationFileDuplicateKeyException e) { System.out.println("Exception when initializing the ConfigurationFile Class. error was:\n"+ e.getMessage()); return; } catch (ConfigurationException e) { System.out.println("Exception when initializing the ConfigurationFile Class. error was:\n"+ e.getMessage()); return; } WikipediaLexicalInferencesMiner miner = new WikipediaLexicalInferencesMinerForEnglish(); miner.MineWikipedia(conf); } }
public static void main(String[] args) throws WikiInitializationException, WikiTitleParsingException, IOException { if (args.length==0) { System.out.println("Missing configuration file path on first argument"); return; } ConfigurationFile conf; try { conf = new ConfigurationFile(args[0]); } catch (ConfigurationFileDuplicateKeyException e) { System.out.println("Exception when initializing the ConfigurationFile Class. error was:\n"+ e.getMessage()); return; } catch (ConfigurationException e) { System.out.println("Exception when initializing the ConfigurationFile Class. error was:\n"+ e.getMessage()); return; } System.out.println("Configuration read. Initializing the miner ..."); WikipediaLexicalInferencesMiner miner = new WikipediaLexicalInferencesMinerForItalian(); miner.MineWikipedia(conf); } }
UtilClass.init(generalConf); } catch (ConfigurationException e) { m_logger.fatal("No \"General\" module found in configuration file. please review your file. "+e.getMessage()); return; maxNPSize = generalConf.getInt("max_NP_words_count"); } catch (ConfigurationException e) { m_logger.fatal("Missing configuration. module \"General\" key max_NP_words_count which represents the maximum number of words in noun phrase must have a value. "+e.getMessage()); return; m_logger.fatal("Missing configuration. module \"jwpl\" must have the keys: host ,database ,user ,password and language. "+e.getMessage()); return; m_logger.fatal("Missing configuration. module \"Extractors\" must have the keys: useCategory ,useRedirect ,useLink ,useParenthesis, useLexicalIDM and useSyntacticIDM (boolean values). "+e.getMessage()); return; m_logger.fatal("module \"Database\" in configuration file is missing. "+e.getMessage()); return; processingToolsConf = conf.getModuleConfiguration("processing_tools"); } catch (ConfigurationException e) { m_logger.fatal("module \"processing_tools\" in configuration file is missing. "+e.getMessage()); return; StopwordsDictionary.init(stopwordsFilePath); } catch (ConfigurationException e) { m_logger.fatal("module \"processing_tools\" does not contain the stopwordsFilePath key. Exception: "+e.getMessage()); return;
insertTool = new InsertionTool(dbConfig); } catch (ConfigurationException e) { m_logger.error("error initializing the insertion tool. one of the needed config on \"Database\" module is missing "+ e.getMessage()); return;