I have recently been experimenting wih an AIML bot (located here, it's open source: http://ntoll.org/article/project-an-aiml-chatterbot-in-c). The link to the documentation is broken however, so I am having a lot of difficulty trying to get it to run.

Currently the bot is reading and loading all the necessary .xml files to run, but every time I give it input to respond to it times out. I have had to modify the source code already to get it to read the necessary .xml files, to prevent editing the source code further I think it would be a good idea to ask if anyone has had luck with the bot. So far my code looks like this:

private void Form1_Load(object sender, EventArgs e)
        {
            Bot x = new Bot();
            x.loadSettings("C:\\development\\AIMLbot\\AIMLbot\\ConfigurationFiles\\Settings.xml"); 
            
            FileInfo testFile = new FileInfo("C:\\development\\AIMLbot\\AIMLbot\\ConfigurationFiles\\Client.xml");
            if (testFile.Exists)
            {
                XmlDocument loadxmldoc = new XmlDocument();
                loadxmldoc.Load("C:\\development\\AIMLbot\\AIMLbot\\ConfigurationFiles\\Client.xml");
                x.loadAIMLFromXML(loadxmldoc, "client.xml");
                Console.WriteLine("written xml document to bot");
            }
            User stu = new User("Stuart", x);

            Request Question = new Request("what are you?", stu, x);
            Result Answer = x.Chat(Question);
            Console.WriteLine(Answer.Output); 
        }

Every time the program runs through the writeline function fires off with the "written xml document to bot", but the second writeline function prints a single white space.
I have linked to the necessary library and am using the namespace AIMLbot. If anyone has sucessfully used the aimlbot2.5 please let me know how you did it.

Recommended Answers

All 2 Replies

According to the Usage Instructions in the linked page, that last line should be Console.WriteLine(Answer.getOutput());

Unfortunately the instructions on the linked page are for the AIMLbot 1.0, the function getOutput() doesn't exist anymore. The available output functions are .output and .rawoutput.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.