-*- mode:Text -*- Copyright 1992 Patrick H. Winston. All rights reserved. Version 1.1, transferred from master disk on 21 Jan 93 This file may reference other files containing copyrighted software. Any restrictions on the use of such software are described in the files containing that software. This file may be freely copied as long as this notice is kept intact. WARNING AKCL and KCL users may need to delete the final line in the tools.exp file, the one that reads as follows: (run-interface) For some reason, you need to type this line yourself, rather than just including it in the tools.exp file. PURPOSE Provides program support for Chapter 29, Responding to Questions and Commands. Illustrates Natural language database query using tools. PERFORMANCE EXPERIMENT 1 Examine the file tools.exp. Start natural language interface by typing the following command to your lisp system: (load "tools.exp") Then ask various questions, perhaps starting with the following: Show me the tools. What are the long tools. What are the sizes of the screwdrivers. Rank the tools by quality. Once you have loaded tools.exp, and subsequently exited from the natural language interface, you can reactivate the interface by typing the following command: (tools) PERFORMANCE EXPERIMENT 2 Change the results by editing the relations in the file tools.lsp. KNOWLEDGE ENGINEERING EXPERIMENT 1 Connect the natural language interface to a database describing your local restaurants. KNOWLEDGE ENGINEERING EXPERIMENT 2 Generalize the natural language interface by modifying the grammar to accept sentences of the following form: What sizes are the screwdrivers? What is the average size of the screwdrivers? MEDIUM-SCALE LISP PROJECT Modify the grammar compiler so that grammars can contain asterisks (*), meaning ``Any number of words, including none, can go here.'' Use the added functionality to implement a program that handles dialogs such as those made famous by the DOCTOR program (also known as Eliza). The DOCTOR program pretended it was a psychiatrist: Patient: I am worried about grades. Doctor: How long have you worried about grades? Patient: For two months. Doctor: Does the number TWO have special significance to you?