getting "WARNING: No match found for input: load aiml b" with all files in the same directory

811 views Asked by At

So i wanted to try to make a chatbot for python, i put all the needed files for aiml in the same directory yet i still get the "WARNING: No match found for input: load aiml b" error.

Here is the contents of the python file

import aiml

kernel = aiml.Kernel()
kernel.learn("std-startup.xml")
kernel.respond("load aiml b")

while True:
  input_text = input("Human: ")
  response = kernel.respond(input_text)
  print("Bot:" +response)

the contents of the xml file

<aiml version="1.0.1" encoding="UTF-8">

<category>

<pattern>load aiml b</pattern>
<template>
  <learn>basic_chat.aiml</learn>
</template>

</category>

</aiml>

and the contents of the basic aiml file i created

<aiml version="1.0.1" encoding="UTF-8">

<category>
<pattern>
Hello
</pattern>

<template>
Hello User
</template>

</category>

<category>
<pattern>
What are you?
</pattern>

<template>
I am a bot
</template>

</category>

</aiml>
2

There are 2 answers

1
Steve Worswick On

A quick search says that you need the pattern in capital letters:

<category>
    <pattern>LOAD AIML B</pattern>
    <template>
        <learn>basic.aiml</learn>
    </template>
</category>
0
diego peralta On

try typing an asterisk after hello, like that:

HELLO *