PROLOG-REQUEST@SUSHI.STANFORD.EDU (Chuck Restivo, The Moderator) (07/27/87)
PROLOG Digest Monday, 27 Jul 1987 Volume 5 : Issue 48 Today's Topics: Query - Blackboard Architectures & CHAT ---------------------------------------------------------------------- Date: Wed 22 Jul 87 11:52:28-CDT From: Olivier J. Winghart <CS.WINGHART@R20.UTEXAS.EDU> Subject: Blackboard architectures in Prolog I am looking for natural ways of implementing a blackboard architecture in Prolog. Has anyone already thought about this, and are there any papers that I could look at ? I would appreciate any pointer. -- Olivier ------------------------------ Date: Mon, 20 Jul 87 13:48 EDT From: McHale@RADC-MULTICS.ARPA Subject: Help with CHAT We are working with topographical maps that have information such as towns, rivers, airports, railroads, roads, dams, bridges,... This has us looking at a much finer grain data base than CHAT did. We modified the template file for the resulting new semantic hierarchy. We originally intended to extend CHAT to handle pronomial references, ellipsis, etc. however, we ran into trouble just handling conjunctions and adjectives. The query 'is Tokyo european?' is answered 'yes'. This may be a problem with my converting from Dec-10 prolog to Quintus, but I don't think so. We fixed the grammar for this particular problem, (the only change we've made to the grammar) but the system doesn't handle it correctly later on (in Clausify). I'll send you a more detailed outline of changes we've made. Another thing that I would like to know more about is the ND table. I know it is important for query optimization but have no idea on how to select proper values for it. We'd appreciate any pointers you can give. -- Mike ------------------------------ Date: Mon, 20 Jul 87 15:30:52 EDT From: mchalem@radc-lonex.arpa Subject: CHAT Chat-80 is a PROLOG-based front-end natural language interface to a worldwide database. It was written in partial fulfillment of Fernando Pereira's PhD. thesis at the University of Edinburgh for the degree of Doctor of Philosophy in Artificial Intelligence. Michael McHale, John Crowter, and Mary Ann Huntley of RADC are working in conjunction with Dr. Richard Kittredge, a linguist from the University of Montreal and the Odyssey Research Corporation in Ithaca, to extend Chat-80. The worldwide database has been replaced with the database Michael Hilton is using for his simulation, and includes parts of West Germany, East Germany, and Czechoslovakia. Scott Gregory wrote LISP routines which convert the database from ASCII to PROLOG. It is hoped that the modified Chat will serve as the natural language interface to the aforementioned simulation. Chat-80 takes as input a natural language query, such as, What is the capital of the United States. The query is first syntactically parsed, and categorized as being one of four basic types of queries: declarative, yes/no, wh-type, or imperative. This parse is then sent off to semantics, where it encounters query planning and then query evaluation. In this (not so well understood) stage of processing, the query is mathematically optimized such that the most efficient access to the database is performed. The database is then searched for the answer, which is printed. Modifications to CHAT-80 Many people suggested that Chat-80's grammar should be changed as little as possible due to its extreme complexity and nice organization. We therefore have been extensively modifying the lexicon. In addition to addding new words, we have added a clever feature to handle verbs. Previously, to add a verb and all its tenses, six new entries had to be added to the lexicon. Now we have a rule whereby we add the verb in only two places, and the tenses of the verb are automatically created and added to the lexicon. It is also necessary to modify the semantic dictionary, as well as the domain dependent rule base when adding a new item to the syntactic dictionary. It is interesting to note that although a complete syntactic parse is made before entering semantic interpretation of the input, some key words are coded directly into the grammar, i.e., wh-terms: where and what. Preprocessing In an effort to utilize as much of Chat-80 as possible without changing the grammar, we decided to preprocess the input query. In this way, we massage the query into one which Chat-80 (hopefully) understands and can answer. The preprocessor contains several steps in accordance with several problems we have encountered: Imperatives We want to be able to handle imperatives, such as Show me road 7, and Please show me the railroads. (This is with the intent that Jean Carletta's graphics routines will be utilized. When the user asks to see the railroads, for instance, the railroads on the screen will be highlighted.) We thus look at the input query, and try to match the beginning of the query with the three types of imperatives our system can handle: show, show me, and please show me. Upon finding that the input starts with one of these three phrases, the query is transformed into one of the form: Where is ..., and this new query is handed to Chat, as if it were the original query. Compound words Compound words such as Erfurt_North (anything with an underscore in it) and type one, type two, and type three (words which have a special meaning when used together) posed another problem. We have made it possible to type a compound word as either having an underscore or not. Also, type one, type two, and type three now are treated as a single entity. Compound nouns were also problematic; i.e., road 7, where both road and 7 are considered nouns. We have enabled the grammar to handle double nouns by classifying them as a special type of compound word. Synonyms We wanted equivalent words to have equivalent meanings. Ergo, we have made the following synonyms in our system: waterway = river = stream = brook = creek town = city road = roadway = route Spelling Checker Due to the complexity of the spelling of the proper nouns in the database, as well as the human error of misspellings and typographical errors, a pattern matching spelling checker is implemented. If a word in the input is not in the dictionary, then the user is informed, the closest match replaces the unknown word, and the query proceeds as usual. "What is proper noun" query It is helpful for the user to ask the system, for example, What is Apolda. The system should then reply a town. However, the response supplied by Chat was Apolda. Similarly, when asked what 7 was, the system replied 7, when what was intended was a road. We thus needed a way to solve this problem. Our solution was to turn to the preprocessor, which will look at the input query, and determine if it is of the form "What is proper noun." If it is, then we check to see what kind of thing the proper noun is during the logic phase of the query processing. Single noun phrase queries It is desirous to have the ability to input a single noun phrase such as Merseburg or road 7, and have Jean's system highlight the appropriate area on the map. Thus, we needed to be able to parse single noun phrases. Again we turned to the preprocessor to solve this problem. If the input query contains a single noun phrase, then we transform it to the form: "Where is np," and the process proceedes as usual. semantic hierarchy We found it necessary to change the semantic hierarchy in accordance with the information in the specialized database with which we are working. The new hierarchy is as follows: feature area point line block town land water country heliport terrain bridge wetland dam road river mountain obstruction railroad airstrip power line border Test file A test file was created which contains several queries which currently work on our system. This was added so that whenever we add a new feature to the system, we can execute this file to see if the modification creates errors elsewhere. Help file David Warhoftig has created a help file to orient new users to the system. It is composed of three parts: Welcome for new users This introduces the user to Chat; i.e., what it is, what it does, and how to use it. Sample queries and responses Similar to the module in Chat-80, this facility aids the user in formulating a query which the system can understand. Helpful hints and reminders Suggestions are offered on how to represent the input; i.e., the user is informed that the query need not start with a capital letter, nor does it need to end with a question mark. Also, commas in the input are ignored, and a spelling checker is implemented. Current problems Distance We are currently examining distance queries, such as 'How far is Goslar from Merseburg', and 'What is the distance between Apolda and Artern'. Jean Carletta has written LISP routines to compute distances, and we will either use them or modify them to suit our needs. In either case, they must be translated to Prolog. Pronomial Reference We would like for the user to be able to use pronouns, and have them refer to the response from the previous query. Difficulty with adjectives We have found particular difficulty in adding adjectives to Chat-80. We feel that the implementation of adjectives may be somewhat weak, as when we asked the original Chat-80 if Tokyo is European, the reply was 'yes'. We would like to have the capacity to ask queries involving the adjective mountainous. Remarks In light of the fact that a great deal of effort was expended to gain an overall feel for the code, we feel that we have been making steady progress in modifying Chat-80. ------------------------------ End of PROLOG Digest ********************