!7 concept Example { S sentence, subject; } p { loadConceptsFrom(#1008540); new ScoreBoard sb; testFunction(sb, f firstWord); sb.print(); } sclass ScoreBoard { double fullScore; new Map scores; void print() { printAsciiHeading("Score board"); new L l; for (O key : keys(sortByValueDesc(scores))) { double score = scores.get(key); l.add(key + " = " + score + " (" + ratioToIntPercent_floor(score, fullScore) + "%)"); } pnl(l); } } svoid testFunction(ScoreBoard sb, O f) { int fullScore = 0, score = 0; for (Example e) { S in = trim(e.sentence), out = trim(e.subject); if (empty(out)) continue; ++fullScore; S o = (S) pcallF(f, in); if (eqic(trim(o), out)) ++score; } sb.fullScore = fullScore; sb.scores.put(f, (double) score); }