Commit c1a00ca5 authored by Duc Cao's avatar Duc Cao

Remove loading native libs

parent 582f7852
......@@ -102,7 +102,7 @@ public class MainSourceExtractor {
config.loadTools();
config.loadWapitiNativeLib();
// config.loadWapitiNativeLib();
long startTime = System.currentTimeMillis();
......
......@@ -81,7 +81,7 @@ public class SourceExtractorConfig {
logger.debug("temp dir: {}", tempDir);
extractConfig(tempDir);
loadTools();
loadWapitiNativeLib();
// loadWapitiNativeLib();
loadWapitiModels("");
//config();
}
......@@ -276,28 +276,28 @@ public class SourceExtractorConfig {
return new StanfordCoreNLP(props);
}
public void loadWapitiNativeLib() {
logger.debug("Loading Wapiti library ");
// we load the wapiti library compiled for UNIX/POSIX
if (org.apache.commons.lang3.SystemUtils.IS_OS_LINUX) {
logger.debug("for Linux...");
System.load(DIR_LIB + "/wapiti_java/libwapiti.so");
} else if (SystemUtils.IS_OS_WINDOWS) {
// we load the wapiti library compiled for WINDOWS
logger.debug("for Windows...");
System.load(DIR_LIB + "/wapiti_java/libwapiti_swig.dll");
System.load(DIR_LIB + "/wapiti_java/libwapiti.dll");
} else if (SystemUtils.IS_OS_MAC) {
logger.debug("for MacOsx...");
System.load(DIR_LIB + "/wapiti_java/libwapiti.dylib");
} else {
logger.error("Cette version n'est pas prévue sur votre OS");
System.exit(1);
}
logger.debug(" done");
}
// public void loadWapitiNativeLib() {
// logger.debug("Loading Wapiti library ");
//
// // we load the wapiti library compiled for UNIX/POSIX
// if (org.apache.commons.lang3.SystemUtils.IS_OS_LINUX) {
// logger.debug("for Linux...");
// System.load(DIR_LIB + "/wapiti_java/libwapiti.so");
// } else if (SystemUtils.IS_OS_WINDOWS) {
// // we load the wapiti library compiled for WINDOWS
// logger.debug("for Windows...");
// System.load(DIR_LIB + "/wapiti_java/libwapiti_swig.dll");
// System.load(DIR_LIB + "/wapiti_java/libwapiti.dll");
// } else if (SystemUtils.IS_OS_MAC) {
// logger.debug("for MacOsx...");
// System.load(DIR_LIB + "/wapiti_java/libwapiti.dylib");
//
// } else {
// logger.error("Cette version n'est pas prévue sur votre OS");
// System.exit(1);
// }
// logger.debug(" done");
// }
/**
* Load model once at startup and reuse wapiti objects
......
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