Joseph Weizenbaum was a computer scientist and professor at MIT, be...
Weizenbaum called it ELIZA after the character Eliza Dolittle from ...
The MAC (multiple-access computer) system was developed at MIT in t...
The saying "to explain is to explain away" suggests that when we ex...
SLIP (Symmetric List Processor) is a list processing programming la...
Example of a content free remark: `I see`
The fact that the "script is data" allowed for a high degree of fle...
COMIT was the first string processing language developed. It was de...
:
" :i .. :,-.:: . . . :
,
: . • ..
: i i ;!,: :
• •
i " " :
• .
'... • .......... .. • ..
:::: :i
1"5."
...
• . • .. . .: :. .'~ ~..
.:
• . : , : •
. • .
: ...
¢ompu aI cma
• "
.: : " " " • " : ; . i •
~i: :
ELIZA A Computer Program
For the Study of Natural Language
Communication Between Man
And Machine
,JosEPh ~VEIZENBA UM
Massach.usclls [nshl-ute qf Tcchnu[ogg,* Cambridge, Mass.
ELIZA is a program operating within the MAC time-sharing
system at MIT which makes certain kinds of natural language
conversation between man and computer possible. Input sen-
tences are analyzed on the basis of decomposition rules which
are triggered by key words appearing in the input text.
Responses are generated by reassembly rules associated with
selected decomposition rules. The fundamental technical prob-
lems with which ELIZA is concerned are: (1) the identification of
key words, (2) the discovery of minimal context, (3) the choice
of appropriate transformations, (4) generation of responses in
the absence of key words, and (5) the provision of an editing
capability for ELIZA "scripts". A discussion of some psychologi-
cal issues relevant to the ELIZA approach as well as of future
developments concludes the paper.
Introduction
It is said that• to explain is to explain away. This maxim
is nowhere so well fulfilled as in the area of computer
programming, especially in what is ealled heuristic pro-
gramming and artifieiM intelligence. For in those realms
machines are made to behave in wondrous ways, often
suftieient to dazzle even the most experim~eed observer.
But once a particular program is unmasked, once its
inner workings are explained in language sufficiently plain
to induce understanding, its magic crumbles away; iL
st~mds revealed as a mere collection of procedures, each
quite comprehensible. The observer says to himself "I
could have written that". With that thought he moves the
program in question from the shelf m~trked "intelligent",
to that reserved for curios, fit to be discussed only with
people less enlightened than he.
Work reported herein was supported (iu prot) by Project MAC,
an _\-lIT research program sponsored by the Advm~ced Research
Pr,,jects Aget,cy, l)~l)ar~met~t ~,1" l)ofense, under Office of Naval
Research Contract Number Nora'-4102(01).
* Department of Eleeirieal Engineering.
36
Comnutnieations of the .~(',M
: - . . .
• . • .
..
---": t .7:g~~
:-: ; ;: i
A. G.
OETTINGER,
Editor
7:~.S C:
5)~. ;. ~ ~- !
o
7?27 E
:2:~:
7~9j ~
:7;2: Y :?
75~.7c_'-5
}
} : ~:<:..
}:
-.5~::a
:: L 2: .:
.i:
i. :::! 7:
i );4p
yL>
>>7-
:: ) :2>J2
{
%
i::i ::7
G{ • )i :
::.73: ::::,
Tile object of this paper is to cause just such a re-
evaln~tion of the program about to be "explained". Few }
4
programs ever needed it more.
ELIZA Prograrn }
ELIZA is a program which makes naturM hmguage
conversation with a Colnputer possible. Its present imple-
mentation is oa the MAC time-sharing system at MIT. i:
It is written in 5lAD-SLIP [4] for the IBM 7091. Its name
was chosen to emphasize that it nmy be incrementally
improved by its users, since its language abilities may be
continually improved by a "teacher". Like the Eliza 0!
Pygmalion fame, it (ran be made to appear even more
civilized, t,he relation of appearance to realiW, however,
remaining in ~he donmin of the playwright.
For ll~e present purpose it is sufficient to characterize
the ~[A() system as one which permits an individual to
operate a full seale computer from a remotely located type-
writer. The individual operator has the illusion thai, he is
the sole riser of the computer complex, while in facl~ others
may be "time-sharing" the system with him. What is
important here is that the computer can read messages
typed on the typewriter and respond by writing oil the
same instrument. %'he time between the computer's
receipt of a message and the appearance of its response is
a function of the program controlling the dialogue and of
such MAC system parmneters as the number of users
currently eon'esponding with the system. These latter
parameters generally contribute so little to the overall
response time that conversational interaction with the
computer need never involve truly intolerable delays.
When in conversation with ELIZA, tile user types in
some statement or set of statements in natm'al language
using normal punetua.tion and sentence structures. Only
the question mark may not be used, because it is inter-
preted as a line delete character by the MAC system. The
user's sratement is terminated by a double carriage return
which serves to turn eontrol over to ELIZA. ELIZA It hen
analyzes the user's statement and generates some response
whieh it types out.. Control is then again with the user.
A ltypieal conversation is the following:
Men are all alike.
IN WHAT WAY
They're always bugging us about something or other.
CAN Y()U THINK (H: A SPECIFIC EXAMPLE
Well, my boyfriend made me come here.
YOUR BOYFRIEND MAI)E YOU COME HERE
tie
says i'm depressed much of the time. i:-(-:
[ AM SORRY TO HEAR YOU ARE DEPRESSED
%olume 9 / Number / / January., 1966
2.:
~t such a
)lained . i.
tral langu
~resent, inn:
teal at _1[
~94. Its n~
inereme~t:.
ilities mat"
the Eli~e.
tr even
1~:
ity, howe;
) cha.racte
individuai
loeated t~
ion that ii
in fact off:
tint. Whai
ead messy;:
"riting 01i
compute
ts resp0i~
alogue and:
~ber of us
These [~i~
o the 0vei
ion with
.e delays.
user types
ural lunge
aetures. 6t
se it, is b:.:
) svstera. ~
a.rriage ret~.
• ~LIZA i?:
.,ornle reset
:h tho
(
7 :
RI~ :
~o
J tl tl u arv;[ I:
it'~ ~=~e. !. ant tmhappy.
i)() ~ 0U TitlNK COMING IIERE WILl, IiELP YOU NOT TO
t@; iTNiIAPPY
i
>cod some help, tidal m,,teh seems certain.
"G'I~AT WOL'I,D IT MEAN TO YOU IF YOU GOT SOME IIELP
l'c, ri~ ps I could learn ~o get ahmgv, ith my mother.
2-.f::LL
2~ii::
MORE ABOUT YOUE FAMILY
),[5" -mnher takes care of me,
WiI() EI,SE IN ¥0UR FAMILY TAKES CAiIE 0F YOU
),iy father.
YO[/R FATHER
5-,)u are like my father in some ways.
WiIAT RESEMBLANCE DO YOU SEE
You are not vet',," aggressive but 1 think you don't wa.t~.t me to
notice that.
WHAT MAKES YOU TttINK I AM NOT VER~ AGGRESSIVE
~'ou dolt';
argue with me.
WIlY 1)O YOU THINK
I
DON'T ARGUE WITH YOU
"~-(}u are afraid of me,
DOES iT PLEASE YOU TO BEI, IE\'E I AM AFRA[I) OF YOU
My far her is afraid of everybody.
WHAT ELSE COMES TO MIND WtIEN YOU THINK OF
Y()(-II FATHER
Bullies.
DOES THAT HA\-E ANYTtIING TO DO WITH THE FACT
TItAT YOUR BOYFR IENI) MADE YOU COME HERE
The capitalized lines are the machine responses.
The gross procedure of the program is quite simple; the
text: is read and inspected for the presence of a
keyword.
if such a word is found, the sentence is transformed
according to a
rule
associated with the keyword, if not a
content-free renmrk or, under certain conditions, an earlier
transformation is retrieved. The text so computed or
retrieved is then printed out.
In detail, of course, the procedure sketched above is
considerably more complex. Keywords, for example, amy
have a RAXK or precedence number. The procedure is
sensitive to such numbers in that it will abandon a key-
word a.lready found in the left-to-right scan of the text in
fxvor of one having a higher rank. Also, the procedure
reeo~,afizes a comma or a period as a delimiter. Whenever
either one is encountered and a keyword has already been
found, all snbsequent text is deleted from the input mes-
sage. If no key had yet been found the phrase or sentence
to the left• of the delimiter (as well as the delimiter itself)
is deleted. As a result•, only single phrases or sentences are
ever transformed.
I£eywords and their associated transformation t rules
constitute the SCRIPT for a particular class of con-
versation. An important property of ELIZA is that a
script is data; i.e., it is not part of the program itself.
Hence, ELIZA is not restricted to a particular set of
recognition patterns or responses, indeed not even to any
specific language. ELIZA scripts exist (at, this writing) in
Welsh attd Gernmn as well as in English.
The fundamental technical problems with which ELIZA
must be preoccupied are the following:
(1) The identification of the "most important" keyword
The word "transformation" is used in its generic sense rather
than that given it by tia.rris and Chomsky in linguistic contexts.
V(~lume 9 /Numher 1 / January, 1966
occurring in the input message.
(2) Tile identification of some minimal context within
which the chosen keyword at)pears; e.g., if the keyword is
"you",
is it followed by the word "are" (in which ease an
assertion is probably being made).
(3) The choice of an appropriate transformation rule
and, of course, the making of the transformation itself.
(4) The provision of mechanism that will permit
ELIZA to respond
"intelligently"
when the input text
contained no keywords.
(5) The provision of machinery that facilitates editing,
particularly extension, of the script on the script writing
level.
There are, of course, the usual constraints dictated by
the need to be eeononfical in the use of computer time and
storage space.
The central issue is clearly one of text manipulation,
and at the heart of that issue is the concept of the
trans-
formation rule
which has been said to be associated with
certain keywords. The meehanisins subsumed under the
sloga.n "transformation rule" are a number of SLIP func-
tions which serve to (1) decompose a data string according
to certain criteria, hence to test the string as to whether it
satisfies these criteria or not, and (2) to reassemble a
decomposed string according to certain assembly specifica-
tions.
While this is not the i)lace to discuss these functions in
all their detail (or even to reveal their full power and
generality), it is important to the understanding of the
operation of ELIZA to describe them in
some
detail.
Consider the sentence "I ant very unhappy these days".
Suppose a foreigner with only a limited knowledge of
English but with a veer good ear heard that sentence
spoken but understood only the first two words "I am".
Wishing to appear interested, perhaps even sympathetic,
he may reply "How long have you been very unhappy
these days?" What he nmst have done is to apply a kind
of template to the original sentence, one part of which
matched the two words "I aln" and the remainder isolated
the words "very unhat)py these days". He must also have
a reassembly kit specifically associated with that template,
one that specifies that any sentence of the form "I am
BLAH" can be transformed to "How long have you been
BLAH", independently of the meaning of BLAH. A
somewhat more complicated example is given by the
sentence "It seems that you hate me". Here the foreigner
understands only the words "you" and "me"; i.e., he
applies a template that decomposes the sentence into the
four parts:
(1) It seems that (2) you (3) hate (4) me
of which only the second and fourth parts are understood.
The reassembly rule might then be "What makes you
think I hate you"; i.e., it nfight throw away the first
component, translate the two known words ("you" to
"I" and
"me"
to "you") and tack on a stock phrase
(What makes you think) to the front of the reconstruction.
Communications
of the
ACM
37