Warning: session_start(): open(/var/lib/php/sessions/sess_57cbsr75a4lqpi7hgj0np1nhru, 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
cmodule OntologyHelperBot > DynAttractorBot {
AttractorBot makeBot() {
ret new SingleAttractorBot {
void process(S s) {
s = trim(s);
if "ontology size" ret with emitAnswer(
nStatements((L) dm_call(dm_ontologyBot(), 'concepts)) + ", " +
l((L) dm_call(dm_ontologyBot(), 'conceptsWithUsefulness, true))
+ " useful, " +
l((L) dm_call(dm_ontologyBot(), 'conceptsWithUsefulness, false))
+ " not useful, "
+ l((L) dm_call(dm_ontologyBot(), 'unclassifiedConcepts)) + " unclassified");
if (eqic(s, "!random"))
ret with emitAnswer(call(dm_randomOntologyEntry(), 'render));
if (eqic(s, "!homepage"))
ret with emitAnswer("http://monkey.botcompany.de");
if (eqic(s, "!classify")) {
virtual Is entry = dm_randomUnclassifiedOntologyEntry();
if (entry == null) ret with emitAnswer("Nothing to classify!");
tempAttractor(new YesAttractor(r {
print("Got yes");
call(entry, 'setUseful, true);
emitAnswer("Yo, stored");
}));
tempAttractor(new NoAttractor(r {
print("Got no");
call(entry, 'setUseful, false);
emitAnswer("Yo, stored");
}));
ret with emitAnswer("Is this an acceptable general truth? " + simpleQuote((S) rcall render(entry)));
}
}
};
}
}