pyaiml21
AIML 1 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 2.
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 3.
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:
$ aiml --bot alice
Running from Python
It is still possible to start your bot directly from python4, 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 5, but it does come with the full chatbot platform, the simple interface is missing.
Documentation
Please visit the official documentation.
License
MIT.
-
Artificial Intelligence Markup Language (Dr. Wallace, 2001); see the official specification of version 2.1 ↩
-
The actual response depends on your AIML file, to load .aimlif, substitutions.., see methods of
pyaiml21.Bot↩
Metadata
Release files for pyaiml21 1.0.1.post2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyaiml21-1.0.1.post2.tar.gz | 64.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyaiml21-1.0.1.post2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.4 kB
Release files / pyaiml21-1.0.1.post2.tar.gz
| Download URL | pyaiml21-1.0.1.post2.tar.gz |
|---|---|
| Size | 64.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f94bad63afa611f583f3b4564a28336bf71da75493ac69aae2d38d0edae23668
|
|
BLAKE2b-256 checksum How to use checksums |
57f72578c556f3102d06636c91de65774e3654e0d28ddc1f948c909ef3305341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Release files / pyaiml21-1.0.1.post2-py3-none-any.whl
| Download URL | pyaiml21-1.0.1.post2-py3-none-any.whl |
|---|---|
| Size | 80.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37e70a2f23b4d53875893feae354fd41c10dd2aea9b7fe2ec2eae8298a6e3105
|
|
BLAKE2b-256 checksum How to use checksums |
e3a44280e8bf62d91426edc7e9199e64bacdc10ea1cd8b5969440cc45498bb28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|