Unable to load patterns in AIML via Python -


i've installed aiml via pip , wrote files startup.py, std-startup.xml, basic.aiml , bot_brain.brn in core folder. when try run startup.py, warning:

loading std-startup.xml... done (0.06 seconds) warning: no match found input: load aiml b  kernel bootstrap completed in 0.10 seconds saving brain core/bot_brain.brn... done (0.00 seconds) 

this content of std-startup.xml:

<aiml version="1.0.1" encoding="utf-8">     <!-- std-startup.xml -->      <category>         <pattern>load aiml b</pattern>         <template>             <learn>basic.aiml</learn>         </template>     </category>  </aiml> 

this python script:

import aiml import os  kernel = aiml.kernel()  if os.path.isfile("core/bot_brain.brn"):     kernel.bootstrap(brainfile = "core/bot_brain.brn") else:     kernel.bootstrap(learnfiles = "std-startup.xml", commands = "load aiml b")     kernel.savebrain("core/bot_brain.brn")  while true:     msg = raw_input(">")     if msg == "exit":         exit(0)     elif msg == "save":         kernel.savebrain("core/bot_brain.brn")     else:         bot_response = kernel.respond(msg)         print("bot: " + bot_response) 

for every input error no match found input. i'm doing wrong? in same directory, except bot_brain.brn.

problem solved; had enter uppercase letters:

<category>     <pattern>load aiml b</pattern>     <template>         <learn>basic.aiml</learn>     </template> </category> 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -