!7 sS text = [[ The playing field has a size of 8 times 8. The columns are labelled from A (from the left). The rows are labelled from 1 (from the top). What is the label of the third column from the left? => C ]]; static Map enablerMap = litorderedmap( "The columns are labelled from A (from the left)", f columnsLabelledFromA); static S columnsLabelledFromA(S s) { new Matches m; if "What is the label of the * column from the left?" { Int i = ai_indexToNr($1); if (i != null) ret strCharPlus('A', i-1); } null; } static new LinkedHashSet enabledFunctions; p { L sentences = sentences(text); printAsciiHeading("Sentences"); pnl(sentences); for (S s : sentences) addAll(enabledFunctions, lookupAllByNLMatch(enablerMap, s)); print("Functions: " + enabledFunctions); for (S s : sentences) { L l = splitAtDoubleArrow(s); S expected = null; if (l(l) == 2) { s = first(l); expected = second(l); } L out = pcallFunctions_collectNemptyStrings(enabledFunctions, s); printAll(out); if (expected != null) print(cic(out, expected) ? "OK" : "Not OK"); } }