I am making a voice-assistant for food ordering in fast-food restaurants. For dialog management tasks I am making aiml chatbot. This is my std-startup.xml code '''
<!-- Category is an atomic AIML unit -->
<category>
<!-- Pattern to match in user input -->
<!-- If user enters "LOAD AIML B" -->
<pattern>LOAD AIML B</pattern>
<!-- Template is the response to the pattern -->
<!-- This learn an aiml file -->
<template>
<learn>output.aiml</learn>
<!-- You can add more aiml files here -->
<!--<learn>more_aiml.aiml</learn>-->
</template>
</category>
BELOW IS MAIN.PY CODE
import aiml import os
kernel = aiml.Kernel()
if os.path.isfile("bot_brain.brn"): kernel.bootstrap(brainFile = "bot_brain.brn") else: kernel.bootstrap(learnFiles = "std-startup.xml", commands = "load aiml b") kernel.saveBrain("bot_brain.brn")
while True: print (kernel.respond(input("Enter your message >> "))) '''
After entering a msg which is from output.aiml itself the bot says the msg does not exists
PLease can someone tell how to fix it. The bot should generate a response as given in output.aiml file
Some interpreters need the patterns to be in upper case. Try this instead:
<category>
<pattern>THANK YOU</pattern>
<template>
Bye.
</template>
</category>