!7 sS theRiddle = [[ X is the first word in my text. Is my text a letter or a program? ]]; sS theFacts = [[ "!" is a typical first word in a program. "Hello" is a typical first word in a letter. cdtwmxtqspigpyap confirms mibnjwgfxnetaxyz. ]]; sS concepts = [[ ["", "Is X a Y or a Z?"], ["mibnjwgfxnetaxyz", "X is the first word in Y."], ["cdtwmxtqspigpyap", "X is a typical first word in a Y."], ["kdpoqkaoypqenusd", "X confirms Y."] ]]; static JTextArea ta; static new L facts; static * computer = new ReliableSingleThread(f think); p-substance-noconsole { aiEnhancements(); useConceptsDump(concepts); facts = clParse(linesToCL(theFacts)); onChangeAndNow(ta = showText(""), r { computer.go() }); } svoid think { time { S w = firstWord2(getText(ta)); S riddle = formatXYZ(theRiddle, quote(w)); S type = conceptToName(solveCandidatesRiddle(facts, riddle)); titleStatus_trailing(ta, empty(type) ? null : "Writing a " + type); } }