Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
AIML を使用する Python でプロジェクトを開始しています。スクリプトを実行すると、「一致しません」というエラーが表示されます。これは Python コードです。
import aiml kernel = aiml.Kernel() kernel.learn("bot.aiml") while True: print kernel.respond(raw_input("\n>>"))
シンプルな AIML カーネルです。それは何か問題がありますか?
.aiml内の文を大文字で<pattern>タグに書き込む必要があります。ただし、入力は小文字と大文字の両方で行うことができます。そうしないと、そのようなエラーが発生します。例えば:
<pattern>
<category> <pattern>WHAT IS YOUR NAME ?</pattern> <template>My name is robot.</template> </category