PLOGHELP PARSEDEMO Chris Mellish July 1983 Revised by Kathryn Seifert August 1986 Library demonstration program of a simple natural language parser Keywords: parsing, natural language, grammar, graphics display The library program PARSEDEMO is a small demonstration program involving a simple natural language parser written with Prolog grammar rules. The program accepts a sentence as input, parses the sentence, and produces a 'picture' of the resulting parse tree using LIB * SHOWTREE (see PLOGHELP * PLOGSHOWTREE and HELP * SHOWTREE). The code of the PARSEDEMO program itself also demonstrates the use of POPLOG processes to produce "generators" of solutions to Prolog goals (see SHOWLIB * PARSEDEMO). To load the program, type: ?- library(parsedemo). The program is started by typing: ?- go. You will receive the following prompt: ** [please type your sentence] ? At this point you should type in the sentence to be parsed (without punctuation) after the '?'. If the sentence can be parsed, then the parse tree will be displayed on your screen. The program will then ask for another input sentence. If you have no more sentences to parse, type C (i.e. ) to end the program. The parser is very restricted in scope. It understands simple sentences involving the following vocabulary: Determiners: the, a, an Adjectives: big, red, fat, tall, thin, hairy, blue, green, small Common Nouns: man, block, woman, girl, boy, tree, cat, dog Proper Nouns: john, mary Verbs: ate, saw, sang, smiled, walked, ran, sat, jumped, chased Prepositions: on, with, in, at, by, up, under, to Relative pronouns: who -- RELATED DOCUMENTATION ---------------------------------------------- PLOGHELP * GRAMMARS Overview of HELP files dealing with grammars and natural language PLOGHELP * PLOGSHOWTREE Library package for drawing out a tree representing a list HELP * SHOWTREE POP-11 HELP file giving details on LIB SHOWTREE