Computer Science 315
Artificial Intelligence

Assignment 6 - Natural Language Processing in Prolog

Talk, its only talk
Arguments, agreements, advice, answers,
Articulate announcements
Its only talk


King Crimson, "Elephant Talk" (1981)

Due Monday, 03 December

In this exercise you will write some grammar rules for communicating with a Quagent. The file ps6.zip contains everything you need to get started. Download and unzip it, and launch the Quagent server by typing
  % python server.py &
into your Linux terminal. Then launch XSB and type
| ?- consult(talk).

| ?- run.
You will get a >> prompt at which you can type natural-language commands, ending in a period or question mark. Typing quit. exits the loop. I've provided an example interaction in grammar.P, which you will modify to do interesting things in English or your favorite natural language. The slides (especially II) from the Prolog NLP section of the course will help you understand how to write grammars to do interesting things. You will also need to look at the documentation for the XSB Prolog Quagent Client package I wrote, to see what sort of behaviors are available.

This is an open-ended assignment, and you are free to do as much or as little as you like. Given the short amount of time you have, one approach would be to pick an interesting topic and implement some aspect of it. For example, you might choose to interact with the Quagent using a language other than English. Or you might implement part of the semantics of determiners:
  >> Run 10 steps.
  Okay
  >> What do you see?
  I see three pieces of gold.
  >> Pick up the closest piece of gold.
  Okay
  ...
If you like, you can add stuff to the environment by editing the quagent.config file. This page tells you how to do this.

What to turn in

E-mail me your grammar.P file, along with a brief description of what you implemented. If you edit quagent.config, send it as well.