Commit c1a00ca5 authored by Duc Cao's avatar Duc Cao
Browse files

Remove loading native libs

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