File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/82/p82-1001_metho.xml
Size: 23,912 bytes
Last Modified: 2025-10-06 14:11:28
<?xml version="1.0" standalone="yes"?> <Paper uid="P82-1001"> <Title>TRANSLATING ENGLISH INTO LOGICAL FORM'</Title> <Section position="4" start_page="0" end_page="0" type="metho"> <SectionTitle> Artificial Intelligence Center SRI International </SectionTitle> <Paragraph position="0"> with phrasal categories in model-theoretic semantics. The translation 'types are classes of data objects rather than abstract denotations, yet they play much the same role in the translation process that denotation types play in formal semantics.</Paragraph> <Paragraph position="1"> In addition to this parallel between logical types and translation types, we have intentionally designed the language in which translation rules are stated to emphasize parallels between the syntax-directed translation and corresponding model-theoretic interpretation rules found in, say, the GPSG literature \[Gazdar, forthcoming\]. In the GPSG approach, each syntax rule has an associated semantic rule (typically involving functional application) that specifies how to compose the meaning of a phrase from the meanings of its constituents.</Paragraph> <Paragraph position="2"> In an analogous fashion, we provide for the translation of a phrase to be synthesized from the translations of its immediate constituents according to a local rule, typically involving symbol/c application and ~-conversiou.</Paragraph> <Paragraph position="3"> It should be noted in passing that doing translation rather than model theoretic interpretation offers the temptation to abuse the formalism by having the &quot;meaning&quot; (translation) of a phrase depend on syntactic properties of the translations of its constituents--for instance, on the order of conjuncts in a logical expression. There are several points to be made in this regard. First, without severe a priori restrictions on what kinds of objects can be translations (coupled with the associated strong theoretical claims that such restrictions would embody) it seems impossible to prevent such abuses. Second, as in the case of programming languages, it is reasonable to mmume that there would emerge a set of stylistic practices that would govern the actual form of grammars for reasons of manageability and esthetics. Third, it is still an open question whether the model*theoretic program of strong compositiouality will actually succeed. Indeed, whether it succeeds or not is of little concern to the computational linguist, whose systems, in any event, have no direct way of using the sort of abstract model being proposed and whose systems must, iu general, be based on deduction (and hence translation).</Paragraph> <Paragraph position="4"> The rest of the paper discusses our work in more detail.</Paragraph> <Paragraph position="5"> Section II presents the grammar formalism and describes PATR, an implemented parsing and translation system that can accept a grammar in our formalism and uses it to process sentences. Examples of the system's operation, including its application in a simple deductive question-answering system, are found in Section HI. Finally, Section IV describes further extensions of the formalism and the parsing system. Three appendices are included: the first contains sample grammar rules; the second contains meaning postulates (axioms) used by the question-answering system; the third presents a sample dialogue session.</Paragraph> <Paragraph position="6"> &quot;This research wns supported by the Defense Advanced Research Projects Agency under Contract N000SO-SO-C.-0575 with the Naval Electronic Systems Conunand. The views and conclusions contained in this document are those of the authors and should not be interpreted ns representative of the ol~cial policies, either expres~.d or implied, of the Defense Ad~eanced Research Projects Agency or the United States Government.</Paragraph> <Paragraph position="7"> il A GRAMMAR FORMALISM A General Characterization Our grammar formalism is beet characterized as n specialized type of augmented context-free grammardeg That is, we take a grammar to be a set of context-fres rules that define a language and associate structural descriptions (parse trees) for each sentence in that language in the usual way. Nodes in the parse tree are assumed to have a set of features which may assume binary values (True or False), and there is a distinguished attribute--the &quot;translation'--whoee values range over a potentially infinite set of objects, i.e., the translations of English phrases.</Paragraph> <Paragraph position="8"> Viewed more abstractly, we regard translation as a binary relation between word sequences and logical formulas. The use of a relation is intended to incorporate the fact that many word sequences have several logical forms, while some have none at all.</Paragraph> <Paragraph position="9"> Furthermore, we view this relation as being composed (in the mathematical sense) of four simpler relations corresponding to the conceptual phases of analysis: (1) LEX (lexical analysis), (2) PARSE (parsing), (3) ANNOTATE (assignment of attribute values, syntactic filtering), and (4) TRANSLATE (translation proper, i.e., synthesis of logical form).</Paragraph> <Paragraph position="10"> The domains and ranges of these relations are as follows: The relational composition of these four relations is the full translation relation associating word sequences with logical forms. The subphases too are viewed as relations to reflect the inherent nondeterminism of each stage of the process. For example, the sentence =a hat by every designer sent from Paris was felt&quot; is easily seen to be nondeterministic in LEX ('felt'), PARSE (poetnominal modifier attachment), and TRANSLATE (quantifier scoping).</Paragraph> <Paragraph position="11"> It should be emphasized that the correspondence between processing phases and these conceptual phases is loose. The goal of the separation is to make specification of the process perspicous and to allow simple, clean implementations. An actual system could achieve the net effect of the various stages in many ways, and numerous optimizatious could be envisioned that would have the effect of folding back later phases to increase efficiency.</Paragraph> <Paragraph position="12"> B The Relations LEX, PARSE, and ANNOTATE We now describe a characteristic form of specification ap- null Lexieal analysis is specified by giving a kernel relation between individual words and morpheme sequences I (or equivalently, a mapping from words to sets of morpheme sequences), for example:</Paragraph> <Paragraph position="14"> The kernel relation is extended in a standard fashion to the full LEX relation. For example, &quot;went&quot; is mapped onto the single morpheme sequence (&past go), and &quot;John&quot; is mapped to (john). Thus, by extension, &quot;John went&quot; is transformed to (John &post go) by the lexical analysis phase.</Paragraph> <Paragraph position="15"> Parsing is specified in the usual manner by a context-free grammar. Utilizing the eontext,-free rules presented in the sample system specification shown in Figure 1, (John 8cpast go) is transformed into the parse tree</Paragraph> <Paragraph position="17"> Every node in the parse tree has a set of associated features.</Paragraph> <Paragraph position="18"> The purpo6e of ANNOTATE is to relate the bate parse tree to one that has been enhanced with attribute values, filtering out three that do not satisfy stated syntactic restrictions. These restrictions are given as Boolean expressions associated with the context-free rules; a tree is properly annotated only if all the Boolean expressions corresponding to the rules used in the analysis are simultaneously true. Again, using the rules of Figure 1, lof course, more sophisticated spprotehe~ to morpholoslesl sualysls would seek to analyze the LEX relgtion more fully. See, for example, ~Kartunnen, lgS2J gad \[Ksplan, 19811.</Paragraph> <Paragraph position="20"/> </Section> <Section position="5" start_page="0" end_page="0" type="metho"> <SectionTitle> C The Relation TRANSLATE </SectionTitle> <Paragraph position="0"> Logical-form synthesis rules are specified as augments to the context-free grammar. There is a language whose expressions denote translations (syntactic formulas); an expression from this language is attached to each context-free rule and serves to define the composite translation at a node in terms of the translations of its immediate constituents. In the sample sentence, TENSE' and V' {the translations of TENSE and V respectively) would denote the ),-expressions specified in their respective translation rules. VP' {the translation of the VP) is defined to be the value of (SAP (SAP COMP' TENSE') V'), where COMF' is a constant k-expression and SAP is the symbolic-application operator. This works out to be (k X \[past (go X))). Finally, the symbolic application of VP' to N'P' yields (past (go John)). (For convenience we shall henceforth use square brackets for SAP and designate (SAP a ~) by a\[~\].) Before describing the symbolic-application operator in more detail, it is necessary to explain the exact nature of the data objects serving as translations. At one level, it is convenient to think of the translations as X-expressions, since X-expressions are a convenient notation for specifying how fragments of a translation are substituted into their appropriate operator-operand positions in the formula being assembled-especially when the composition rules follow the syntactic structure as encoded in the parse tree. There are several phenomena, however, that require the storage of more information at a node than can be represented in a bare k-expression. Two of the most conspicuous phenonema of this type are quantifier scoping and unbounded dependencies (&quot;gaps&quot;).</Paragraph> <Paragraph position="1"> Our approach to quantifier scoping has been to take a version of Cooper's storage technique, originally proposed in the context of model-tbeoretic semantics, \[Cooper, forthcoming\[ and adapt it to the needs of translation. For the time being, let us take translations to be ordered pairs whose first component (the head) is an expression in the target language, characteristically a k-expression. The second component of the pair is an object called storage, a structured collection of sentential operators that can be applied to a sentence matrix in such a way as to introduce a quantifier and &quot;capture&quot; a free variable occurring in that sentence matrix. 2 For example, the translation of &quot;a happy man&quot; might be < m , (X S (some m (and (man m)(happy m)) S)) >.s Here the head is m (simply a free variable), and storage consists of the X-expression (k S restriction, body) ...). If the verb phrase &quot;sleeps ~ were to receive the translation < (X X (sleep X)), ~ > (i.e., a unary predicate as head and no storage), then the symbolic application of the verb phrase translation to the noun phrase translation would compose the heads in the usual way and take the &quot;uniou&quot; of the storage yielding < (sleep m), (k S (some m (and (man m)(happy m)) S)) >.</Paragraph> <Paragraph position="2"> We define an operation called ~pull.s,&quot; which has the effect of &quot;pulling&quot; the sentence operator out of storage and applying it to the head. There is another pull operation, pull.v, which operates on heads representing unary predicates rather than sentence matrices.</Paragraph> <Paragraph position="3"> When pull.s is applied in our example, it yields < (some m (and (man m)(happy m)) (sleep m)), ~b >, corresponding to the translation of the clause ~a happy man sleeps.&quot; Note that in the process the free variable m has been &quot;captured.&quot; In model-theoretic semantics this capture would ordinarily be meaningless, although one can complicate the mathematical machinery to achieve the same effect. Since translation is fundamentally a syntactic process, however, this operation is well-defined and quite natural.</Paragraph> <Paragraph position="4"> To handle gaps, we enriched the translations with a third component: a variable corresponding to the gapped position. For example, the translation of the relative clause &quot;.,.\[that\] the man saw&quot; would be a triple: < (past (see X Y)), Y, (k S (the X (man X) $))>, where the second component, Y, tracks the free variable corresponding to the gap. At the node at which the gap was to be discharged, X-abstraction would occur (as specified in the grammar by the operation &quot;uugap') producing the unary predicate (X Y (past (see X Y))), which would ultimately be applied to the variable corresponding to the head of the noun phrase.</Paragraph> <Paragraph position="5"> It turns out that triples consisting of (head, var, storage) are adequate to serve as translations of a large class of phrases, but that the application operator needs to distinguish two subcases (which we call type A and type B objects). Until now we have been discussing type A objects, whose application rule is given (roughly) as < hal,vat,san>l< hal',vat',san'>\[ -~ <(hd hd'),var LI var', sto i3 sto'> where one of vat or vat' must be null. In the ease of type B objects, which are assigned primarily as translations of determiners, the rule is < h d,var ,san > \[< hd',var',sto' >\] = <var, var', hd(hd') U sto U sto'> For example, if the meaning of &quot;every&quot; is every' ~- <(k P (X S (every X (P X) S))), X, ~b> and the meaning of ~man&quot; is man' ---- < man, ~, ~ > then the meaning of &quot;every man&quot; is every'\[man'\] = ( X , C/, (X S (man X) S)> , as expected.</Paragraph> <Paragraph position="6"> Nondeterminism enters in two ways. First, since pull opera, tions can be invoked nondeterministically at various nodes in the parse tree (as specified by the grammar), there exists the possibility of computing multiple scopings for a single context-free parse tree. (See Section III.B for an example of this phenomenon.) In addition, the grammar writer can specify explicit nondeterminism by associating several distinct translation rules with a single context-free production. In this case, he can control the application of a translation schema by specifying for each schema a guard, a Boolean combination of features that the nodes analyzed by the production must satisfy in order for the translation schema to be applicable.</Paragraph> <Paragraph position="7"> D Implementation of a Translation System The techniques presented in Sections H.B and II.C were implemented in a parsing and translation system called PATR which was used as a component in a dialogue system discussed in Section III.B. The input to the system is a sentence, which is preprocessed by a lexical analyzer. Parsing is performed by a simple recursive descent parser, augmented to add annotations to the nodes of the parse tree. Translation is then done in a separate pass over the annotated parse tree. Thus the four conceptual phases are implemented as three actual processing phases. This folding of two phases into one was done purely for reasons of efficiency and has no effect on the actual results obtained by the system. Functions to perform the storage manipulation, gap handling, and the other features of translation presented earlier have all been realized in the translation component of the running system. The next section describes an actual grammar that has been used in conjunction with this translation system.</Paragraph> </Section> <Section position="6" start_page="0" end_page="0" type="metho"> <SectionTitle> III EXPERIMENTS IN PRODUCING AND USING LOGICAL FORM A A Working Grammar </SectionTitle> <Paragraph position="0"> To illustrate the ease with which diverse semantic features could be handled, a grammar was written that defines a semantically interesting fragment of English along with its translation into logical form \[Moore, 1981\]. The grammar for the fragment illustrated in this dialogue is compact occupying only a few pages, yet it gives both syntax and semantics for modais, tense, aspect, passives, and lexically controlled infinitival complements. (A portion of the grammar is included as Appendix A.) 4 The full test grammar, Io,~ely based on DIAGRAM \[Robinson, 1982\] but restricted and modified to reflect changes in a~ proach, was the grammar used to specify the translations of the sentences in the sample dialogue of Appendix C.</Paragraph> <Paragraph position="1"> B An Example of the System's Operation The grammar presented in Appendix A encodes a relation between sentences and expressions in logical form. We now present a sample of this relation, as well as its derivation, with a sample sentence: &quot;Every man persuaded a woman to go.&quot; Lexical analysis relates the sample sentence to two morpheme streams: every man &ppi persuade a woman to go 4Since this is just a small portion of the actual grammar selected for expository purposes, many of the phrasal categories and annotations will seem unmotivated and needlessly complex. These categories and annotations m'e utilized elsewhere in the test grammar.</Paragraph> <Paragraph position="2"> *, every man ,~past persuade a woman to go.</Paragraph> <Paragraph position="3"> The first is immediately eliminated because there is no context-free parse for it in the grammar. The second, however, is parsed as While parsing is being done, annotations are added to each node of the parse tree. For instance, the NP -* DETP NOM rule includes the annotation rule AGREE( NP, DETP, Definite ). AGREE is one of a set of macros defined for the convenience of the grammar writer. This particular macro invocation is equivalent to the Boolean expression Definite(NP) ~ Definite(DETP). Since the DETP node itself has the annotation Definite as a result of the preceding annotation process, the NP node now gets the annotation Definite as wello At the bottom level, the Definite annotation was derived from the lexical entry for the word &quot;evesy'. s The whole parse tree receives the following Finally, the entire annotated parse tree is traversed to assign translations to the nodes through a direct implementation of the process described in Section II.C. (Type A and B objects in the following examples are marked with a prefix 'A:' or 'B:'.) For instance, the VP node covering (persuade a woman to go), has the translation rule VPT'\[N'P'\]\[INFINITIVE'\]. When this is applied to the translations of the node's constituents, we have CA: CA X CA P (~ T (persuade Y= X (P X)))~ \[,CA: X2. ~,. C~ S (some X2 Cwomu X2) S))~\] \[cA: (~x C~x))~\] which, after the appropriate applications are performed, yields cedurally, the process actually used guarantees that the resulting annotation is ex&quot; &quot;t|y the one specified declaratlve~y by the annotation rules. At this point, the pull operator (pull.v) can be used to bring the quantifier out of storage, yielding 6 <A: CA Y (some ~2 (womb \]\[2) (pant (peramado T~ (go Yg))))).</Paragraph> <Paragraph position="4"> This will ultimately result in &quot;a woman&quot; getting narrow scope. The other alternative is for the quantifier to remain in storage, to be pulled only at the full sentence level, resulting in the other scoping. In Figure 2, we have added the translations to all the nodes of the parse tree. Nodes with the same translations as their parents were left unmarked. From examination of the S node translations, the original sentence is given the fully-scoped translations</Paragraph> <Paragraph position="6"> As mentioned in Section I, we were able to demonstrate the semantic capabilities of our language system by assembling a small question-answering system. Our strategy was to first translate English into logical formulas of the type discussed in \[Moore, 1981\], which were then postprocessed into a form suitable for a first-order deduction system. 7 (Another possible approach would have been to translate directly into first-order logic, or to develop direct proof procedures for the non-first-order language.) Thus, we were able to integrate all the components into a question-answering system by providing a simple control structure that accepted an input, translated it into logical form, reduced the translation to first-order logic, and then either asserted the translation in the case of declarative sentences or attempted to prove it in the case of interrogatives. (Only yes/no questions have been implemented.) null The main point of interest is that our question-answering system was able to handle complex semantic entailments involving tense, modality, and so on--that, moreover, it was not restricted to extensional evMuation in a data base, as with conventional question-answering systems. For example, our system was able to handle the entailments of sentences like John could not have been persuaded to go.</Paragraph> <Paragraph position="7"> (The transcript of a sample dialogue is included as Appendix C.) The reduction of logical form to first-order logic (FOL) was parameterized by a set of recursive expansions for the syntactic elements of logical form in a manner similar to Moore's use of an sxiomatization of a modal language of belief. \[Moore, 1980\] For example, (past P) is expanded, with respect to a possible world w, as (some w2 (and (past w2 w) <P,w2>)) where &quot;<P,w2>&quot; denotes the recursive FOL reduction of P relative to the world w2. The logical form that was derived for the sample sentence &quot;John went ~ therefore reduces to the first-order sentence (some w (and (past w REALWORLD)(go w John))).</Paragraph> <Paragraph position="8"> More complicated illustrations of the results of translation and reduction are shown in Figure 3. Note, for example, the use of restricted quantification in LF and ordinary quantification in FOL.</Paragraph> <Paragraph position="9"> To compute the correct semantic entailments, the deduction system was preloaded with a set of meaning postulates (axioms) giving inferential substance to the predicates associated with lexical items (see IMrffT: every ntanus~ be happy iF: (everyX (m X)</Paragraph> </Section> <Section position="7" start_page="0" end_page="0" type="metho"> <SectionTitle> IV FURTHER EXTENSIONS </SectionTitle> <Paragraph position="0"> We are continuing to refine the grammar formalism and improve the implementation. Some of the refinements are intended to make the annotations and translations easier to write. Examples include: null Allowing nonbinary features, including sets of values, in the annotations and guards (extending the language to include equality and set operations).</Paragraph> <Paragraph position="1"> Generalizing the language used to specify synthesis of logical forms and developing a more uniform treatment of translation types.</Paragraph> <Paragraph position="2"> Generalizing the &quot;gap* variable feature to handle arbitrary collections of designated variables by using an &quot;environment&quot; mechanism. This is useful in achieving a uniform treatment of free word order in verb complements and modifiers.</Paragraph> <Paragraph position="3"> In addition, we are working on extensions of the syntactic machinery, including phrase-linking grammars to handle displacement phenomena \[Peters, 1981\], and methods for generating the augmented phrase structure grammar through a metarule formalism similar to that of \[Konolige, 1980\]. We have also experimented with alternative parsing algorithms, including a chart parser \[Bear, 197g\] adapted to carry out annotation and translation in the manner described in this paper.</Paragraph> </Section> class="xml-element"></Paper>