📜  AIML-标签

📅  最后修改于: 2020-11-10 04:22:36             🧑  作者: Mango


标签在AIML中用于根据上下文进行响应。

句法

 template 

例如,考虑以下对话。

Human: Hi Alice! What about movies?
Robot: Do you like comedy movies?
Human: No
Robot: Ok! But I like comedy movies.

C> ab> bots> test> aiml内创建that.aiml,并在C> ab> bots> test> aimlif目录内创建that.aiml.csv。

那.aiml



   
      WHAT ABOUT MOVIES
        
   
   
   
      YES
      Do you like comedy movies
      
   
   
   
      NO
      Do you like comedy movies
      
    
   

that.aiml.csv

0,WHAT ABOUT MOVIES,*,*,Do you like comedy movies,that.aiml
0,YES,Do you like comedy movies,*,Nice! I like comedy movies too.,that.aiml
0,NO,Do you like comedy movies,*,Ok! But I like comedy movies.,that.aiml

执行程序

打开命令提示符。转到C> ab>并键入以下命令-

java -cp lib/Ab.jar Main bot = test action = chat trace = false

验证结果

您将看到以下输出-

Human: What about movies?
Robot: Do you like comedy movies?
Human: No
Robot: Ok! But I like comedy movies.