!7 cmodule CurrentTimeDialog > DynSayAndInputBot { class TimeBot extends AbstractSayAndInputBot2 implements Runnable { Attractor thanks = new MatchAttractor("thanks|thank you|thx", r { say("You're welcome") }), whatCanYouDo = new MatchAttractor("what can you do...|what is your skill|who are you", r { say("I can tell you the time"); addAttractor(doIt); }), doIt = new MatchAttractor("do it|ok|i want that", r sayTime), talkToMe = new MatchAttractor("talk to me|hi|talk|say something", r run_public), doItAgain = new MatchAttractor("do it again|again|another time", r sayTime), whatsTheTime = new MatchAttractor("what's the time|tell me the time|time", r sayTime), yes_SayTime = new Attractor(f isYes_1, r sayTime), sayOK = new Attractor(f1_true(), r { say("OK") }); *() { addPreprocessors(f ai_dropLeadingAndTrailingAppellations_sortedByLength); standardAttractors(doItAgain, whatsTheTime, talkToMe, whatCanYouDo, thanks); } public void run { say("Do you want to know the current time?"); addAttractor(yes_SayTime); addLowPrioAttractor(sayOK); } void sayTime { say("It is " + localTime_24()); } } TimeBot makeBot() { ret new TimeBot; } }