Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renatopp/aerolito
An AIML alternative, YAML based. Aerolito works like a simulation of natural language processing.
https://github.com/renatopp/aerolito
Last synced: 11 days ago
JSON representation
An AIML alternative, YAML based. Aerolito works like a simulation of natural language processing.
- Host: GitHub
- URL: https://github.com/renatopp/aerolito
- Owner: renatopp
- License: mit
- Created: 2011-05-11T00:10:22.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-15T10:26:54.000Z (about 13 years ago)
- Last Synced: 2024-10-10T14:41:19.983Z (about 1 month ago)
- Language: Python
- Homepage: http://renatopp.com/aerolito
- Size: 1.46 MB
- Stars: 20
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Aerolito
========Aerolito is a markup language YAML based influenced by AIML and RiveScript. The
motivation is to have a more clean and easy language than AIML without create a
new file format, like RiveScript.Use example::
from aerolito import Kernel
kernel = Kernel('config.yml')print kernel.respond(u'Hello')
YAML Schema
-----------YAML was chosed because is more clean, and easy to maintain and read. It's easy
to define python types as lists, strings and dictionaries. For example::# YAML File
key:
- this is a list item
- 999 # integer
- [1, 2, 3, 4] # list
- {1:2, 3:4} # dict
- some string # stringThe example above above generate following structure in Python::
{key: [
'this is a list item',
999,
[1, 2, 3, 4],
{1:2, 3:4}
'some string'
]}Is important to understand the yaml structure to create a correct structure for
aerolito.Configuration File
~~~~~~~~~~~~~~~~~~To provide a simple structure for encapsulation, Aerolito knowledge base is
divided at least in 2 main files: a configuration and a conversation file.The **configuration file** (e.g. config.yml) will registry every global variable
and specify the conversation and special files. An example of a config.yml::# config.yml
version : v0.1
botname : chapolin
variable1 : value
variable2 : value
variableN : valueconversations:
- conversations/file1.yml
- conversations/file2.ymlsynonyms:
- specials/file1.yml
- specials/file2.yml
Notice, the first 5 tags are global variables, accessed in patterns by
"" expression. Also notice the tags "conversations" and "synonyms",
these tags define conversations pattern file and special synonym files,
respectively. Conversations tag is the only one required in config file, with
at least one entry.Conversation Files
~~~~~~~~~~~~~~~~~~The **conversation files** contains the definition of **conversation patterns**
(i.e., the set of user-inputs patterns and responses texts). Theses files must
have the "patterns" tag, with at least one element. The "patterns" tags defines
the list of conversation patterns.Example of file::
patterns:
- in:
- Hello
- Hi there!
out:
- Hi!