Search                        Top                                  Index
TEACH CHAT0                                            A.Sloman Oct 2011
Revised 4 Nov 2011

CONTENTS - (Use ENTER g to access required sections)

 -- Introduction
 -- What this is about
 -- Play with the online pop11 for a few minutes.
 -- Further Reading

-- Introduction -------------------------------------------------------

This is the first of a series of short tutorial files concered with
making a small, but expandable chatbot, using Pop11, especially the
Pop11 matcher.

The files are based on the TEACH RESPOND and TEACH RIVERCHAT files which go
into more detail on more ambitious eercises.

-- What this is about -------------------------------------------------

With the help of this TEACH file you will build a simplified ELIZA
program, that can hold a 'conversation' in English. The original Eliza
was a half-serious exercise in natural language processing developed
by Joseph Weizenbaum at MIT in the USA. It loosely simulated a
non-directive Rogerian psychotherapist. Many text books on AI include an
account of Eliza, and a criticism of the techniques used, because they
are so limited.

-- Play with the online pop11 for a few minutes. ----------------------

There is a version of the Pop-11 Eliza available on the internet here:

If you try playing with it see if you can work out some of the rules it
uses. That is very hard to do because it has a large collection of rules
and the order in which they are tried is randomly 'shuffled' before each
new sentence is processed.

If you are using a version of Poplog already installed on your local machine
you can run eliza locally by doing this:

Start pop11, then, after you get the pop11 welcome message give the eliza();
command, as follows:



You will get instructions, which you can then follow.

Instead you can run it in the editor, so that you can easily save all of the

Type to the linux command line

or, if you prefer,


Then in the editor buffer type:


Put the ved cursor on that line and do ESC d

You'll be invited to have an interaction with Eliza. Complete each sentence by
hitting the RETURN key.

When finished type


If you are using a linux machine containing the espeak library, make sure your
sound is working, exit VED (ENTER xx) and try this:

Check that espeak works by giving this command to linux (NB. it will not work
across a network, only on a local machine).

    espeak "I am talking today"

If the words are spoken back to you, then you can do the following:

Type to the linux prompt (not to ved):


then, after the welcome message:

    lib eliza_speak

then this (including semi colon at end):


Eliza will print out some instructs. After that if you type something, eliza
will reply in print, and also by reading out the output.

-- Further Reading ----------------------------------------------------

        For revision

        Getting started on a chatbot in pop11

--- $usepop/pop/teach/chat0
--- Copyright University of Birmingham 2011. All rights reserved. ------