User Control Panel
Advertisements

HELP US, HELP YOU!

Converting AIML to RiveScript

 
Post new topic   Reply to topic    Bot Depot Forum Index -> RiveScript
View unanswered posts
Author Message
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Aug 22, 2006 5:23 pm    Post subject: Converting AIML to RiveScript Reply with quote

A question was just raised about whether or not my Aiml2Alpha code was still around. It's not. I took what I used to have of it and converted it to an Aiml2RiveScript code.

I gave up on parsing AIML a long time ago, but now I have two different versions of my Aiml2RiveScript code. In one version, there was just a plain text converter (which didn't use XML::Parser and just parsed the file as if it were a string), which is what Aiml2Alpha did. The other version seems to have this code but in addition has one that actually did use XML::Parser.

Anyhow, I'll attach the latest version of the Aiml2RiveScript converter code.

Readme File
Code:
AIML 2 RiveScript Converter README
==================================

Version 0.01

Disclaimer: this is a very beta release.

==================================
Using the Converter
==================================

1. Run mkdir.pl to create the necessary directories.

2. Download the Standard AIML set from AliceBot.org:
   http://www.virtualitas.net/perl/aiml/standard-aiml-current.zip

3. Extract the AIML documents into the "aiml" folder created
   by mkdir.pl

4. Run aiml2perl.pl to convert AIML documents into Perl code.

5. Run perl2rivescript.pl to convert the Perl code into RiveScript.

Notes:
- Any AIML set should work for this converter, not just the Standard
  AIML. However, this has only been tested on Standard AIML and may not
  work well with this converter.
- The converter tool is not perfect. There are some cases of invalid
  RiveScript code being generated. For instance, std-atomic.aiml converts
  over with one of the +Triggers being entirely empty.
- You should revise the generated RiveScript code for any such errors.

==================================
Perl File Descriptions
==================================

==================
mkdir.pl
==================

   Run this script to create the directories "aiml",
   "perl", and "rivescript" if they do not exist.

   Unzip AIML documents into the "aiml" folder.

==================
aiml2rivescript.pl
==================

   Does NOT use XML::Parser

   Parses the AIML files from "./aiml" using plain text
   parsing. Only works on AIML files formatted in the way
   of the Standard ALICE AIML set by Dr. Rich Wallace.
   AIML files written with a different XML style cannot
   be parsed.

   This was the first version of an AIML to RiveScript
   converter. It is very buggy.

==================
aiml2perl.pl
==================

   Uses XML::Parser to load in all the AIML files from
   "./aiml", and then uses Data::Dumper to dump the contents
   of each file structure into text documents in the "perl"
   folder.

   This script doesn't parse beyond the <pattern>/<template>
   tree. Other in-template tags aren't parsed.

==================
perl2rivescript.pl
==================

   AFTER RUNNING AIML2PERL.PL, this script will load all the
   Perl data structures from the "perl" folder and write them
   into the "rivescript" folder as (mostly) valid RiveScript
   documents.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> RiveScript All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group