rivescript-python icon indicating copy to clipboard operation
rivescript-python copied to clipboard

Python converter for aiml2rs

Open lynxionxs opened this issue 9 years ago • 4 comments

Why did you not make the aiml2rs converter in python rather than perl ? Perl is a dead language and hardly anyone uses it. One would not have to download such a large dependancy just to convert aiml files to .rive and never use it for anything else.

I'm not going to download perl. Is there an online aiml2rs converter ?

lynxionxs avatar Sep 01 '16 19:09 lynxionxs

The original implementation of RiveScript was written in Perl (from ~2003 to ~2012 give or take a few years), so it made sense for this one to also be in Perl and I hadn't rewritten it since the time I personally switched to Python and other languages as my preferred things to program in.

kirsle avatar Sep 01 '16 19:09 kirsle

Okay i see. Will it be hard to convert that Perl script to python atleast?

lynxionxs avatar Sep 01 '16 19:09 lynxionxs

For a Python rewrite, if I use an XML parser (like the Perl version) it should be pretty straightforward to port the logic over (tho I'd wanna use argparse and make it a proper CLI tool instead of making people put things in specially named folders).

Using a Python implementation of AIML could potentially be even better for converting it over (if the AIML module is good at making the data programmatically available), but I haven't looked into any of those modules. There wasn't a Perl AIML implementation so the best I could do was an XML parser and some regular expressions. :confounded:

kirsle avatar Sep 02 '16 05:09 kirsle

Okay i will wait for the Python version of aiml2rs then. Thanks

lynxionxs avatar Sep 02 '16 07:09 lynxionxs