Interactive Unification in the LKB
When do you want to use interactive unification?
Interactive unification is useful when you find that
a sentence which should parse isn't parsing. Go look
at the parse chart, and look for the lowest point in the
tree where an edge you expect to see isn't there. For
example, you have a determiner and a noun, but no edge
spanning both of them, and you expect that the head-specifier
rule should have built one.
The parser will have of course tried to build a
phrase using those daughters and that rule (because it
tries everything, as it's doing an exhaustive search).
Because it didn't succeed, you don't find the edge in the
chart. You can find out why exactly it didn't succeed
using interactive unification. This will tell you where
you might want to make changes in your grammar so that you
can build that edge. Or you might decide that that edge
shouldn't be built after all, and go look for another edge
that should be there.
How do you do interactive unification?
- In the chart, click on each of the daughter edges, and
select "feature structure" to get the feature structures
for the edges. (Interactive unification can also be
used to debug a unary rule. Here I'm going to talk about
- In the LKB top menu, choose View > Grammar Rule and
pick the rule you think should have applied. This will
give you a feature structure for the rule.
- In the feature structure for the rule, scroll down
until you find the HEAD-DTR feature (it may be easier to
shrink the values for SYNSEM, ARGS, and C-CONT on the way).
- Click on the type that is the value of HEAD-DTR (probably
sign, but possibly something more specific), and choose
"select" out of the pop-up menu.
- In the feature structure for the edge that should
be the head daughter, click on the highest type (e.g.,
common-noun-lex or head-comp-phrase) and
in the pop-up menu choose "unify".
- If the unification failed already, there will be a message
in the LKB window telling you the first point at which
the two feature structures didn't unify (there may be more).
- The rules tend to be fairly non-specific, so this
first unification usually works. If it does, you'll get
a new window called "unification result" which is exactly
the information from the rule with the information of the
head daughter unified in.
- In the unification result feature structure, scroll
down (or shrink down) to the NON-HEAD-DTR feature. Click
on the value of that feature and choose "select".
- In the feature structure for the edge that should be
the non-head daughter, click on the highest type (e.g.,
det-lex or head-spec-phrase) and choose
- Go look at the LKB top window for a message indicating the first
point at which the two feature structures didn't unify (there may be
more). This information should be useful for debugging.
Some bugs that are hard to detect with interactive unification
The method described above makes use of
the HEAD-DTR and NON-HEAD-DTR features. If you happen
to have selected the wrong ordering supertype for
your rule (head-final or head-initial),
you might not be doing what you think you're doing.
So, if the result of trying interactive unification
is very surprising, consider doing it via the ARGS
list instead, unifying the first daughter with the
first thing on the ARGS list and the second with the
second. (NB: ARGS is not ARG-S.)
Problems with the spelling change aspects of lexical
rules can't be debugged in this way.
If you haven't in fact defined the rule (including
an instance in rules.tdl) there won't be anything
to try unifying with. But, you should discover the lack of
the rule when you try to "view" it from the LKB menu.
Back to main course page