AIML Version in Mycroft Core

Hi…

I’m working on a skill for Mycroft to ask questions of my own, AIML 2.0-based bots.
I really want AIML 2.0 for its newer # and ^ wildcards, which are used liberally in
the patterns for my own bot’s markup.

This is distinct from fallback-aiml as I want a skill that is triggered by vocabulary to
ask my bot things.

Reading through the AIML files in the source of fallback-aiml, I see they’r all AIML 1.0.
In my tests, I’m assuming the AIML interpreter in Mycroft’s stack is an AIML 1.0 interpreter.

The question arises because there are multiple Python AIML interpreter implementations
and many share the same module name–aiml.

So, I’m asking for advice:

  1. Should I try replacing the AIML interpreter for all of Mycroft, or do some other hack to avoid
    a namespace collision?
  2. Would there be a preferred option in the community for an AIML 2.0 parser?

Thanks,
Jay

i have been searching for a python aiml 2.0 implementation, could not find anything except https://github.com/keiffster/program-y

Thanks @Jarbas_Ai. OK, that’s reassuring that I haven’t missed some other Python 2.x-based, AIML 2.0 parser. From what I could tell looking around, the other Python 2.x packages had no plan to support AIML 2.0

And of course program-y only supports Python 3.6 and I haven’t quite been able to determine whether it even offers something like a simple Python library module interface–a pity, I reckon.

As I recall, Mycroft is pretty solidly in the Python 2.x world, correct? I’m not criticizing this choice–almost all of the scientific computing work I do in my day job is in that world as well and I’m my most comfortable/happy in that world.

I’ll have a close look at program-y and see what I can do. Worst case scenario I guess is running it standalone as a subprocess from my skill and communicating with it via sockets. Not ideal, but a solution. I’ll also get in touch with the
program-y developer and see if there is any plan to create a Python 2.x module that could handle AIML 2.0.

Jay

mycroft is currently python2 but python3 is in the works

we could try to extract the relevant code and build a python2 compatible package (preferably supporting both 2 and 3), i would like to update the aiml-fallback for AIML 2

@Jarbas_Ai–glad to hear that python3 support is in the works for Mycroft.

I’m currently trying to understand how program-y works and how/if the AIML2 parser can be extracted. Once I have some inkling of how it works, I’ll open an issue on their github.

I should add before I do anything else, I’m going to check whether program-y can handle my AIML 2.0 files.

Hello,

The Mycroft founder, Steve, said (14 days ago) :
"I’m guessing we will have to wait until we make the jump to Python 3, which should be in the next couple months. "
Source

I hope this isn’'t a matter of ditching Python 2.7 support entirely in favor of Python 3.x.

1 Like

Morrning,
I’m the creator of Program-Y and yes its a Python 3.x implementation, although it’s not 3.6 specific, I just tend to keep up with the latest release of Python.

I’ve never found a use case to publish it as just a module to PyPy as any AIML engine requires configuration and a lot of data files to get up and running.

However it is embeddable and given its open source I would be more than happy to work with you guys to help determine how this could work.

Ping me anytime through GitHub https://github.com/keiffster/program-y
Keith

2 Likes