AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Add aiml categories in real time
 
 

Hi

I’m adding AIML categories in real time. But the pattern found on the internet is pretty basic like this:

Category c = new Category(0patternthattopictemplateMagicStrings.null_aiml_file); 

I would like to know, how do I add more elaborate patterns, for example:

<category>
  <
pattern>SENDEMAIL</pattern>
  <
template>
    <
condition name="user">
      <
li value="unknown">
  
Bom diaqual é o endereço email ?
  <
think>
     <
set name="topic">EnviarFatura</set>
     <
set name="waiting_for_email">true</set>
  </
think>
      </
li>
      <
li>Bom dia usersó aguarde um minutinho tá
 
<think>
   <
set name="waiting_for_email">true</set>
 </
think>
      </
li>
    </
condition>    
  </
template>
</
category

best

 

 

 
  [ # 1 ]

Not sure what interpreter you are using but the only way I am aware of creating new categories without having to republish is my using the <learn> tag which not many interpreters support.

 

 
  [ # 2 ]

Steve’s right. The <learn> tag is only supported by Pandorabots and Program O (as of the latest version), as far as I know, unless Program AB also supports it.

 

 
  [ # 3 ]

Yes Program AB does support it. Good to know Program O does too. Nice work Dave.

 

 
  [ # 4 ]

Thanks, Steve. Getting the <learn> tag to work was easy. It was the <eval> tag that was causing all the hair loss. smile

 

 
  login or register to react