I would like to set up grokitbot to chat locally with the user through a terminal.
Grokitbot is hooked up to speak directly to an irc server using twisted.
Looking at the sourcecode, it seems that Grokitbot.py does all the irc stuff, and AIMLBot.py does all the actual work, so I'm discarding the former file. This is AIMLBot.py
There is another script called AIMLBayes.py which does all the Bayes stuff.
In my first question, I was running the code without a string to send as a name. therefor a training file could not be created.
So, rephrasing my original question:
from AIMLBot import AIMLBot
bot = AIMLBot("Joe")
while True:
line = raw_input()
print bot.on_MSG_IN("netanel", line)
Here is the log from the script:
Loading data/aiml/startup.xml... done (0.11 seconds)
Loading data/aiml\example.aiml... done (0.01 seconds)
Loading data/aiml\goodbye.aiml... done (0.00 seconds)
Loading data/aiml\hello.aiml... done (0.01 seconds)
Loading data/aiml\main.aiml... done (0.01 seconds)
Loading data/aiml\thanks.aiml... done (0.00 seconds)
Loading data/aiml\tools.aiml... done (0.01 seconds)
Loading data/aiml\unknown.aiml... done (0.00 seconds)
Interpreter Version Info: PyAIML 0.8.6
Kernel bootstrap completed in 0.18 seconds
[Alert] Failed to load bayesian brain - Joe.bay, creating it now
hello
Loading data/aiml/training/netanel.aiml... done (0.00 seconds)
Sorry, I don't understand. What do you mean?
hello
[Handler] TRAINING
Failed to learn
OK, I grok that
This code is failing on Windows. But the same code works on a Linux machine running Debian..