conclusions = loadFile(conclusionsRes.toString());
}
// Construct the inferred graph
Reasoner reasoner = reasonerF.create(configuration);
InfGraph graph = reasoner.bind(premises.getGraph());
Model result = ModelFactory.createModelForGraph(graph);
// Check the results against the official conclusions
boolean correct = true;
int goodResult = PASS;
boolean noisy = !(baseDir.equals(DEFAULT_BASE_DIR)
|| ARPTests.internet );
if (testType.equals(PositiveEntailmentTest)) {
if (conclusions == null) {
// Check that the result is flagged as semantically invalid
correct = ! graph.validate().isValid();
if (noisy) {
System.out.println("PositiveEntailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL"));
}
} else {
correct = testConclusions(conclusions.getGraph(), result.getGraph());
if (!graph.validate().isValid()) {
correct = false;
}
if (noisy) {
System.out.println("PositiveEntailmentTest " + test.getURI() + (correct ? " - OK" : " - FAIL"));
}
}
} else {
goodResult = INCOMPLETE;
// A negative entailment check
if (conclusions == null) {
// Check the result is not flagged as invalid
correct = graph.validate().isValid();
if (noisy) {
System.out.println("NegativentailmentTest of FalseDoc " + test.getURI() + (correct ? " - OK" : " - FAIL"));
}
} else {
correct = !testConclusions(conclusions.getGraph(), result.getGraph());