Working with A.L.I.C.E. AIML files
The AIML files of A.L.I.C.E. chatter are freely available at https://code.google.com/p/aiml-en-us-foundation-alice/.
Extract the AIML files to a folder on the desktop or in the home
directory and copy startup.xml
to these AIML files. This startup.xml
file will load all the other AIML files into memory. The following code is an example of a typical startup.xml
file:
<aiml version="1.0"> <category> <pattern>LOAD AIML B</pattern> <template> <!-- Load standard AIML set --> <learn>*.aiml</learn> </template> </category> </aiml>
The preceding XML file will learn all the AIML files when we call the LOAD AIML B
pattern.
Loading AIML files into memory
The following code will load all the AIML files into memory:
#!/usr/bin/env ...
Get Learning Robotics Using Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.