//
// PRIVATE METHODS
//
private void constructFOLEg() {
ithExampleConstant = new Constant(folDSDomain.getExampleConstant(egNo));
List<Term> terms = new ArrayList<Term>();
terms.add(ithExampleConstant);
// Create the classification sentence
classification = new Predicate(folDSDomain.getGoalPredicateName(),
terms);
if (!example.getAttributeValueAsString(
folDSDomain.getDataSetTargetName()).equals(
folDSDomain.getTrueGoalValue())) {
// if not true then needs to be a Not sentence
classification = new NotSentence(classification);
}
// Create the description sentence
List<Sentence> descParts = new ArrayList<Sentence>();
for (String dname : folDSDomain.getDescriptionDataSetNames()) {
String foldDName = folDSDomain.getFOLName(dname);
terms = new ArrayList<Term>();
terms.add(ithExampleConstant);
// If multivalued becomes a two place predicate
// e.g: Patrons(X1, Some)
// otherwise: Hungry(X1) or ~ Hungry(X1)
// see pg 769 of AIMA
Sentence part = null;
if (folDSDomain.isMultivalued(dname)) {
terms.add(new Constant(folDSDomain.getFOLName(example
.getAttributeValueAsString(dname))));
part = new Predicate(foldDName, terms);
} else {
part = new Predicate(foldDName, terms);
// Need to determine if false