Warning: session_start(): open(/var/lib/php/sessions/sess_ifdu33ar5k63ho26ftk3kvaptn, 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
p {
botIfMain();
consoleInputIfMain("What did you learn today?");
}
answer {
if "What did you learn today?"
ret search("I learned today:", "I learned today/", "I learned today/that");
if "What's your name?|What is your name?"
ret search("My name is", "My name/is", "My name is/");
for (WebNode n : indexedNodes2("Standard answer"))
if (match(web_operandText(n, "to"), s))
try answer web_operandText(n, "is", "can be");
}
static S search(S text, S... stuff) {
new LinkedHashSet results;
for (S s : stuff) {
int i = smartIndexOf(s, '/');
L l = indexedNodes2(takeFirst(i, s));
results.addAll(web_uniqueOperandTexts(l, substring(s, i+1)));
}
ret addSpaceIfNempty(text) + or2(joinWithSpace(map addDotIfNoPunctuation(results)), "Nothing");
}