CSC 350 Assignment #4 — Database Storage/Retrieval via Natural Language

Part A: Due Tuesday, March 11 (scripted by midnight).
Part B: Due Tuesday, March 18 (scripted by midnight).


Mimicking the ideas of the "famous people database" discussed in class, create a similar "natural language" retrieval-based collection of information. Proceed according to the following steps.

Part A

  1. Develop a problem domain in which the database is to be used. (If you were to use the idea of maintaining data on "famous people", you'd need to change the relevant aspects of it. For example, rather than profession and nationality as attributes of your program's expertise, you could keep tabs on celebrities' favorite foods, pets, etc.)
    Some ideas: authors and their writings; Oscars and the winners; aircraft/cars/ships/whatever and their specifications; quotes, jokes, etc.
  2. Create a source language of sentences which store information into– and retrieve information from– your database.
  3. Write a Prolog Definite Clause Grammar to recognize your language. Note: this grammar has no attributes attached to the nonterminals.
  4. Run your system showing that it recognizes legal "sentences" and rejects illegal ones.
  5. Capture a listing and the above run in a script file called, perhaps, 4a.ts.

Part B

  1. Extend the grammar by adding appropriate attributes (aka features) to appropriate elements.
    I.e., create an attribute grammar.
  2. Devise a data storage representation to maintain these attributes.
  3. Turn the grammar into an action grammar which interprets the sentences.
    I.e., either stores or retrieves information from the data collection.
  4. Run your system showing that it responds to legal sentences with appropriate information.
  5. Capture a listing and the above run in a script file called 4b.ts.