Commit 282f8ed1 authored by Duc Cao's avatar Duc Cao

Apply the new wapiti library

parent fc2de381
......@@ -3311,7 +3311,9 @@ public class SourceExtractor {
// wapiti label -m modelPrim input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM -p
WapitiLabeling wapitiPrim = WapitiLabeling.getWapitiInstance(modelPrim);
wapitiPrim.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_PRIM, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM, jubNumber);
wapitiPrim.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_PRIM, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM, jubNumber,
modelPrim.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
if (searchSecondary) {
System.out.println();
......@@ -3320,7 +3322,9 @@ public class SourceExtractor {
sourceExtractor.paths.DIR_TEST_FILES_SEC, true);
// wapiti label -m modelSec input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_Sec -p
WapitiLabeling wapitiSec = WapitiLabeling.getWapitiInstance(modelSec);
wapitiSec.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_SEC, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_SEC, jubNumber);
wapitiSec.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_SEC, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_SEC, jubNumber,
modelSec.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
}
System.out.println();
......@@ -3405,7 +3409,9 @@ public class SourceExtractor {
WapitiLabeling wapitiPrim = WapitiLabeling.getWapitiInstance(modelPrim);
// wapiti label -m modelPrim input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM -p
wapitiPrim.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_UNLABELED_PRIM, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM,
jubNumber);
jubNumber,
modelPrim.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
if (searchSecondary) {
System.out.println();
......@@ -3416,7 +3422,9 @@ public class SourceExtractor {
WapitiLabeling wapitiSec = WapitiLabeling.getWapitiInstance(modelSec);
// wapiti label -m modelSec input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_Sec -p
wapitiSec.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_UNLABELED_SEC, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC,
jubNumber);
jubNumber,
modelSec.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
}
System.out.println();
......@@ -3515,7 +3523,9 @@ public class SourceExtractor {
WapitiLabeling wapitiPrim = WapitiLabeling.getWapitiInstance(modelPrim);
// wapiti label -m modelPrim input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM -p
wapitiPrim.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_UNLABELED_PRIM, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM,
jubNumber);
jubNumber,
modelPrim.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
if (searchSecondary) {
System.err.println();
......@@ -3526,7 +3536,9 @@ public class SourceExtractor {
WapitiLabeling wapitiSec = WapitiLabeling.getWapitiInstance(modelSec);
// wapiti label -m modelSec input=tests_files_one_by_one output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_Sec -p
wapitiSec.wapitiTest(sourceExtractor.paths.DIR_TEST_FILES_UNLABELED_SEC, sourceExtractor.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC,
jubNumber);
jubNumber,
modelSec.getAbsolutePath(),
DIR_LIB.getAbsolutePath());
}
System.err.println();
......
......@@ -34,7 +34,7 @@ public class SimpleExtractSource extends TrainingUnLabel {
String fileId = simplePreprocessing.tagXMLText(contentStream, extractorConfig);
WapitiLabeling wapitiPrim = extractorConfig.getWapitiPrim();
wapitiPrim.wapitiLabeled(this.paths.DIR_TEST_FILES_UNLABELED_PRIM, fileId, "tag", this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM);
wapitiPrim.wapitiLabeled(this.paths.DIR_TEST_FILES_UNLABELED_PRIM, fileId, "tag", this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM, extractorConfig.getDirLib());
if (searchSecondary) {
logger.debug("Labeling secondary sources (Wapiti SEC)");
deleteSentenceWithoutPrimForSec(this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM, this.paths.DIR_TEST_FILES_UNLABELED_SEC, true);
......@@ -43,7 +43,7 @@ public class SimpleExtractSource extends TrainingUnLabel {
// wapiti label -m modelSec input=tests_files_one_by_one
// output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_Sec
// -p
wapitiSec.wapitiLabeled(this.paths.DIR_TEST_FILES_UNLABELED_SEC, fileId, "wapiti", this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC);
wapitiSec.wapitiLabeled(this.paths.DIR_TEST_FILES_UNLABELED_SEC, fileId, "wapiti", this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC, extractorConfig.getDirLib());
}
logger.debug("Adding coreference and indexing information");
......
......@@ -100,7 +100,9 @@ public class TrainingLabel extends AProcess {
// wapiti label -m modelPrim input=tests_files_one_by_one
// output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM -p
WapitiLabeling wapitiPrim = WapitiLabeling.getWapitiInstance(modelPrim);
wapitiPrim.wapitiTest(this.paths.DIR_TEST_FILES_PRIM, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM, jubNumber);
wapitiPrim.wapitiTest(this.paths.DIR_TEST_FILES_PRIM, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_PRIM, jubNumber,
modelPrim.getAbsolutePath(),
extractorConfig.getDirLib().getAbsolutePath());
if (searchSecondary) {
System.out.println();
......@@ -109,7 +111,9 @@ public class TrainingLabel extends AProcess {
// wapiti label -m modelSec input=tests_files_one_by_one
// output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_Sec -p
WapitiLabeling wapitiSec = WapitiLabeling.getWapitiInstance(modelSec);
wapitiSec.wapitiTest(this.paths.DIR_TEST_FILES_SEC, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_SEC, jubNumber);
wapitiSec.wapitiTest(this.paths.DIR_TEST_FILES_SEC, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_LABELED_SEC, jubNumber,
modelSec.getAbsolutePath(),
extractorConfig.getDirLib().getAbsolutePath());
}
System.out.println();
......
......@@ -88,7 +88,9 @@ public class TrainingUnLabel extends AProcess {
WapitiLabeling wapitiPrim = WapitiLabeling.getWapitiInstance(modelPrim);
// wapiti label -m modelPrim input=tests_files_one_by_one
// output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM -p
wapitiPrim.wapitiTest(this.paths.DIR_TEST_FILES_UNLABELED_PRIM, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM, jubNumber);
wapitiPrim.wapitiTest(this.paths.DIR_TEST_FILES_UNLABELED_PRIM, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_PRIM, jubNumber,
modelPrim.getAbsolutePath(),
extractorConfig.getDirLib().getAbsolutePath());
if (searchSecondary) {
System.out.println();
......@@ -98,7 +100,9 @@ public class TrainingUnLabel extends AProcess {
WapitiLabeling wapitiSec = WapitiLabeling.getWapitiInstance(modelSec);
// wapiti label -m modelSec input=tests_files_one_by_one
// output=DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_Sec -p
wapitiSec.wapitiTest(this.paths.DIR_TEST_FILES_UNLABELED_SEC, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC, jubNumber);
wapitiSec.wapitiTest(this.paths.DIR_TEST_FILES_UNLABELED_SEC, this.paths.DIR_BIO_FILES_FOR_CONVERSION_WAPITI_UNLABELED_SEC, jubNumber,
modelSec.getAbsolutePath(),
extractorConfig.getDirLib().getAbsolutePath());
}
System.out.println();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment