next up previous contents
Next: Simple English Syntax Up: Prolog Programming A Previous: What You Should

Parsing in Prolog


Later on in the course, you will be involved in trying to face up to the problem of parsing ordinary english language sentences. For this lecture, we shall also be interested in parsing sentences but we will look at the very simplest examples.

First, what do we want the parser to do? We would like to know that a sentence is correct according to the (recognised) laws of english grammar.

The ball runs fast

is syntactically correct while
The man goes pub

is not as the verb ``go'' (usually) does not take a direct object.

Secondly, we may want to build up some structure which describes the sentence ---so it would be worth returning, as a result of the parse, an expression which represents the syntactic structure of the successfully parsed sentence.

Of course, we are not going to try to extract the meaning of the sentence so we will not consider attempting to build any semantic structures.

Paul Brna
Mon May 24 20:14:48 BST 1999