I would like to integrate python
scripts into my pandorabot
written in aiml
.
I know that you can tag aiml
syntax with javascript
, but I haven't found any documentation on python
, except the following, which uses <oob>
(out of bounds) tags, running services on the background:
<oob>
<mrl>
<service>python</service>
<method>exec</method>
<param>myfuction()<param>
</mrl>
</oob>
<mrl>
tags stands for myrobot lab, and it is part of program-ab
, a java framework
for actual robotics.
But I would like to use my app
solely on the web...
I also came across pyAiml
, but as for now I haven't see how it would help me to achieve my goal.
MY GOAL:
I want to use python
because it manipulates NLTK
(http://www.nltk.org/), a Natural Language Toolkit which handles huge literary corpus, and I would like to integrate this library to my bot capabilities.
lets say I have a <pattern>PYTHON</pattern>
, and it would run a python script.
the script, on its turn, would import nltk
(and its corpus), linking AIML patterns
, or "questions" to PYTHON templates
, or "answers"?
any clues on how I could achieve this? many thanks in advance.