static void DoubleAIML() { string path = Path.GetFullPath(@"..\..\..\config\Settings.xml"); CuteRobot botA = new CuteRobot(path); CuteRobot botB = new CuteRobot(path); string textB = new Random().Next().ToString(); Console.WriteLine("botB: {0}", textB); for (int i = 0; i < 10; i++) { string textA = botA.GetOutput(textB); Console.WriteLine("botA: {0}", textA); textB = botB.GetOutput(textA); Console.WriteLine("botB: {0}", textB); } }
static void SpeakToAIML() { Console.WriteLine("Type \"exit\" to stop chatting to this pleb."); string path = Path.GetFullPath(@"..\..\..\config\Settings.xml"); CuteRobot cr = new CuteRobot(path); while (true) { Console.Write("You: "); string command = Console.ReadLine().ToLower(); if (command == "exit") { Console.WriteLine("AIML: Goodbye."); return; } string response = cr.GetOutput(command); Console.WriteLine("AIML: {0}; {1}%", response, EnglishPercentage(response)); } }