Added the ability to add new options to Options. This is for other modules to include options.
@@ -831,9 +831,15 @@ public class Options {
"The inference application used during weight learning."
);
+ private static List<Option> additionalOptions = new ArrayList<Option>();
+
// Static only.
private Options() {}
+ public static void addOption(Option option) {
+ additionalOptions.add(option);
+ }
+
/**
* Reflexively parse the options from this class.
*/
@@ -865,6 +871,10 @@ public class Options {
json.put(option.toJSON());
}
+ for (Option option : additionalOptions) {
+ json.put(option.toJSON());
+ }
+
System.out.println(json.toString(4));
}
}
