AI1 Projects __________ Log on to EMAS. Get into PROLOG. Consult the following files: ecmi04.atn ecmi04.random ecmi04.drinks [ you may copy them to your own area before you run prolog if you wish] In response to the prompt ?- type go. Try this several times and explore the sentences generated. List the program. Trace the program and step through it: ?- trace,go. When you think that you understand how the program works do the following: 1. Write a description of how the program works, what each clause does, what clauses are called in an example run of the program. [You might print out a trace of a run of the program and write comments on it]. 2. The "drinks" part of the program is a representation of an RTN grammar. Draw the RTN's that are represented here. [see your linguistic notes]. 3. Copy the "drinks" file to your area. Edit it (using 'em' or 'ecce') to include the following additional vocabulary: verbs - hates,pours nouns - pint, milk, glass adjectives - clear, fresh, full In addition to the above, do two or more of the following: 1. This program does not distinguish between subject and object. It can produce sentences such as: "the tea drinks the vicar" Consider how you could rewrite the RTN's to prevent this. Rewrite the program (edit the "drinks" file) to include these new rtn's. 2. How could the program be altered to generate the following: fred like a pint of beer. the vicar pours a glass of sherry! Add an RTN for prepositional phrases. Change the program to include this. Try also adding conjunctions, for example: jane wants a vodka and tonic. the policeman drinks the tea and the beer? 3. Edit the file ATN so that a call of "go" prints a parse tree in the form: sentence nounphrase determiner a noun vicar verb drinks nounphrase determiner the noun tea stop_mark [more difficult] 4. Rewrite the drinks grammar and atn to produce poems. 5. Rewrite the programm so that, instead of generating a sentence, it takes a sentence, for example [the,vicar,loves,tea], and prints a parse of it using the grammar - or fails if it will not parse. [it might produce the same sort of parse tree as that above]. 6. Find out about "Definite Clause Grammars". Rewrite the generator using these.