Building trees with a grammar

Assuming that you've already used Choose Grammar... to select the grammar practice.gr as the current grammar, and that you've used New under the File menu to open a palette and workspace, you're now ready to build.

 The tools palette contains 4 areas:

  • The first area contains the arrow tool. When other grammar files are loaded, you may also see a scissors tool and a magnifying glass tool here. You choose a tool by clicking on it (the cursor will change shape to tell you which tool you are currently using). The grammar file practice.gr only makes use of the arrow tool.
  • The second area contains a series of categories: Det, V, N, P etc. When you click on one of these boxes, different sets of words and other expressions appear in ...
  • the third area, which contains lexical items and sometimes phrase-structure rules. When you click on a lexical item, an associated tree fragment appears in...
  • the fourth area of the palette. These are the treelets that you use to build phrase structure trees.

The picture on the right shows the N[oun] category highlighted, and the noun "antelope" has been selected, bringing up a treelet corresponding to this noun, with an empty slot for a Det[eterminer]. (Note that this is just a snapshot; to try out the program you will have to open it and run it.)

Sometimes there may be more than one treelet associated with a lexical item: in this case you'll see the lexical item listed more than once; clicking on the different instances will result in different treelets appearing.

 

 

To build a tree, drag the treelet associated with the lexical item that you want from the palette on the left to the workspace on the right; then repeat as often as necessary. In the picture below the user has dragged across all the lexical items needed for the sentence "the antelope drank the water".

First stage

When you have some treelets, you can start assembling them into larger structures. The most basic way to do this (and the only way that this particular simple grammar allows) is to drag a treelet of, say, type "Det" to an empty Det position in another treelet (in this case, for example, the empty position in the treelet for "antelope". To do this, click on the node at the top of a Det treelet and drag it until it is over the Det node in the "antelope" treelet. When you see the node below highlighted, let go of the mouse, and the treelets will have combined. In the picture below, one of the Det treelets has been combined with the "antelope" treelet, and the "water" treelet has been combined with the "drank" treelet (which had an empty NP position).

Building trees

When the final Det treelet has been moved into the remaining empty Det position, nothing more can be done with these treelets. You need some way of combining the NP "the antelope" and the VP "drank the water". In this grammar what you need to do is to look under the "S" category in the palette on the left. There you will find the treelet that will enable you to build what you have into a single tree:

Finishing up

Just as before, you can drag this treelet onto the workspace on the right, and then move the NP and the VP that you've constructed into the corresponding empty slots.

Other more interesting grammar files will allow you to build trees using other operations, but the basic principles of how to work with the program remain the same.

Now all that remains for this demonstration is to save what you have done.