use ProFIT templates (defined by ':=') for princi- pies such as the .... (QUIP), and Contextual Head Inheritance Princi- ... Carl Pollard and Eun Jung Yoo. 1995.
Head-Driven Generation with H P S G Graham Wilcock* C e n t r e for C o m p u t a t i o n a l Linguistics U n i v e r s i t y of M a n c h e s t e r I n s t i t u t e of S c i e n c e a n d T e c h n o l o g y P O B o x 88, M a n c h e s t e r M60 1 Q D United Kingdom graham©ccl, umi st. ac. uk Abstract
Yuji Matsumoto G r a d u a t e School of I n f o r m a t i o n S c i e n c e N a r a I n s t i t u t e of S c i e n c e a n d T e c h n o l o g y 8916-5 T a k a y a m a , I k o m a , N a r a 630-01 Japan matsu~is, aist-nara, ac. j p
As HPSG is head-driven, with clear semantic heads, semantic head-driven generation should be simple. We adapt van Noord's Prolog generator for use with an HPSG grammar in ProFIT. However, quantifiers and context factors are difficult to include in headdriven generation. We must adopt recent theoretical proposals for lexicalized scoping and context. With these revisions, head-driven generation with HPSG is not so simple, but it is possible.
as "Kim walks" (Chapter 1 of the HPSG textbook) raises fundamental difficulties. To use a semantic head-driven algorithm, we must adopt recent HPSG proposals to put quantifier store and contextual background inside semantic heads. We summarize these proposals in Section 4, and show how they can be implemented in the ProFIT HPSG grammar. We conclude that head-driven generation with HPSG is possible, but there are some difficulties in implementing this approach.
1
2
Introduction
A natural approach to generation with Head-driven Phrase Structure Grammar (Pollard and Sag, 1994) is to use a head-driven algorithm. HPSG is headdriven not only syntactically, but also semantically. While the Head Feature Principle requires identity of major syntactic features between a phrase and its syntactic head daughter, the Semantics Principle (in various formulations) requires identity of major semantic features between a phrase and its semantic head daughter. Since the semantic head is very clearly defined in HPSG, semantic head-driven generation should be easy to implement. Efficient head-driven generation algorithms, such as BUG, SHD and CSHD, have been presented as Prolog algorithms for use with DCG grammars. In Section 2 we briefly describe how an HPSG grammar can be implemented as a PSG with typed feature structures, which can be compiled into a DCG by the ProFIT system. In this way, HPSG grammars can be used with the existing Prolog algorithms. Such a combination of head-driven grammar and head-driven generator works well if the semantics is strictly head-driven. However, in Section 3 we show that if we implement the HPSG textbook semantics, with quantifier storage and contextual background conditions, the notion of semantic head becomes unclear and this approach no longer works. In fact, head-driven generation of even simple phrases such " Visiting researcher of Sharp Corporation, Japan.
1393
Head-Driven
Generation
We assume that generation starts from logical forms, which may be represented for HPSG as typed feature structures. Logical form is not a separate linguistic level in HPSG, but is equated with semantic content. In this section, we take the starting logical form for generation to be a semantic feature structure which will be identical to the CONTENT feature of the top-level HPSG sign to be generated. 2.1
Semantic heads
Head-driven generation algorithms are based on the idea that most grammar rules have a semantic head daughter whose logical form is identical to the logical form of the mother. The bottom-up generation (BUG) algorithm of van Noord (1990) requires every rule to have such a head (except lexical entries). The semantic head-driven (SHD) algorithm of Shieber et hi. (1990) relaxes this, dividing rules into chain rules with such a head (processed bottom-up), and nonchain rules (processed top-down). The chart-based semantic head-driven (CSHD) algorithm 1 of Haruno et al. (1996) increases efficiency by using a chart to eliminate recomputation of partial results. Head-driven bottom-up generation is efficient as it is geared both to the input logical form (headdriven) and to lexical information (bottom-up). It is good for HPSG, which is highly lexicalist and has 1For simplicity we illustrate the approach with BUG. A ProFIT/HPSG framework using the CSHD algorithm is described by Wilcock and Matsumoto (1996).
'HFP' := synsem!loc!cat!head!HF k hd_dtr!synsem!loc!cat!head!HF. 'SemP' := synsem!loc!cont!Cont k hd_dtr!synsem!loc!cont!Cont. 'SemP'(adjunct) := synsem!loc!cont!Cont adj_dtr!synsem!loc!cont!Cont. hd_ph := ] [PHON
CONT [] / BACKGR {}J
]
] CONTIINDEX [] I [BACKGR {~)J
Figure 3: Contextual Background (Phrasal Amalgamation) 3
Quantifiers
and Context
Head-driven generation as in Section 2 works fine if the semantics is strictly head-driven. All semantic information must be inside the CONTENT feature, and cannot be distributed in other features such as QSTORE or BACKGR. When an NP is assigned to the semantic role of a verb, the whole of the NP's CONTENT must be assigned, not only its INDEX. This differs significantly from HPSG theory. 3.1 Q u a n t i f i e r S t o r a g e a n d R e t r i e v a l There is a complication in Pollard and Sag (1994) caused by the use of Cooper storage to handle scope ambiguities. While scoped quantifiers are included in the QUANTS list within CONTENT, unscoped quantifiers are stored in the QSTORE set outside CONTENT. So logical form for generation needs to include QSTORE as well as CONTENT. In this approach, a quantifier may be retrieved at any suitable syntactic node. A quantifier retrieved at a particular node is a member of the QSTORE set (but not the QUANTS list) of some daughter of that node. Due to the retrieval it is a member of the QUANTS list (but not the QSTORE set) of the mother node. Pollard and Sag (1994) define a modified Semantics Principle to cater for this, but the effect of retrieval on QSTORE and QUANTS means that the mother and the semantic head daughter must have different logical forms. The daughter is
1395
the semantic head by the HPSG definition, but not as required by the generation algorithm. 3.2 C o n t e x t u a l B a c k g r o u n d In addition to semantic content, natural language generation requires presuppositions and other pragmatic and discourse factors. In HPSG, such factors are part of CONTEXT. To specify these factors for generation, the usual approach is to include them in the logical form. So logical form needs to include CONTEXT as well as CONTENT and QSTORE. This extended logical form is defined for BUG1 by replacing the ProFIT template for 'lf(LF)' shown in Figure 2 with the new template in Figure 4. lf(ct!CT ~ qs!OS ~ cx!CX) := synsem!loc!(cont!CT & qstore!QS & conx!CX). Figure 4: Extending the Logical Form However, head-driven generation does not work with this inclusive logical form, given the theory of Pollard and Sag (1994). Even if we ignore quantifier retrieval and look at a very simple sentence, there is a fundamental difficulty with CONTEXT. Figure 3, from Wilcock (1997), shows the HPSG analysis of she saw Kim. Note that she has a nonempty BACKGR set (shown by tag []), stating a pragmatic requirement that the referent is female.
This background condition is part of CONTEXT, and is passed up from NP to S by the Principle of Contextual Consistency. Similarly, Kim has a background condition (shown by tag []) that the referent bears this name. This is also passed from NP to VP, and from VP to S. S, VP and V share the same CONTENT (shown by tag ill). If logical form is restricted to semantic content as in Figure 2, then V is the semantic head of VP and VP is the semantic head of S, not only in terms of the HPSG definition but also in terms of the BUG algorithm. In this case, saw can be found immediately by predict_word in BUG1. But if we extend logical form as in Figure 4, to include the context factors required for adequate realization, it is clear from Figure 3 that S does not have the same logical form as VP, and VP does not have the same logical form as V, as their BACKGR sets differ. Therefore, although V is still the semantic head of VP according to the HPSG definition, it is not the semantic head according to the BUG algorithm. Similarly, VP is still the semantic head of S for HPSG, but it is not the semantic head for BUG. In this case, predicl;_word cannot find any semantic head word in the lexicon, and BUG1 cannot generate the sentence.
4
Revising the Grammar
If we include unscoped quantifiers and contextual background in logical form, we see that there are two different definitions of "semantic head": the HPSG definition based on adjunct daughter or syntactic head daughter, and the BUG algorithm definition based on identity of logical forms. However, recent proposals for changes in HPSG theory suggest that the two notions of semantic head can be brought back together. 4.1
Lexical a m a l g a m a t i o n in H P S G
In Pollard and Sag (1994), QSTORE and BACKGR sets are phrasally amalgamated. The Quantifier Inheritance Principle requires a phrase's QSTORE to be the set union of the QSTOREs of all daughters, minus any quantifiers in the phrase's RETRIEVED list. The Principle of Contextual Consistency requires a phrase's BACKGR to be the set union of the BACKGR sets of all the daughters. It has recently been proposed that these sets should be lezically amalgamated. A syntactic head word's arguments are now lexically specified in its ARGUMENT-STRUCTURE list. The word's setvalued features can therefore be defined in terms of the amalgamation of the set-valued features of its arguments.
1396
Lexical amalgamation of quantifier storage was proposed by Pollard and Yoo (1995). They change QSTORE into a local feature which can be included in the features subcategorized for by a lexical head, and can therefore be lexically amalgamated in the head. A phrase no longer inherits unscoped quantifiers directly from all daughters, instead they are inherited indirectly via the semantic head daughter. Lexical amalgamation of CONTEXT, proposed by Wilcock (1997), follows the same approach. As CONTEXT is a local feature, it can be subcategorized for by a head word and lexically amalgamated in the head by means of a BACKGR amalgamation constraint. Instead of a phrase inheriting BACKGR conditions directly from all daughters by the Principle of Contextual Consistency, they are inherited indirectly via the "contextual head" daughter which is the same as the semantic head daughter. 4.2 Lexical a m a l g a m a t i o n in P r o F I T In the ProFIT implementation, QSTORE sets and BACKGR sets are Prolog difference lists. Lexical amalgamation of both sets is shown in Figure 5, the lexical entry for the verb "saw". The subject's BACKGR set B0-B1 and the object's BACKGR set B1-BN are amalgamated in the verb's BACKGR set B0-BN. The subject and object QSTORE sets, Q0Q1 and Q1-QN, are similarly amalgamated in the verb's QSTORE Q0-QN. lex( phon![sawlX]-X & @verb & synsem!loc!( cat!(head!