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

A Better AIML-to-RiveScript Converter
 
 

I’m here to announce that I’ve just finished my best attempt to date at writing an AIML parser in Perl! (Actually, it’s an AIML-to-RiveScript converter). This one uses an actual XML parsing library (XML::TokeParser), so it should theoretically do a much better job at parsing the AIML than my older regular expression based scripts did.

I have it on github: https://github.com/kirsle/aiml2rs

It handles most of the tags in the standard Alice set (it found a few typos in Alice’s set too wink ). There are a few notable things that this converter doesn’t handle, though:

[ul][li]Embedded <random> tags (RiveScript doesn’t -YET- support this)[/li][li]Complicated <condition> tags[/li][/ul]

Categories that have the above “problems” are entirely skipped. In Alice’s brain, there are only 97 categories with multiple-level embedded <random> tags, and only 2 categories with complicated <condition> tags. :D

If you want the Alice brain converted over to RiveScript without having to run this code yourself, you can get it here: http://www.rivescript.com/files/sets/AliceRS-0.02.tar.gz

I tested the Alice RS conversion on the Perl RiveScript library, and it took about 8 seconds to load all the RS code, and then was able to give responses within a second or two each (RiveScript is admittedly a slightly slower engine than AIML, but it has to organize its patterns differently than AIML so not a lot can be done. Still, a second or two to fetch a reply out of 93,070 patterns isn’t half bad smile ).

 

 
  [ # 1 ]

> http://www.verbots.com/wiki/Tools:AIML_to_Verbot_Converter

Hi Noah, this reminds me of the “AIML to Verbot Converter” (above).  I’ve found that lots of conversions can be made using XSLT (below).  For instance, with XSLT I was able to convert back from Verbot-to-AIML.  There are some good XSLT programs, but they can be expensive.  I’ve also found some web services that can handle XSLT.  There are imperfections in conversions with XSLT, some functionality may be lost each way, mainly due to differences in tags and positions between languages.

> http://en.wikipedia.org/wiki/XSLT

 

 
  login or register to react