[Next] [Up] [Previous]
Next: About this document Up: Natural Language Previous: A Sentence Parser and

Exercises

  1. The phrase-structure rules listed on page [*] permit us to generate a fairly large number of different sentences, for example

    a. A beautiful squirrel drank the lemonade
    b. The pink gin evaporated
    c. The old man caught a beautiful pink squirrel

    and so on. Try to work out for yourself which rules, starting from the `S' symbol, would have been used to generate the above sentences. Draw a phrase-marker for each sentence, labelling each sub-constituent in the manner of (9') and (10').

  2. In our discussion of sentence ambiguity on page [*], we ourselves used (had you noticed it?) an ambiguous propositional phrase: ``... the procedure in our program for recognizing noun-phrases.'' This expression manifests exactly the same kind of structural ambiguity as that on which this section comments. Using rule 2 with rules 3 and 4 on that page, respectively, draw all the possible parse-trees for the expression, in the manner of the examples given in figures 5.3, 5.4, and 5.5. Does either of rules 3 or 4 give us uniquely the parse we want? If not, is it possible to write a rule that will do so?
  3. We have said that we might regard the semantic value of a expression as the set of individuals to which that expression applies, and of a complex expression as the intersection of the sets denoted by its constituents. Try to write a simple POP-11 procedure that will take as input a pair of sets and return as a result their intersection.
  4. We saw in this chapter how we would write a database query that would pick out blocks-world items such as `the large green box'. Imagining that you have an appropriate database describing a state of the world, try now to write a set of POP-11 lists that would represent a database query for picking out an arch in that state description. To do this you will require a collection of blocks and relations such as `isa', `not-abutting', and `supported by'.
  5. Look at the POP-11 definitions of NP (first version), NOUN, DET, and so on. Referring to the phrase-structure rules given in this chapter, write similar procedures for VP, Vtrans, and Vintrans. If you have been able to do that, next try writing a new S procedure for recognizing declarative sentences, such as, ``The old man saw a beautiful pink squirrel.'' Rules for VP on which you might base this exercise are given on page [*].


[Next] [Up] [Previous]
Next: About this document Up: Natural Language Previous: A Sentence Parser and

Cogsweb Project: luisgh@cogs.susx.ac.uk