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..

<li value=” * WORD”></li> in python-aiml?
 
 

Hello everyone. I am in the middle of building a chatbot with python-aiml. So I wanna ask if it possible to use a wildcard inside value of list? I tried it but can’t maybe someone know the way to use it.

 

 
  [ # 1 ]

Post your category and I’ll take a look if you like.

 

 
  [ # 2 ]

It looks like this:

<aiml version="2.0" encoding="UTF-8">
<!-- 
kontak_dosen.aiml -->
 
<
category>
 <
pattern>_ KONTAK DOSEN</pattern>
    <
template>
      <
think><set name="topic">KONTAK_DOSEN</set></think>
         <
random>
          <
li>BolehKontak dosen siapa ya? (Awali dengan Pak atau Bu diikuti dengan nama)</li
          <
li>Kamu mau kontak dosen siapaMohon sebutkan nama (Awali dengan Pak atau Bu diikuti dengan nama)</li
          <
li>Anda ingin meminta kontak dosen siapa ya? (Awali dengan Pak atau Bu diikuti dengan nama)</li
 </
random>
    </
template>
</
category>
 
<
category>
  <
pattern>_ KONTAK DOSEN *</pattern>
   <
template>
       <
srai><star/> KONTAK <star/> DOSEN</srai>
   </
template>
</
category>

<
topic name "KONTAK_DOSEN">
<
category>
    <
pattern>*</pattern>
 <
think><set name="nama_dosen"><star/></set></think>
 <
template>
            <
condition name="nama_dosen">
               <
li value="* Pak * Abdul * Haris">Pak Abdul Haris</li>
               <
li value="* Pak * Abdul * Rokhim> Pak Abdul Rokhim</li>
               <li>Nothing</li>
            </condition>
        </template>
</category>

</topic>
</aiml> 

Sorry, it mess up my indentation.

 

 
  [ # 3 ]

After a very quick glance, what immediately leaps out is that the 2nd <li> doesn’t have a closing quote mark and also you are referencing <star> twice in your 2nd category. Should one of those be <star index=“2”>

 

 
  login or register to react