|Did you know ...||Search Documentation:|
|Pack small_adventure_games -- prolog/chat80/README|
/* @(#)README 24.1 4/13/88 */
This README file is a simple description about how to run the programs in this directory. Read BENCH.DOC for a better description.
To run chat:
compile(chat). ....... | ?-
demo(mini). % Runs a small set of demo questions | ?-
demo(main). % Runs a larger set of demo questions | ?- test_chat. % Runs the large set of demo questions % and produces a table of statistics
or you can run chat interactively by giving the goal | ?- hi. % prompts for questions then gives you the prompt
Chat is now expecting a question. E.g.
Question: where is France?
Capital letters are not distinguished from lower case. If Chat does not understand a word it prompts you to re-type it (or a synonym for it). This word must be terminated with a period.
Apart from questions, the following directives are accepted by Chat:
Question: bye. (exits back to the Prolog top level) Question: trace. (turns on Chat's tracing mechanism) Question: do not trace. (turns off the tracing mechanism) Question: do mini demo. (calls demo(mini)) Question: do main demo. (calls demo(main)) Question: test chat. (calls test_chat)
The various files which make up the program Chat-80 ===================================================
|Copyright (C) 1982|
|SRI International, 333 Ravenswood Ave., Menlo Park,|
|California 94025, USA;|
|Dept. of Architecture, University of Edinburgh,|
|20 Chambers St., Edinburgh EH1 1JZ, Scotland|
|This program may be used and distributed in accordance with|
|the file LICENSE.txt included in this distribution.|
File Purpose ==== =======
chat.pl Compile this file to get a compiled Chat-80, interpret it to get an interpreted Chat-80.
clone.xg lex.xg The XG which defines the syntax accepted by Chat-80
clotab.pl Table of normal form modifier attachments
xgproc.pl This is a preprocessor to translate XGs into Prolog. If needed, it should be compiled separately. It defines the following evaluable predicates:-
+ File : reads in File treating any grammar rules in it as XG rules; list(File) : writes out to File the Prolog clauses for the XG files read in so far.
xgrun.pl Defines the run time support predicates for XGs (see XGs paper).
newg.pl The Chat-80 grammar after preprocessing. It was obtained by typing the following:-
prolog [xgproc]. + 'clone.xg'. + 'lex.xg'. list('newg.pl').
newdic.pl The syntactic dictionary. It defines both application-independent and application-dependent (world database) words.
slots.pl Determines what modifies what.
scopes.pl Determines the scopes of determiners and other operators, and produces an unsimplified query.
templa.pl Defines the meaning of the application-dependent words.
qplan.pl Optimises a simplified query.
talkr.pl Executes queries.
Gives statistical information about the predicates in the world database (and also some application-independent ones such as 'average'). This is used by the query optimiser. A clause in ndtabl.pl has the form nd(Predicate,PredSize,Dom1Size,...,DomkSize). Predicate is the name of a database predicate of arity k. PredSize, Dom1Size, ..., DomKSize measure the sizes of the the predicate (number of solutions) and the sizes of the domains for each argument (the number of distict values that argument may take in a call to the predicate). we use a logarithmic size measure s = 10 * log10(n) where n is the actual size (number of solutions or number pf distinct values) of a predicate or argument domain. Thus nd(flows,19,16,22) indicates that the binary predicate "flows" has around 80 solutions, and it is going to be called with its first argument taken from a set with around 40 elements (number of rivers in the database) and its second argument taken from a set with around 158 elements (number of countries in the database).
readin.pl Reads in sentences.
ptree.pl Prints out parse trees.
aggreg.pl Executes set operators such as 'average'.
chattop.pl Top level of Chat-80 and query simplifier. demo Sample queries. To run in batch mode, type
to the Prolog toplevel after loading Chat-80.
Output expected from `