{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Defining AIML categories inline\n", "\n", "Instead of loading an external AIML DB, it is also possible to create a bot from scratch by executing notebook cells containing AIML code. This notebook offers a few examples." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Full AIML\n", "\n", "The most direct procedure is to add a fully-compliant [AIML](http://www.alicebot.org/TR/2001/WD-aiml/) document in a cell, preceded by the `%aiml` magic. This magic must be present alone in the first cell line, save for comment lines, i.e. lines starting with `#` (which are ignored).\n", "\n", "The XML preamble is optional; if missing it will be added automatically. Encoding is always UTF-8" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " %aiml <topicname>\n", "" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "