Grail Tutorial - Unary Branches

Like the modes, the unary branches are a very simple extension to NL. You will remember that for NL, the final tree after all contractions have been performed is a binary branching tree. To move from NL to NL◊, we simply allow the final tree after contractions to have unary branches in addition to binary ones.

Using Unary Branches to Encode Linguistic Features

Pronouns in English have different forms when the occur as a subject (in nominative case, such as "he" or "she", for example) or as an object (in accusative case, such as "him" or "her"). So if we would simply decide to assign the category np to both nominative case and accusative case pronouns, we would fail to make any distinction between "she" and "her" and in that case our grammar would decide that all the sentences below are grammatical.
    1. Alice sleeps.
    2. She sleeps.
    3. *Her sleeps.
    1. Alice irritates Tweedledum.
    2. She irritates him.
    3. *Her irritates him.
    4. *She irritates he.
    5. *Her irritates he.
This is clearly not the case: the sentences marked with a ∗ are ungrammatical and we need to find a way to derive only the correct sentences. One solution would be to "split" the basic category np into two distinct atomic categories np_n and np_a, but when we do this we would have to assign each name, like "Alice" and "Tweedledum" both of these categories. We'd like to keep the simple np category for names, yet distinguish between nominative and accusative case. The unary modes and the contractions for them provide a solution.

Contractions for Unary Branches

The grammar engproncase1.pl, developed by Richard T. Oehrle and part of the grammars which can be downloaded together with Grail, illustrates a simple use of the unary branches. Load the grammar engproncase1.pl and parse the first example phrase "Alice sleeps". Grail will display the graph shown below on the left.

Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps]

The only difference with a normal intransitive verb is the pair of unary branches connecting the np labeled 5 to the verb. It is a combination of a main with an auxiliary constructor.

The unary contractions

Figure 3. A graphical representation of the unary contractions with modes

As shown in Figure 3 above, contractions for the unary modes are instances of the same pattern as the contractions for the binary modes: a main and an auxiliary constructor are connected at all points which do not have the arrow pointing towards them in the auxiliary constructor with all other paths leading to the same nodes with the same label. In the figure, it is path 1 to node 3 which has the arrow, so only path 2 from both constructors has to reach the same node, which is four in the current case. In addition, we verify that both constructors have the same mode, n in the current case, like we do with modes in general. In other words, the lexical graph for "sleeps" can immediately be contracted by identifying node 3 and 5 and erasing the pair of unary connections as well as the internal node 4. This means that when we want to, we can use the graph for sleeps as a "normal" intransitive verb.

For the example "Alice sleeps" it is exactly the normal intransitive verb we need. As shown above, we connect the two noun phrases 1 and 5 and the two sentences 6 and 7 to obtain the figure in shown above the in the middle. Then, since we are in a position permitting a contraction (path 2 from both unary links arrives at node 4 and both links have mode n as discussed before) we can remove both unary links and obtain the tree for "Alice sleeps" shown on the right.

Using the Unary Contractions to Check for Case

In order to allow the lexical graph for "she" to occur in the subject position as well, we assign it the graph shown in the figure below on the left.

Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps]

The intuition is that this lexical graph delivers a noun phrase, but with the special restriction that it can only occur in a nominative context. The intransitive verb sleeps provides such a context. Performing the substitutions as before will give us the graph shown in the middle as a result. This time, there are two active auxiliary constructors (shown in blue) attached to a single main constructor. In addition, both auxiliary constructors can be contracted.

  1. The top auxiliary constructor has an arrow reaching node 2 by a path labeled 2, whereas the path labeled 1 reaches node 3 which is attached to a main constructor by a path labeled 1 as well. Since both main and auxiliary constructor or of mode n, this is the first possibility for contraction. When Grail offers the choice of a contraction to perform this is contraction [2] after the node which is reached by the arrow.
  2. The other possibility is the bottom auxiliary constructor, which has an arrow reaching node 5 by a path labeled 1. Its path labeled 2 reaches node 6 which is attached to a main constructor by a path labeled 2 as well. In addition both connections again have the same mode n, so this is a valid contraction. Since the arrow of the auxiliary connection reaches node 5, this choice of a contraction will be marked [5]
As usual, we want to eliminate all auxiliary constructors in order to produce a tree and Grail offers us a choice between the contraction [2] and contraction [5]. Selecting contraction [2] will produce the graph shown on the right of the figure above, after which we can perform the final contraction to produce a tree.

A Contraction Failure

To conclude our introduction to the unary modes, we will show how the ungrammatical sentence "Her sleeps." is underivable. As shown in the figure below, "Her" is assigned the same graph as "She" with exception of the modes. Whereas the graph for "She" indicated it needed to occur in a nominative context, the graph for "Her" indicates it need to occur in an accusative context.

Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps] Lexical lookup for [Alice sleeps]

The figure above in the middle shows the resulting graph after all substitutions have been performed. In this case, unlike in the case for "She sleeps above", there is only a single contraction possible. Though the top auxiliary connection it connected to a main connection by its single path (path 1) which does not have the arrow, this time the two modes, a for the auxiliary constructor and n for the main constructor, do not correspond. We can only perform contraction [5], which produces the figure shown on the right.

In that figure, the unary auxiliary constructor is connected by means of node 5 to a binary main constructor and no contraction is possible. Therefore, as desired, this sentence is underivable.

What's next

Try the sentences with the transitive verb yourself and convince yourself the all and only the correct sentences are derivable. It takes some practice to do the unary contractions right. For the sake of efficiency, Grail does not allow you to backtrack on the choice for contractions and these are some of the only cases where this could be useful. This will be addressed in a future version of Grail.

When you've derived all sentences in this example grammar, you can see an implementation English case using only a single mode in the example grammar engproncase2.pl. Try the examples in this grammar and see how this is done. The words in the lexicon are slightly bigger, so this is a good test to see if you've understood the unary contractions.

Finally, you can see the unary connectives together with structural rules in the next section. If you haven't seen structural rules yet, they are explained in more detail in their own section.


Richard.Moot@labri.fr
Last modified: Mon Mar 2 00:05:56 CET 2009