You’re building a voice assistant using AIML for dialog management.
You use std-startup.xml to tell the bot to load another AIML file (output.aiml).
Your pattern in std-startup.xml must exactly match what you pass in Python.
The AIML loader line must be:
python
CopyEdit
kernel.bootstrap(learnFiles="std-startup.xml", commands="LOAD AIML B")
Your std-startup.xml should look like:
xml
CopyEdit
<aiml version="1.0.1"><category><pattern>LOAD AIML B</pattern><template><learn>output.aiml</learn></template></category></aiml>
Your output.aiml must include valid categories like:
xml
CopyEdit
<category><pattern>I WANT A BURGER</pattern><template>Sure! What kind?</template></category>
Make sure all files are in the same directory.
The command LOAD AIML B is case-sensitive.
Add this to debug:
python
CopyEdit
print(kernel.numCategories()) # Should be > 0
Now run it, and the bot will respond to I WANT A BURGER.