/** * Reads the threshold from the configuration. We use a threshold to decide whether it's an * entailment (above the threshold) or not (below). This is intended for illustration purposes * only, as the similarity scores are not normally distributed. */ private void initializeThreshold(CommonConfig config) throws ConfigurationException, ComponentException { NameValueTable EDA = null; try { EDA = config.getSection(this.getClass().getName()); } catch (ConfigurationException e) { throw new ConfigurationException(e.getMessage() + " No EDA section."); } threshold = EDA.getDouble("threshold"); }
@Test public void test() { /** German */ /* Baseline: BagOfWords, BagOfLemmas */ File configFile = new File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base_DE.xml"); // 0.61125 /* GermaNet: GermaNet without POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_GN_DE.xml"); // 0.51125 /* GermaNetPos: GermaNet with POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_GNPos_DE.xml"); // 0.51125 /* Baseline + GermaNet */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GN_DE.xml"); // 0.61875 /* Baseline + GermaNetPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos_DE.xml"); // 0.615 /* DistSim: distributional similarity */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_DS_DE.xml"); // 0.51125 /* Baseline + DistSim */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DS_DE.xml"); // 0.6125 /* DBPos: DerivBase with POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_DBPos_DE.xml"); // 0.51125 /* Baseline + DBPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DBPos_DE.xml"); // 0.61375 /* Baseline + GermaNet + DistSim */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GN+DS_DE.xml"); // 0.62 /* Baseline + GermaNetPos + DistSim */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DS_DE.xml"); // 0.61375 /* Baseline + DistSim + DBPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DS+DBPos_DE.xml"); // 0.60875 /* Baseline + GermaNetPos + DistSim + DBPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DS+DBPos_DE.xml"); // 0.61625 /* TP: dependency triples without POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_TP_DE.xml"); // 0.58625 /* TPPos: dependency triples with POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_TPPos_DE.xml"); // 0.5875 /* Baseline + TP */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TP_DE.xml"); // 0.62375 /* Baseline + TPPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TPPos_DE.xml"); // 0.63125 /* TS: tree skeleton scoring */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_TS_DE.xml"); // 0.58 /* Baseline + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TS_DE.xml"); // 0.625 /* Baseline + TP + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TP+TS_DE.xml"); // 0.62875 /* Baseline + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TPPos+TS_DE.xml"); // 0.63375 /* Baseline + TP + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TP+TPPos+TS_DE.xml"); // 0.63375 /* Baseline + DS + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DS+TPPos+TS_DE.xml"); // 0.62375 /* Baseline + GNPos + DS + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DS+TPPos+TS_DE.xml"); // 0.63 /* Baseline + GNPos + DS + DBPos + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DS+DBPos+TPPos+TS_DE.xml"); // 0.63125 /* TransDm */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_TransDm_DE.xml"); // 0.51125 /* TransDm with POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_TransDmPos_DE.xml"); // 0.51125 /* Baseline + TransDm */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TransDm_DE.xml"); // 0.61625 /* Baseline + TransDm with POS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TransDmPos_DE.xml"); // 0.62 /* Baseline + TransDm with POS + TP + TPPOS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TransDmPos+TP+TPPos_DE.xml"); // 0.6275 /* Baseline + TransDm with POS + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TransDmPos+TP+TPPos+TS_DE.xml"); // 0.635 /* Baseline + GermaNet + DerivBase + TransDm with POS + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DBPos+TransDmPos+TP+TPPos+TS_DE.xml"); // 0.635 /* Baseline + GermaNet + TransDm with POS + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+TransDmPos+TP+TPPos+TS_DE.xml"); // 0.63625 /* Baseline + DerivBase + TransDm with POS + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DBPos+TransDmPos+TP+TPPos+TS_DE.xml"); // 0.63 /* Baseline + GermaNet + DistSim + DerivBase + TransDm with POS + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+GNPos+DS+DBPos+TransDmPos+TP+TPPos+TS_DE.xml"); // 0.6325 /* Baseline + DistSim + TP + TPPOS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DS+TP+TPPos_DE.xml"); // 0.62625 /* Baseline + DistSim + TP + TPPOS + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+DS+TP+TPPos+TS_DE.xml"); // 0.6275 /** English */ /* Baseline */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base_EN.xml"); // 0.625 /* WN: WordNet */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_WN_EN.xml"); // 0.5125 /* Baseline + WN */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+WN_EN.xml"); // 0.63 false false false // 0.6325 true false false (default) // 0.62375 false true true // 0.62625 true true true /* VO: VerbOcean */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_VO_EN.xml"); // 0.5125 true (default) // 0.5075 false /* Baseline + VO */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+VO_EN.xml"); // 0.6225 true (default) // 0.6225 false /* Baseline + WN + VO */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+WN+VO_EN.xml"); // 0.62375 /* TP: dependency triples without POS */ /* TPPos: dependency triples with POS */ /* Baseline + TP */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TP_EN.xml"); // 0.63125 /* Baseline + TPPos */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TPPos_EN.xml"); // 0.63 /* TS: tree skeleton scoring */ /* Baseline + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TS_EN.xml"); // 0.63625 /* Baseline + TP + TS */ /* Baseline + TPPos + TS */ /* Baseline + TP + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+TP+TPPos+TS_EN.xml"); // 0.64375 /* Baseline + WN + VO + TP + TPPos + TS */ // File configFile = new // File("./src/main/resources/configuration-file/MaxEntClassificationEDA_Base+WN+VO+TP+TPPos+TS_EN.xml"); // 0.645 Assume.assumeTrue(configFile.exists()); CommonConfig config = null; try { // read in the configuration from the file config = new ImplCommonConfig(configFile); } catch (ConfigurationException e) { logger.warning(e.getMessage()); } Assume.assumeNotNull(config); // Gil: testLAP_DE() is a very very long test. (More than build process itself) // German RTE tests // testLAP_DE(); // testParser_DE(); // testTraining(config); // testTesting_SingleTH(config); // testTesting_MultiTH(config); // testTesting_MultiTH_AND_Output(config); // Rui: testLAP_EN(), testTraining_EN(), and testTesting_MultiTH_EN() also take long time /* English RTE tests testLAP_EN(); testParser_EN("poly"); testTraining(config); testTesting_SingleTH(config); testTesting_MultiTH(config); testTesting_MultiTH_AND_Output(config); */ }