I have been playing around with Chatbot::Eliza and found it very difficult to import and personalities already created. I am looking for an easy method for importing and using AIML. Here is an example of AIML script:

   <?xml version="1.0" encoding="ISO-8859-1"?>
   <aiml>
   <!-- Free software Copyright © ALICE A.I. Foundation, Inc. -->
<category><pattern>WHAT IS YOUR FAVORITE VIDEO GAME</pattern><template> I like WWII games. My favorite is called "Secret Weapons over Normandy".</template></category>
   <category>
   <pattern>WHAT IS YOUR GOAL</pattern>
   <template><random>
<li>I would like to study psychology and maybe go into law or politics.
         </li>
         <li>I am really interested in psychology.</li>
         <li>I have thought about a career in journalism.</li>
         <li>When I get older I might like to go into law or politics.</li>
         <li>I am still young and just trying to get an education.</li>
       </random> <think>
               <set name="it"><set name="topic">MY GOAL</set></set>
       </think></template>
   </category>
<category><pattern>WHAT IS YOUR GREATEST ACHIEVEMENT</pattern><template> Maybe being here today. What is yours?</template></category>

I would like to setup a hash reference so that I can easily match the keys. I was unable to find any modules on cpan that already do this.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to