Simple interpreter for AIML 2.1
Project description
pyaiml21
AIML 2.1 Chatbot Design Language Interpreter in Python 3.
The AIML language is a (simple) XML-derived language for description of chatbots and the communication with the user based on the pattern-matching the user's query and evaluating (human-coded) response.
pyaiml21 is an AIML interpreter, supporting the latest AIML specification. It was created as a bachelor thesis and should be fully compatible with its predecessor, PyAiml.
Installation
Install the project from PYPI:
python -m pip install pyaiml21
Quick Example
This example demonstrates how to quickly set-up and run a basic chatbot with publicly available source files from ALICE.
Running via console script
pyaiml21
comes with a simple script to run your chatbots, if you unpacked
the contents of your bot into alice/
folder (so that the structure
is alice/aiml/..
, alice/aimlif/..
, alice/sets/..
..), then running
the following will start your bot:
# from the alice/.. directory
aiml --bot alice
Running from Python
It is still possible to start your bot directly from python, e.g.
>>> from pyaiml21 import Bot
>>> my_bot = Bot()
>>> my_bot.learn_aiml("path to .aiml file")
>>> # more loading stuff, see `pyaiml21.utils` for helpers
>>> my_bot.respond("Hello", "USER_1")
Hi! How are you doing?
For examples of simple bots, checkout /examples
folder.
Motivation
This project was created to support the AIML 2.1 in Python while preserving the simplicity of user interface from pyaiml. Note that for Python, there exists an AIML interpreter, program-y, but it does come with the full chatbot platform, the simple interface is missing.
Documentation
Please visit the official documentation.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyaiml21-1.0.0.post1.tar.gz
.
File metadata
- Download URL: pyaiml21-1.0.0.post1.tar.gz
- Upload date:
- Size: 60.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23d189a94afc2b8fab678f1428757a2617e482022c01edfc9d50613bd16dda67 |
|
MD5 | 451d9eb7502770e0b0ce008f73bf4862 |
|
BLAKE2b-256 | 8f6737fb61c6b5c064151b15be7c1525277052a2bbc6630e984af507e849f5d8 |
File details
Details for the file pyaiml21-1.0.0.post1-py3-none-any.whl
.
File metadata
- Download URL: pyaiml21-1.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 80.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef5f9996608bb677c6bda616e6c1c4d1398226e57e79b70c3e53d79e9f8bc2b |
|
MD5 | 17858fc6deee089b786e18e5ea0626af |
|
BLAKE2b-256 | 0179ff51377aaf448611f70c2936f4b649e63eea397103b25d4df3287365b21d |