added not config-based constructor to Engine
@@ -50,14 +50,14 @@ public abstract class Engine implements Closeable, DataListenerProvider {
return new File(FileConst.getEngineRoot(engine), ENGINE_CONFIG_PATH);
}
+ protected final String name;
+ protected final LanguageIndex languages;
+
protected final File root;
protected final File runtime;
protected final File models;
protected final File logs;
- protected final String name;
- protected final LanguageIndex languages;
-
protected final Aligner aligner;
protected final Preprocessor preprocessor;
protected final Postprocessor postprocessor;
@@ -74,6 +74,21 @@ public abstract class Engine implements Closeable, DataListenerProvider {
throw new BootstrapException("Missing engine type (neural|phrase-based)");
}
+ protected Engine(String name, LanguageIndex languages) {
+ this.name = name;
+ this.languages = languages;
+
+ this.root = null;
+ this.runtime = null;
+ this.models = null;
+ this.logs = null;
+
+ this.aligner = null;
+ this.preprocessor = null;
+ this.postprocessor = null;
+ this.contextAnalyzer = null;
+ }
+
protected Engine(EngineConfig config) throws BootstrapException {
this.name = config.getName();
this.languages = new LanguageIndex(config.getLanguagePairs());
