I am trying to build a basic bot with the help of AIML file. Where I can ask a question and matched pattern will be returned for that pattern. Sample pattern is this in my AIML file.
<category>
<pattern>TEST</pattern>
<template>
Hi..This is the testing pattern. How are u doing
</template>
</category>
I am using PyAIML package for integrating python with AIML. So, if I ask "test", I get the response as "Hi..This is the testing pattern. How are u doing".
query --->test
Answer --> Hi..This is the testing pattern. How are u doing
But if I change my above pattern to
<category>
<pattern>TEST</pattern>
<template>
<html>
<b>Hi..This is the testing pattern. </b> How are u doing
</html>
</template>
</category>
Basically If I add html tags. Then my bot does not respond. It gives blank answer for "test". What can be the problem here? Here is my code in python
import aiml, sys
class Chat:
def main(self, query):
mybot = aiml.Kernel()
mybot.verbose(False)
mybot.learn('test.aiml')
chatReply = mybot.respond(query)
return chatReply
if __name__ == '__main__':
print Chat().main(sys.argv[1])
Also if html tags are not working because I am running the code in python interpreter, then how to test if it will work or not.