Natural language processing comes in many varieties. The most robust natural language systems are tailored to the most limited applications. The simplest approach to natural language processing is to program the computer to look for a limited set of key words or phrases. When the computer finds these words it produces a programmed response. The ELIZA program offers a particularly compelling example of the keyword approach to natural language processing. ELIZA was written at MIT in the mid-1960s to mimic the role of a psychoanalyst interviewing a patient. Examples of ELIZA and related programs are now widely available on the web and personal computers.
ELIZA was never intended to be a model of natural language understanding, yet it is still one of the most popular artificial intelligence programs in the public domain. As long as the user accepts the premise that the program is conducting an open-ended interview, ELIZA can produce a convincing imitation of a talking computer. ELIZA works by searching for a list of keywords in the input. If the program finds one of these words, it asks a preprogrammed question that centers around the keyword. If the program does not find a word on its list, it chooses from a set of open-ended responses, such as Tell me more or Go on. …
ELIZA provides an excellent example of the pattern-matching approach to natural language processing. Programmers can construct patterns that match simple phrases, and then embed these patterns in more complex patterns that search for contexts in which the simple phrases occur. I will rely on pattern-matching techniques to illustrate various aspects of natural language systems. Pattern-matching is the most widely used programming technique in natural language systems. It is obvious that ELIZA, though, is not using pattern-matching to perform any understanding of the language input. The program responds in rote fashion to any input, and even its use of multiple responses to the same pattern do not qualify as intelligent.
A few tricks quickly expose the limits of ELIZA’s linguistic ability. If you supply ELIZA with one of its keywords in an unusual context, the program will produce an inappropriate response. For example, if you type Necessity is the mother of invention, the program might respond with Tell me more about your family, based on the pattern match with the keyword mother. Since the program lacks any knowledge of sentence structure, it is incapable of responding sensibly to keywords with modifiers.
If you input the sentence Computers make unrealistic mothers, the program might still respond with a request to learn more about your mother. Since the program doesn’t really process language at all, offering it gibberish will only succeed in generating more gibberish rather than an admonishment to use correct English. For example, the inputXsdf theos are you vowmpss ssoov might trigger the output Would you prefer it if I weren’t vowmpss ssoov?
More generally, the program only requests more information from the user, it cannot supply any information about itself. ELIZA evades all such questions by responding with another question, Why do you ask? If you enter the same sentence two, three or four times in a row, ELIZA will treat each repetition as a new response. The program was not designed to track information over the course of an entire conversation.
ELIZA teaches several lessons about natural language programming and more generally about the field of artificial intelligence. The technique of pattern matching can produce impressive results with a simple program AS LONG AS the application is highly restricted. As soon as we try to venture outside the boundaries of the program we quickly recognize the computer’s limitations. The key to evaluating any natural language system is to test its boundaries. The key ingredient that ELIZA and all other computer programs currently lack is a true understanding of natural language.