Metadata-Version: 2.1
Name: pyaiml21
Version: 1.0.0rc4
Summary: Simple interpreter for AIML 2.1
Home-page: https://gitlab.fi.muni.cz/nlp/pyaiml21
Author: Michal Barnišin
Author-email: xbarnis@fi.muni.cz
License: MIT
Keywords: aiml,interpreter,chatbots
Platform: unix
Platform: linux
Platform: osx
Platform: cygwin
Platform: win32
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Babel
Requires-Dist: dill
Requires-Dist: inflect
Requires-Dist: Js2Py
Requires-Dist: lxml
Requires-Dist: pymongo
Requires-Dist: requests
Provides-Extra: testing
Requires-Dist: pytest (>=6.0) ; extra == 'testing'
Requires-Dist: pytest-cov (>=2.0) ; extra == 'testing'
Requires-Dist: mypy (>=0.910) ; extra == 'testing'
Requires-Dist: flake8 (>=3.9) ; extra == 'testing'
Requires-Dist: tox (>=3.24) ; extra == 'testing'

# pyaiml21

[AIML](http://www.aiml.foundation/doc.html) 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**](https://github.com/cdwfs/pyaiml).



## Installation

Install the project from *PYPI*:

```bash
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](https://code.google.com/archive/p/aiml-en-us-foundation-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:

```bash
# from the alice/.. directory
aiml --bot alice
```


### Running from Python

It is still possible to start your bot directly from python, e.g.

```python
>>> 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**](https://github.com/keiffster/program-y), but it does
come with the full chatbot platform, the simple interface is missing.


## Documentation

Please visit the
[official documentation](https://pyaiml21.readthedocs.io/en/latest/).


## License

MIT.

