+ "greater than one!");
}
}
String negationString = Utils.getOption('G', options);
if (negationString.length() != 0) {
SelectedTag selected;
int tag;
try {
tag = Integer.parseInt(negationString);
} catch (Exception e) {
throw new Exception("Invalid value for -G option: "
+ e.getMessage() + ".");
}
try {
selected = new SelectedTag(tag, TAGS_NEGATION);
} catch (Exception e) {
throw new Exception("Value for -G option has to be "
+ "between zero and three!");
}
setNegation(selected);
}
m_classification = Utils.getFlag('S', options);
String classIndexString = Utils.getOption('c', options);
if (classIndexString.length() != 0) {
try {
m_classIndex = Integer.parseInt(classIndexString);
} catch (Exception e) {
throw new Exception("Invalid value for -c option: "
+ e.getMessage() + ".");
}
}
m_horn = Utils.getFlag('H', options);
if (m_horn && (m_negation != NONE)) {
throw new Exception("Considering horn clauses doesn't make sense "
+ "if negation allowed!");
}
/* Subsumption tests options. */
m_equivalent = !(Utils.getFlag('E', options));
m_sameClause = !(Utils.getFlag('M', options));
m_subsumption = !(Utils.getFlag('T', options));
/* Missing values options. */
String missingString = Utils.getOption('I', options);
if (missingString.length() != 0) {
SelectedTag selected;
int tag;
try {
tag = Integer.parseInt(missingString);
} catch (Exception e) {
throw new Exception("Invalid value for -I option: "
+ e.getMessage() + ".");
}
try {
selected = new SelectedTag(tag, TAGS_MISSING);
} catch (Exception e) {
throw new Exception("Value for -I option has to be "
+ "between zero and two!");
}
setMissingValues(selected);
}
/* ROC analysis. */
m_roc = Utils.getFlag('O', options);
/* Individual-based learning. */
m_partsString = Utils.getOption('p', options);
if (m_partsString.length() != 0) {
Reader reader;
try {
reader = new BufferedReader(new FileReader(m_partsString));
} catch (Exception e) {
throw new Exception("Can't open file " + e.getMessage() + ".");
}
m_parts = new Instances(reader);
}
/* Values output. */
String printValuesString = Utils.getOption('P', options);
if (printValuesString.length() != 0) {
SelectedTag selected;
int tag;
try {
tag = Integer.parseInt(printValuesString);
} catch (Exception e) {
throw new Exception("Invalid value for -P option: "
+ e.getMessage() + ".");
}
try {
selected = new SelectedTag(tag, TAGS_VALUES);
} catch (Exception e) {
throw new Exception("Value for -P option has to be "
+ "between zero and two!");
}
setValuesOutput(selected);