Commit 420f5fd7 by 大雄

AIML的运行

parents
import aiml
kernel = aiml.Kernel()
kernel.learn("std-startup.xml")
kernel.respond("load aiml b")
while True:
print(kernel.respond(input("请输入你的问题>>")))
<aiml version ="0.9.2" encoding = "UTF-8">
<category>
<pattern>you</pattern>
<template>
oh hello!!!
</template>
</category>
<category>
<pattern>my name is lilei</pattern>
<template>
fine thank you!
</template>
</category>
</aiml>
<aiml version ="0.9.2" encoding = "UTF-8">
<category>
<pattern>LOAD AIML B</pattern>
<template>
<learn>basic_chat.aiml</learn>
</template>
</category>
</aiml>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment