Warning: session_start(): open(/var/lib/php/sessions/sess_1am7bgfgn0i5jvf3b2n188rloq, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static JTextArea ta;
p-substance {
aiEnhancements();
ta = showText("");
onChangeAndNow(ta, r {
fS text = getText(ta);
thread { think(text); }
});
requestFocus(ta);
}
sS firstWord(S s) {
if (empty(s)) ret "";
if (isLetterOrDigit(first(s)))
ret takeCharsWhile(s, f isLetterOrDigit);
else ret "" + first(s);
}
svoid think(S text) {
time {
S w = firstWord(text);
S x = aGlobalID();
/*
w is the first word in x.
Is x a letter (1) or a program (2)?
*/
S riddle = quote(w) + " is the first word in " + x + ". Is " + x + " a letter (1) or a program (2)?";
L l = splitIntoSentences(riddle);
psl(l);
englishToConceptLanguage_concepts.set(findAIConcepts(
"rplldtbwbbnlrotj kjuwvfidiwmbjsuc xzhtvnqwzuuzixci mibnjwgfxnetaxyz"));
for (S line : l) {
print(line + " => " + englishToConceptLanguage(line));
}
}
}