English 中文(简体)
AIML - <that> Tag
  • 时间:2024-11-03

AIML - <that> Tag


Previous Page Next Page  

<the> 在《反洗钱法》中,根据具体情况使用“Tag”来做出反应。

Syntax

<that> template </that>

例如,审议以下谈话。

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

Example

C > ab > bots > test > aimingl以及C > ab > bots > test > aimingpf.

that.aiml

<?xml version = "1.0" encoding = "UTF-8"?>
<aiml version = "1.0.1" encoding = "UTF-8"?>
   <category>
      <pattern>WHAT ABOUT MOVIES</pattern>
      <template>Do you pke comedy movies</template>  
   </category>
   
   <category>
      <pattern>YES</pattern>
      <that>Do you pke comedy movies</that>
      <template>Nice, I pke comedy movies too.</template>
   </category>
   
   <category>
      <pattern>NO</pattern>
      <that>Do you pke comedy movies</that>
      <template>Ok! But I pke comedy movies.</template>
   </category> 
   
</aiml>

that.aiml.csv

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

Execute the Program

立即开放指挥。 Go to C > ab >和打下以下指挥系统:

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

Verify the Result

你将看到以下产出:

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