<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1"/><title>Semantic-driven Generation with LFG- and PATR-style Grammars</title><pubinfo>© 1999 Association for Computational Linguistics</pubinfo><author surname="Wedekind" givenname="Jurgen"><org  name="University of Stuttgart" country="Germany" city="Stuttgart"/></author></firstpageheader><frontmatter><p><b>Semantic-driven Generation with LFG-and PATR-style Grammars</b></p><p>Jürgen Wedekind* University of Stuttgart</p></frontmatter><abstract>To find an appropriate utterance for a semantic representation is a problem normally treated in the domain of (tactical) natural language generation. For unification-based approaches, like LFG, PATR, or HPSG (Kaplan and Bresnan 1982; Shieber et al. 1983; Pollard and Sag 1994), this problem turns out to be a formal problem of the underlying grammar formalism, when the mapping between strings and semantic representations is defined by the grammar. Semantic representations are then encoded in a separate part of the feature structures (henceforth f-structures) that are assigned to the sen­tences by the grammar. This is normally achieved by a distinct attribute <b>sem </b>(or an additional cr-projection that is formally reconstructable by such an attribute) whose value is intended to represent the semantics of the sentence the f-structure is assigned to. The f-structure given in (1), which might be assigned to the sentence <i>John arrives </i>by a unification grammar for English, is a simple example. (1) </abstract></header><body><section title="pred 'arrive((subj))' tense pres"><doubt alpha="66.7" length="12" tooSmall="False" monospace="0.0">pred 'john']</doubt></section><section title="subj sem"><p>Since the f-structures assigned to the sentences are always subsumed by the se­mantic representations they contain, a semantic-driven generator has to compute for a given semantic representation a sentence with an f-structure $&gt; that is subsumed by the input (in the following, notated by &lt;£&gt;' C $). To state the underlying decidability problem more formally, we need the fact that a unification grammar G defines a binary relation Ac between terminal strings <i>w </i>and f-structures &lt;É&gt;, as given in (2) (2) <b>Ag </b><b><i>(w, </i></b>&lt;3&gt;) iff G assigns &lt;£&gt; to <i>w.</i><i></i></p><p>The problem of determining for a given semantic representation &lt;£&gt;' whether there is a sentence with an f-structure &lt;É&gt; that is subsumed by the input turns out then to be an instance of the problem of whether we can decide (3) for any given input &lt;&amp;'.</p><doubt alpha="24.0" length="25" tooSmall="False" monospace="0.0">(3) 3w3$($'C $ AAG(w, $))</doubt><p>The undecidability of the <i>generation problem </i>in (3) was shown for definite clause grammars by Dymetman (1991), who reduced the problem to Hilbert's Tenth Prob-</p><p><b>* Institute for Natural Language Processing, University of Stuttgart, Azenbergstr. 12, D-70174 Stuttgart, Germany. E-mail: </b>juergen@ims.uni-stuttgart.de</p></section><section title="rel arrive"></section><section title="argI john"><page local="2" global="278"/><p>lern. Van Noord (1993) provided a proof for PATR-style grammars using a reduction to Posf s Correspondence Problem. Moreover, a reduction to Hilbert's Tenth Problem was also used by Roach (1983) to show the undecidability of the <i>emptiness problem </i>of lexical-functional languages, a result that was later shown by Nishino (1991) using a reduction to Post's Correspondence Problem. In this brief note, we want to investigate the close relationship between the emptiness problem of lexical-functional and PATR languages and the generation problem in (3). We give a much simpler undecidability proof of the emptiness problem using a reduction to the emptiness problem of the intersection of arbitrary context-free languages, a reduction that Wedekind and Kaplan (1996) used to show the undecidability of ambiguity-preserving generation. The close connection of the problems—already indicated by the fact that their undecidability proofs were achieved by the same reductions—results, then, from the fact that the undecidability of the emptiness problem trivially implies the undecidability of semantic-driven gen­eration. This result also applies to other unification-based formalisms such as HPSG, since they are powerful enough to simulate context-free derivations.</p><p>We begin our construction by defining for each context-free language L a unifica­tion grammar that generates L and that associates with each derivable terminal string an f-structure consisting of the string's difference list encoding (plus concatenation information).<footnote anchor="1"/> For the association of the annotated information with the constituents described by a context-free rule of the form A —► <i>w, </i>we use—similar to PATR—a set of distinct metavariables <b><i>{xq</i></b><i>, .. .,x\w\}; </i><b><i>xq </i></b>refers to the mother and x, <i>(i = 1,..., \w\) </i>to the ith daughter.</p></section><section title="Definition"><p>Let G be a context-free grammar in Chomsky normal form whose nonterminal vo­cabulary, terminal vocabulary, start-symbol, and rules are given by <b><i>(Vn, Vt,S,R). </i></b>I.e., each rule has the form A —<b>&gt; e, </b>A—» a or <b>A </b>-&gt; BC with A, B, C <b>G </b><b><i>V^, </i></b>a <b>G </b><b><i>VT </i></b>and <b>e </b>de­noting the empty string. A <b>string grammar </b><i>String(G) </i>for G is a unification grammar <b><i>(Vn,Vt,S,Rs) </i></b>whose rule set is determined as follows. In the first step we construct for each context-free rule <i>r = A —&gt; w </i>a set of annotations <i>Sr:</i></p><doubt alpha="50.0" length="22" tooSmall="False" monospace="0.0">{(x0in) «(x0out)}ifw—e</doubt><doubt alpha="56.9" length="51" tooSmall="False" monospace="0.0">Sr= &lt;  {(x0in first)saa,(xoin rest) »(x0out)}ifw= a</doubt><p><i>{(x0 </i><b>in) « </b><i>(xi </i><b>in), </b><b><i>(xi </i></b><b>out) « </b><i>(x2 </i><b>in), </b><b><i>(x0 </i></b><b>out) </b><i>fa (x2 </i><b>out)}     </b>if <b><i>w — </i></b>BC.</p><doubt alpha="63.0" length="54" tooSmall="False" monospace="0.0">The set of rules is then given byRs= {(r, Sr) \ rgR}.2</doubt><p>Figure 1 illustrates the f-structure encoding of a terminal string generated by a simple string grammar. By induction on the depth of the derivation trees, it can eas­ily be shown that G and <i>String(G) </i>have the same language and that the f-structure assigned to a terminal string <i>w </i>encodes <i>w, </i>as stated more precisely in the following Lemma:</p><p><b>1 We separated this construction out of the main proof, since it might be useful for analyzing other problems.</b></p><p><b>2 We used PATR-style notation, since it facilitates the construction of string grammars. For LFG grammars where we do not have the possibility to refer from one daughter to her sister (necessary for </b><b><i>(x\ </i></b><b>out) rs </b><b><i>(%2 </i></b><b>in</b><b>)) we need a slightly more complex construction. If </b><b><i>w — </i></b><b>BC then B has to be annotated by </b>(T <b>Bi) </b><b>rs j. </b><b>and </b>(t <b>in) rs (j. in) </b><b>and C by </b>(t cfc) <b>rs </b>L (T <b>out) rs q out), </b><b>and</b></p><p>(î <b>Bi </b><b>out) ps </b><b><i>(l </i></b><b>in). </b><b>If </b><b><i>w </i></b><b>= a we need </b>(î <b>in first) rs </b><b>a and </b>(t <b>in rest) rs (</b>î <b>out) </b><b>and for </b><b><i>w = e </i></b><b>the equation (f </b><b>in) rs (| out</b><b>). With this construction we get the same undecidability results for classical LFG grammars. The only difference is that the constructed grammars are tree grammars rather than string grammars.</b></p><page local="3" global="279"/></section><section title="Figure 1"><p><b>A sample constituent structure and the associated f-structure provided by a simple string grammar. The metavariables of the rules are instantiated by the variables attached to the nodes of the constituent structure. To each variable x, is assigned the f-structure element</b></p></section><section title="Lemma"><p>Let <i>String(G) </i>be a string grammar. Then L(G) = <i>L(String(G)) </i>and if there is a deriva­tion of a terminal string <i>w </i>with root <i>SXo </i>and f-structure $ then the substructure of $ which comprises the elements accessible from a0 in $ is a minimal solution of</p><doubt alpha="38.8" length="67" tooSmall="False" monospace="0.0">{(X0in rest1-1first) « h?; |1&lt; i &lt;\M}u{(*0 out)« (x0in rest'10')}.3</doubt><p>If we combine two arbitrary string grammars in such a way that the string encod­ings of the derived terminal strings get unified, we can show the undecidability of the emptiness problem by a simple reduction to the emptiness problem of the intersection of arbitrary context-free languages.</p></section><section title="Theorem"><p>It is undecidable for an arbitrary unification grammar G whether L(G) = 0. <b>Proof</b></p><p>Let G<footnote anchor="1"/> = <i>{Vjj, V\, </i>S<footnote anchor="1"/>, <i>R<footnote anchor="1"/>) </i>and G<footnote anchor="2"/> = <i>(V^, </i>V<footnote anchor="2"/>,S<footnote anchor="2"/>,R<footnote anchor="2"/>) be context-free grammars for two arbitrary context-free languages. Without loss of generality, we can assume that <i>Vjj </i>n Vjy = 0 and that each rule in <i>Rl (i </i>= 1,2) is in Chomsky normal form. On the ba­sis of <i>String(G<footnote anchor="1"/>) </i>and <i>String(G<footnote anchor="2"/>) </i>we construct a unification grammar G = <i>(VN, Vj, S,R)</i> such that # is a new atomic value not in VY- If we assume for G constant-consistency (i.e., axioms of the form h <i>a</i><i> </i>sé <i>b</i><i> </i>for all atomic values a, i&gt; € <b>Vt </b>U {#} with <i>a^b)</i><i> </i>then the problem whether L(G) = 0 reduces to the undecidable problem whether L(Ga) n L(G<footnote anchor="2"/>) = 0. In order to get a derivation of a well-formed terminal string <i>w<footnote anchor="1"/>w<footnote anchor="2"/></i>from S with w?<footnote anchor="1"/> derived from S<footnote anchor="1"/> and <i>w<footnote anchor="2"/> </i>from S<footnote anchor="2"/>, <i>w<footnote anchor="1"/> </i>must be identical with <i>xv<footnote anchor="2"/>, </i>since both string encodings get unified by the S-rule and (xo <b>out first) </b>« # ensures that one string is not a proper prefix of the other.<footnote anchor="4"/> Thus, L(G) = <i>{ww \ w e </i>L(Ga) n <i>L(G<footnote anchor="2"/>)} </i>and L(G) = 0 iff L(GX) n L(G<footnote anchor="2"/>) = 0. ■</p><doubt alpha="66.7" length="6" tooSmall="False" monospace="0.0">with ^</doubt><doubt alpha="55.6" length="27" tooSmall="False" monospace="0.0">VN= V*,UV2U{S} and S0Vj,UV2</doubt><doubt alpha="50.0" length="44" tooSmall="False" monospace="0.0">VT= V\UV2R= {(S - SXS2,h*XlrXo~X2'U\)}UR]UR2</doubt><doubt alpha="50.0" length="28" tooSmall="False" monospace="0.0">lx\{x0out first) « # J ' 'ss</doubt><p><b>3 The whole f-structure encodes the complete difference list derivation of </b><b><i>wx — x, </i></b><b>which is induced by the derivation tree by relabeling each (nonterminal) node dominating substring </b><b><i>v </i></b><b>of </b><b><i>uvz = w </i></b><b>by </b><b><i>vzx — zx, </i></b><b>since the annotations of each rule of the form A —► BC encode the difference list of the mother as the concatenation of the lists of its daughters (X — </b><b>X2 </b><b>= X — Xi + Xi — </b><b>X2).</b></p><p><b>4 The annotation (</b><b>xq out first</b><b>) sa # is not necessary if acyclicity is assumed.</b></p><page local="4" global="280"/><p>By taking the smallest f-structure JL as an input the undecidability of our generation problem reduces trivially to the undecidability of the emptiness problem, since</p><p>That is, if the emptiness problem of L(G) is undecidable for a unification grammar G then G's generation problem in (3) must be undecidable too. (The other direction does not hold, of course.)</p></section><section title="Corollary"><p>For an arbitrary unification grammar G and an arbitrary f-structure it is undecidable whether there is an f-structure $ and a terminal string <i>w </i>such that $' C $ and <b>A</b>g(<b>b;,$).</b></p><p>Although it might be argued that we show the undecidability on the basis of a rather special case, namely the smallest f-structure, the undecidability of the empti­ness problem is nevertheless sufficient, since we always get a (superficially) less triv­ial direct proof of the corollary by using <i>any </i>proof of the theorem and adding some (new) nontrivial input information to the S-rule. If we add, for example, the equation <b><i>(xq </i></b><b>S</b><b>em) « </b>1 to the S-rule of our proof then the problem whether we can find for [<b>sem </b>1] (= $') an f-structure $ and a terminal string <i>w </i>such that [<b>sem </b>1] ç $ and <b><i>Ag</i></b><i>(</i><b><i>w, </i></b>$) reduces to the undecidable problem whether L(G) = 0 as well.<footnote anchor="5"/></p><p>Our construction shows that an LFG or PATR grammar G can simulate the valid computations of an arbitrary Turing machine M, since they are known to be speci­fiable by the intersection of two context-free languages. Since L(M) = 0 is undecid­able, the emptiness problem of L(G) must be undecidable too. By adding a bit of semantic representation to the S-rule these properties are trivially carried over from L(G) to the set of possible realizations assigned to by G, given by the lan­guage <i>{w </i>I 3i&gt;($' C$A <i>Ac(w, </i>&lt;&amp;))}. Our proof construction works, of course, even if the grammatical formalisms satisfy the off-line parsability restriction.<footnote anchor="6"/> Thus, the decid­ability of the membership problem—similar to context-sensitive grammars—does not imply the decidability of the emptiness (and the semantic-driven generation) problem.<footnote anchor="7"/></p><p>From a cognitive point of view it seems quite unrealistic that our language gen­eration capabilities require mathematical models of Turing machine power. Hence, natural language grammars (of the LFG and PATR formalisms) must satisfy condi­tions that do not allow us to show the undecidability of the problem. We assumed the semantic representations to be structurally unrelated to the f-structures they sub­sume. It seems more plausible that there is a proportion <i>k </i>that bounds the size of an</p><p><b>5 Van Noord (1993) used the equation </b><b><i>(xg </i></b><b>solution) rs </b><b><i>yes </i></b><b>in his proof.</b></p><p><b>6 If the context-free grammars G<footnote anchor="1"/> and G<footnote anchor="2"/> are off-line parsable then the unification grammars G used in the undecidability proofs are off-line parsable as well. Since we can decide e e </b><b><i>L(G') </i></b><b>for any context-free grammar G' and can reduce G' to an off-line parsable grammar G" with</b> <b>L(G') - {e} = L(G"), ^(G<footnote anchor="1"/>) </b>n <b>L(G<footnote anchor="2"/>) = </b>0 <b>and hence L(G) = </b>0 <b>must be undecidable even if the grammars satisfy the off-line parsability restriction.</b><b></b></p><p>L(G) = <i>{w </i>I 3$(AG(w, *))} = <i>{w </i>I 3$(_L ç $ A <i>AG(w, *))}.</i></p><page local="5" global="281"/><p>f-structure $ assigned to a string by the size of its subsuming semantic representa­tion |&lt;£&gt;| &lt; fc|$'|. This would force the f-structures of the surface realizations of a semantic representation $&gt;' given by {$ <b>| c $ a </b>3<b>w(Ag(w, $))} </b>to be included in a finite and computable set of structurally related f-structures {&lt;&amp; <b>| ç $ a |$| &lt; </b>Since the generation problem is decidable (Wedekind 1995), i.e., <i>{w </i>| <b><i>Ag(w, </i></b><b>$)} </b><b><i>— </i></b>0 is decidable for any given f-structure and only a finite number of structurally related f-structures $ has to be tested for <i>{w </i><b>| Ag(h&gt;, $)} = </b>0, semantic-driven generation must be decidable. But we must, of course, admit that it is far from being evident yet, how this structural relation is realized in natural language grammars.</p></section><section title="Acknowledgments"><p><b>Ron Kaplan had the idea that the proof construction which we used in Wedekind and Kaplan (1996) might be useful for other purposes. Thanks to him for valuable suggestions.</b></p></section><references><p><b>Dymetman, M. 1991. Inherently reversible grammars, logic programming and computability. In </b><b><i>Proceedings of the ACL Workshop: Reversible Grammar in Natural Language Processing. </i></b><b>Berkeley, CA, pages 20-30.</b></p><p><b>Kaplan, R. M. and J. Bresnan. 1982.</b></p><p><b>Lexical-Functional Grammar: A formal</b> <b>system for grammatical representation.</b><b> In</b> <b>J.</b><b> Bresnan, editor, </b><b><i>The Mental</i></b></p><p><b><i>Representation of Grammatical Relations. </i></b><b>MIT</b></p><doubt alpha="64.6" length="79" tooSmall="False" monospace="0.0">Press, Cambridge, MA, pages 173-281. Nishino, T. 1991. Mathematical analysis of</doubt><p><b>lexical-functional grammars. </b><b><i>Language</i></b></p><doubt alpha="50.8" length="65" tooSmall="False" monospace="0.0">Research,27(1): 119-141. Pollard, C. and I. Sag. 1994.Head-Driven</doubt><p><b><i>Phrase Structure Grammar. </i></b><b>The University</b></p><p><b>of Chicago Press, Chicago, IL.</b></p><p><b>Roach, K. 1983. LFG languages over a one-letter alphabet. Manuscript, Xerox PARC, Palo Alto, CA.</b></p><p><b>Shieber, S., H. Uszkoreit, F. Pereira, J. Robinson, and M. Tyson. 1983. The formalism and implementation of PATR-II. In B. Grosz and M. Stickel, editors, </b><b><i>Research on Interactive Acquisition and Use of Knowledge. </i></b><b>SRI Final Report 1894. SRI International, Menlo Park, CA, pages 39-79.</b></p><p><b>van Noord, G. 1993. </b><b><i>Reversibility in Natural Language Processing. </i></b><b>Ph.D. thesis, Rijksuniversiteit Utrecht.</b></p><p><b>Wedekind, J. 1995. Some remarks on the decidability of the generation problem in LFG- and PATR-style unification grammars. In </b><b><i>Proceedings of the 7th Conference of the European Chapter of the Association for Computational Linguistics. </i></b><b>Dublin, pages 45-52.</b></p><p><b>Wedekind, J. and R. M. Kaplan. 1996. Ambiguity-preserving generation with LFG- and PATR-style grammars. </b><b><i>Computational Linguistics, </i></b><b>22(4): 555-558.</b></p><p><b>7 This fact is already illustrated by the languages of the grammars we used in the undecidability proofs; they all have a decidable membership problem, since </b><b><i>w </i></b><b>6 </b><b><i>L(G<footnote anchor="1"/>) </i></b>n <b><i>L(G<footnote anchor="2"/>) </i></b><b>is decidable for arbitrary context-free grammars G<footnote anchor="1"/> and G<footnote anchor="2"/>.</b></p><page local="6" global="282"/></references></body></article>