File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/87/j87-1005_metho.xml

Size: 44,653 bytes

Last Modified: 2025-10-06 14:11:59

<?xml version="1.0" standalone="yes"?>
<Paper uid="J87-1005">
  <Title>AN ALGORITHM FOR GENERATING QUANTIFIER SCOPINGS</Title>
  <Section position="4" start_page="0" end_page="0" type="metho">
    <SectionTitle>
I.I THE PROBLEM OF GENERATING QUANTIFIER SCOPINGS
</SectionTitle>
    <Paragraph position="0"> The naive algorithm for generating quantifier scopings is to generate all permutations of the quantifiers. For a sentence with n quantified noun phrases this will generate n! different readings. But for the sentence  (1) Every representative of a company saw most  samples.</Paragraph>
    <Paragraph position="1"> there are not six different readings, but only five. The reading that is missing is the one in which most samples is outscoped by every representative but outscopes a company. A model for the disallowed reading could include a different company not only for each representative but also for each sample.</Paragraph>
    <Paragraph position="2"> The reduction in number of readings for a given sentence is not significant for sentence (1), but in the sentence (2) Some representative of every department in most companies saw a few samples of each product.</Paragraph>
    <Paragraph position="3"> there are only 42 valid readings, as opposed to the 120 readings the naive algorithm would generate, and this Copyright1987 by the Association for Computational Linguistics. Permission to copy without fee all or part of this material is granted provided that the copies are not made for direct commercial advantage and the CL reference and this copyright notice are included on the first page. To.copy otherwisc, or to republish, requires a fee and/or specific permission. 0362-613X/87/010047-63503.00 Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987 47 Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings constitutes a significant difference indeed. The recent trend in computational linguistics has been to view more and more noun phrases, as well as other constituents, as introducing quantifiers, so that sentences with this much quantificational complexity are not at all unusual. (The immediately preceding sentence, for example, has six or seven quantifiers.) This observation of &amp;quot;illegitimate readings&amp;quot; is not intended as a new or controversial claim about an idiosyncrasy of English. It accords well with semantic judgments about the possibility of such readings. For instance, we find it impossible to view sentence (1) as expressing that for each representative there was a group of most samples which he saw, and furthermore, for each sample he saw, there was a company he was a representative of.</Paragraph>
    <Paragraph position="4"> We can find the same problem of illegitimate readings in the standard account of the &amp;quot;Cooper storage&amp;quot; mechanism for generating quantifier scopings (Cooper 1983). Cooper's method generates an expression in intensional logic for the illegitimate readings, but the expression contains an unbound variable and a vacuous quantifier. 1 Finally, the observation follows merely syntactically from the ill-formedness of certain logical form expressions. Let us examine why this is so. The propositional content of a sentence can be seen as combining specifications that restrict the range of quantified entities, together with assertions about the entities so specified.</Paragraph>
    <Paragraph position="5"> This intuition is often made formal in the use of logical languages that syntactically separate the notion of the range of a quantified expression from its scope by placing the information about the range in a part of the expression we call the restriction and the assertions in a part called the body. (Henceforth, we will uniformly use the terms restriction and body.) The separation of these two semantic roles of range and scope into restriction and body as an important fact of the logical structure of English can be seen, for example, in Woods's four-part quantifier structures (Woods 1977), in the recommendations of Moore (1981), and in the generalized quantifier research of Barwise and Cooper and others. The latter have demonstrated the necessity of such a separation for quantifiers other than the standard first-order ones (Barwise and Cooper, 1981 ; Cushing, 1976).</Paragraph>
    <Paragraph position="6"> But under this understanding of English logical structure, it follows that no sixth reading exists for sentence (1) above. Consider the reading in which the universal outscopes the most which outscopes the existential in the logical form for this sentence. Then, using the notation of Moore (1981) for four-part quantifier structures, the logical form must have the following structure: all(r, representative(r) ....... ) since the universal is outermost. Now the existential is within the scope of the universal by hypothesis, and since it provides a restriction on the range of the variable r, it must occur in the restriction of the quantifier. Thus, we have: all(r, representative(r) &amp; some(c, company(c), of(c,r)) .... saw(r,s)...) But where can the quantifier most be put to bind the variable s corresponding to the samples seen? It must outscope its occurrence in the body of the universal, but it must also by hypothesis outscope the existential in the restriction of the universal. To outscope both, it must outscope the universal itself, but this violates the assumed scope relations. Thus, no such reading is possible. By a similar argument, it follows from the logical structure of English that in general a quantifier from elsewhere in a sentence cannot come after the quantifier associated with a head noun and before the quantifier associated with a noun phrase in the head noun's complement. null Most research in linguistic semantics, e.g., Montague (1973) and Cooper (1983), has concentrated on explicitly defining the range of possible scope relationships that can be manifested in sentences. But, to our knowledge, all fall prey to the profligacy of generation just outlined.</Paragraph>
  </Section>
  <Section position="5" start_page="0" end_page="0" type="metho">
    <SectionTitle>
1.2 OTHER ISSUES IN QUANTIFIER SCOPING
1.2.1 OTHER SPURIOUS SCOPINGS
</SectionTitle>
    <Paragraph position="0"> We are concerned here only with suppressing readings that are spurious for purely structural reasons, that is, for reasons that follow from the general relationship between the structure of sentences and the structure of their logical forms and independent of the meanings of the particular sentences. For instance, we are not concerned with logical redundancies, such as those due to the commutativity of successive universal quantifiers. When we move beyond the two first-order logical quantifiers to deal with the so-called generalized quantifiers such as most, these logical redundancies become quite rare. Similarly, we are not concerned with the infelicity of certain readings due to lexical semantic or world knowledge, such as the fact that a child cannot outscope every man in the sentence I've met a child of every man in this room.</Paragraph>
  </Section>
  <Section position="6" start_page="0" end_page="0" type="metho">
    <SectionTitle>
1.2.2 HEURISTICALLY PRIMARY SCOPINGS
</SectionTitle>
    <Paragraph position="0"> Computational research on quantifier scoping has emphasized generating a single scoping, which can be thought of as heuristically primary, as discussed by, for example, Woods (1977), Pereira (1983), and Grosz et al.</Paragraph>
    <Paragraph position="1"> (1985). We are concerned not with generating the best reading but with generating all readings. The reader may object that it is inappropriate in a practical natural language system to generate scopings one by one for testing against semantic and pragmatic criteria. Instead, one should appeal to various heuristics to generate only the most likely reading, or at least to generate readings in order of their plausibility. These include the following: * lexical heuristics, e.g., each usually outscopes some; * syntactic heuristics, e.g., a noun phrase in a relative clause is usually outscoped by the head noun, and a noun phrase in a prepositional phrase complement of a</Paragraph>
  </Section>
  <Section position="7" start_page="0" end_page="0" type="metho">
    <SectionTitle>
48 Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987
</SectionTitle>
    <Paragraph position="0"> Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings relational head noun usually outscopes the head noun; and * ordering heuristics, such as the principle that left-to-right order at the same syntactic level is generally preserved in the quantifier order. 2 We are sympathetic with this view. Nevertheless, there are several reasons that codifying a complete algorithm remains useful. First, a complete and sound algorithm provides a benchmark against which other approaches can be tested. Second, one may actually wish to use a generate-and-test mechanism in simpler implementations, and it should be correct and as efficient as possible. It should not generate scopings that can be ruled out on purely structural grounds. Finally, the algorithm we present might be modified to incorporate heuristics to generate scopings in a certain order or only certain of the scopings. The soundness and correctness of the underlying algorithm, provide a guarantee of soundness for a heuristically guided version. We include a few comments below about incorporating ordering heuristics into our scoping generation algorithm, although we should point out that the possibilities are somewhat limited due to the local nature of where the heuristics can be applied. A full discussion of heuristically-guided scoping generation is, of course, beyond the scope of this paper.</Paragraph>
  </Section>
  <Section position="8" start_page="0" end_page="0" type="metho">
    <SectionTitle>
1.2.3 SCOPE OF OPAQUE PREDICATES
</SectionTitle>
    <Paragraph position="0"> In addition to handling the scoping of quantifiers relative to each other, the algorithm we present also allows quantifiers to be scoped within or outside of opaque arguments of higher-order predicates. For instance, the algorithm generates two readings for the sentence Everyone isn't here.</Paragraph>
    <Paragraph position="1"> corresponding to the two relative scopings of the universal quantifier and the negation.</Paragraph>
  </Section>
  <Section position="9" start_page="0" end_page="0" type="metho">
    <SectionTitle>
2 THE ALGORITHM
</SectionTitle>
    <Paragraph position="0"> In the discussion below, we assume that parsing has made explicit the predicate-argument relations and the relations of grammatical subordination in the form of a logical encoding in an input language. A well-formed formula (wff) in the input language is a predicate or other operator applied to one or more arguments. An argument can be a constant or variable, another wff, or what we will call a complex term. A complex term is an ordered triple consisting of a quantifier, a variable, and a wff (called the restriction), which represents the predication that is grammatically subordinated to the variable. The input representation for sentence (2) is, then, the following (ignoring tense):</Paragraph>
    <Paragraph position="2"> A complex term can be read &amp;quot;quantifier variable such that restriction&amp;quot;, e.g., &amp;quot;most c such that c is a company&amp;quot;. The output language is identical to the input language, except that it does not contain complex terms. Quantifiers are expressed in the output language as operators that take three arguments: the variable bound by the quantifier, a wff restricting the range of the quantified variable, and the body scoped by the quantification, schematically quantifier(variable, restriction, body) This encoding of quantification is the same as that found in Woods (1977) and Moore (1981). We will refer to such expressions as quantified wffs. Thus, one reading for sentence (2) is represented by the following quantified wff: some(r, and(rep(r), every(d, and(dept(d), most(c, co(c), in(d, c))), of(r, d))), a-few(s, and(samp(s), each(p, prod(p), of(s, p))), see(r, s))) Intermediate structures built during the course of scoping include both complex terms and quantified wffs. We use the term full seoping for an expression in the output language, i.e., one that has no complex terms. We also will use the terms bound and free as follows: An expression binds a variable v if the expression is of the form &lt; q v r &gt; or q(v, r,s) where q is a quantifier. The variable v is said to be bound in the expressions r, or r and s, respectively. A variable v is unbound or free in an expression a if there is an occurrence of v in a that is not also an occurrence in a subexpression of a binding v. Note that here quantified wffs and complex terms are both thought of as expressions binding a variable.</Paragraph>
    <Section position="1" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
2.1 SUMMARY OF THE ALGORITHM
</SectionTitle>
      <Paragraph position="0"> We present both nondeterministic and deterministic versions of the algorithm 3 in an ALGOL-like language.</Paragraph>
      <Paragraph position="1"> Both algorithms, however, have the same underlying structure, based on the primitive operation of &amp;quot;applying&amp;quot; a complex term to a wff in which it occurs: a complex term in a wff is replaced by the variable it restricts, and that variable is then bound by wrapping the entire form in the appropriate quantifier. Thus, applying the term &lt; q x r(x) &gt; to a wff containing that complex term, say, p( &lt; q x r(x) &gt; ), yields the quantified wff Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987 49 Jerry R. Hobbs and Sluart M. Shieber An Algorithm for Generating Quantifier Scopings q(x, r(x),p(x)). This is the primitive operation by which complex terms are removed from a wff and quantified wffs are introduced. It is implemented by the function apply.</Paragraph>
      <Paragraph position="2"> The generation of a scoping from a wff proceeds in two stages. First, the opaque argument positions within the wff are scoped. The function pull-opaque-args performs this task by replacing wffs in opaque argument positions by a (full or partial) scoping of the original wff. For instance, if p were a predicate opaque in its only argument, then, for the wff p(s(&lt;qxr(x) &gt; )), pull-opaque-args would generate the wff p(q(x, r(x), s(x))) or the unchanged wff p(s( &lt; qx r(x) &gt; )). In the former, the opaque predicate p outscopes the quantifier q. In the latter, the quantifier q has not been applied yet and the wff will subsequently yield readings in which q has wider scope than p.</Paragraph>
      <Paragraph position="3"> Second, some or all of the remaining terms are applied to the entire wff. The function apply-terms iteratively (through a tail recursion) chooses a complex term in the wff and applies it. Thus apply-terms acting upon the wff</Paragraph>
      <Paragraph position="5"> q2(y, r2(Y), ql(x, rl(x), p(x, y))) ql(x, rl(x), q2(v, r2(Y), p(x, y))) depending on how many quantifiers are applied and in what order. The choice of a complex term is restricted to a subset of the terms in the wff, the so-called applicable terms. The principal restriction on applicable terms is that they not be embedded in any other complex term in the wff. Section 4.1 discusses a further restriction. The function applicable-term returns an applicable term in a given wff.</Paragraph>
      <Paragraph position="6"> These two stages are manifested in the function pull which generates all partial or full scopings of a wff by invoking pull-opaque-args and apply-terms. Since ultimately only full scopings are desired, an additional argument to pull and apply-terms controls whether partial scopings are to be returned. When this flag, completeL is true, apply-terms, and hence pull will return only expressions in which no more complex terms remain to be applied, for example, only the last two of the five readings above.</Paragraph>
      <Paragraph position="7"> Finally, the restrictions of the complex terms may themselves contain complex terms and must be scoped themselves. The apply function therefore recursively generates the scopings for the restriction by calling pull on that restriction, and a quantified wff is generated for each possible partial or complete scoping of the restriction. Schematically, in the simplest case, for the expression p( &lt; ql x rl(x, &lt; q2y r2fy) &gt; ) and its complex term &lt; ql -.. &gt; ,4 apply generates the complete scoping ql(x, q2(Y, r2(Y), rl(x,y)), p(x)) (having called apply recursively on &lt; q2 ... &gt; ), and the partial scoping ql(x, rl(x , &lt; q2Yr20,) &gt; ), p(x)) A subsequent application of the remaining complex term will yield .the &amp;quot;wide scope&amp;quot; reading q2(.v, r2(Y), ql (x, rl (xy), P(X) ) The disallowed readings produced by the &amp;quot;all permutations&amp;quot; algorithm are never produced by this algorithm, because it is everywhere sensitive to the four-part quantifier structure of the target logical form.</Paragraph>
      <Paragraph position="8"> The difference between the nondeterministic and deterministic versions lies only in their implementation of the choice of terms and returning of values. This is done either nondeterministically, or by iterating through and returning explicit sets of possibilities. A nondeterministic Prolog version and a deterministic COMMON LISP version of the algorithm are given in Appendices A and B. The full text of these versions (including auxiliary functions not listed here) is available from the authors. A variant of the COMMON LISP version is currently being used at SRI International to generate scopings in the KLAUS system.</Paragraph>
    </Section>
    <Section position="2" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
2.2 LANGUAGE CONSTRUCTS
</SectionTitle>
      <Paragraph position="0"> In the specifications below, the let construct implements local variable assignment. All assignments are done sequentially, not in parallel. The syntax is let (assignments) in (body) The entire expression returns what the body returns. Destructuring by pattern matching is allowed in the assignments; for example, let &lt;quant var restrict&gt; := term in (body) simultaneously binds quant, var, and restrict to the three corresponding components in term. The symbol &amp;quot;:=&amp;quot; is used for assignment, lambda is an anonymous-functionforming operator. Its syntax is lambda((variable)).</Paragraph>
      <Paragraph position="1"> (body) where (variable) is free in (body). We assume lexical scoping in lambda expressions. The statement &amp;quot;return value&amp;quot; returns a value from a function. The binary function map (similar to LISP's mapcar) applies its second argument (a lambda expression) to each of the elements of its first argument (a list). It returns a corresponding list of the values of the individual applications. The function integers(lower, upper) returns a list of the integers in</Paragraph>
    </Section>
  </Section>
  <Section position="10" start_page="0" end_page="0" type="metho">
    <SectionTitle>
50 Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987
</SectionTitle>
    <Paragraph position="0"> Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings the range lower to upper, inclusive and in order (corresponding to APL's iota). The function length(list) is obvious. The expression list!n! returns the nth element of the list list. The function subst(x,y, expr) substitutes x for all occurrences of y in expr.</Paragraph>
    <Paragraph position="1"> The unary function predicate(wff) returns the main predicate in a wff. The unary function arguments(wff) returns a list of the arguments in a wff. Applied to two arguments, wff is a binary function that takes a predicate name and a list of arguments, and returns the wff consisting of the application of the predicate to the arguments. Applied to four arguments, wff is a quaternary function that takes a quantifier name, a variable name, a restriction, and a body, and returns the quantified wff consisting of the binding of the variable by the quantifier in the restriction and body. The binary predicate opaque(predicate, n) returns true if and only if the predicate is opaque in its nth argument. It is naturally assumed that opaque argument positions are filled by wff expressions, not terms. Each of the unary predicates wff?, term?, and quantifier? returns true if and only if its argument is a wff, a complex term, or a quantifier operator, respectively.</Paragraph>
    <Section position="1" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
2.3 THE NONDETERMINISTIC ALGORITHM
</SectionTitle>
      <Paragraph position="0"> In the nondeterministic version of the algorithm, there are three special language constructs. The unary predicate exists(expression) evaluates its argument nondeterministically to a value and returns true if and only if there exist one or more values for the expression. The binary operator &amp;quot;a 1\[ b&amp;quot; nondeterministically returns one of its arguments (a or b). The function term(form) nondeterministically returns a complex term in form. Finally, the function applicable-term(form) nondeterministically returns a complex term in form that can be applied to form.</Paragraph>
      <Paragraph position="1"> The nondeterministic version of the algorithm is as follows. The function gen(form) nondeterministically returns a valid full scoping of the formula form.</Paragraph>
      <Paragraph position="2"> function gen (form); return pull(form, true).</Paragraph>
      <Paragraph position="3"> The function pull(form, complete?) nondeterministically returns a valid'scoping of the formula form. If complete? is true, then only full scopings are returned; otherwise, partial scopings arc allowed as well.</Paragraph>
      <Paragraph position="4"> function pull(form, complete?); return apply-terms(pull-opaque-args(f orm ), complete?).</Paragraph>
      <Paragraph position="5"> The function pull-opaque-args(form), when applied to a wff, returns a wff generated from form but with arguments in opaque argument positions replaced by a valid scoping of the original value. Since the recursive call to pull has complete? set to false, the unchanged argument is a nondeterministic possibility, even for opaque argument positions. When applied to any other type of expression (i.e., a term of some sort), form is unchanged.</Paragraph>
      <Paragraph position="6"> function pull-opaque-args(f orm ) ; if not (wff?(form) ) then return form</Paragraph>
      <Paragraph position="8"> The function apply-terms(form, complete?) chooses several terms in form nondeterministically and applies them to form. If complete? is true, then only full scopings are returned.</Paragraph>
      <Paragraph position="9"> function apply-terms(form, complete?); if not(exists(term(form)))  The function apply(term, form) returns a wff consisting of the given complex term term applied to a form form in which it occurs. In addition, the restriction of the complex term is recursively scoped.</Paragraph>
      <Paragraph position="10"> function apply(term,form); let &lt;quant var restrict&gt; := term return wff(quant, var, pull(restrict,false), subst ( var, term,form)).</Paragraph>
    </Section>
  </Section>
  <Section position="11" start_page="0" end_page="0" type="metho">
    <SectionTitle>
2.4 THE DETERMINISTIC ALGORITHM
</SectionTitle>
    <Paragraph position="0"> For the deterministic version of the algorithm, there are five special language constructs. The unary predicate empty(set) returns true if and only if set is empty. Paired braces &amp;quot;{ ... }&amp;quot; constitute a set-forming operator. The binary function union applies its second argument (a lambda expression) to each of the elements of its first argument (a set). It returns a corresponding set of the values of the individual applications. The binary infix operator U returns the union of its two arguments (both sets). The function cross-product takes a list of sets as its argument and returns the set of lists corresponding to each way of taking an element from each of the sets in order. For example,</Paragraph>
    <Paragraph position="2"> The function terms(form) returns the set of all complex terms in form. The function applicable-terms(form) returns the set of all complex terms in form that can be applied to form.</Paragraph>
    <Paragraph position="3"> The deterministic version of the algorithm is identical in structure to the nondeterministic version. Each function operates in the same way as its nondeterministic counterpart, except that they uniformly return sets rather than nondeterministically returning single values.</Paragraph>
    <Paragraph position="4"> The algorithm is as follows. The function gen(form) returns a set of all valid full scopings of the formula form. function gen (form); return pull(form, true).</Paragraph>
    <Paragraph position="5"> The function pull returns a set of all valid scopings of the formula form. If complete? is true, only full scopings are returned; otherwise, partial scopings are allowed as well. function pull(form, complete?); return union(pull-opaque-args(form), iambda(pulled-opaque ).</Paragraph>
    <Paragraph position="6"> apply-terms( pulled-opaque, complete?)).</Paragraph>
    <Paragraph position="7"> The function pull-opaque-args(form) returns a set of all wffs generated from form, but with arguments in opaque argument positions replaced by a valid scoping of the original value. Since the recursive call to pull has complete? set to false, the unchanged argument is a possibility even for opaque argument positions. When applied to any other type of expression (i.e., a term of some sort), the argument is unchanged.</Paragraph>
    <Paragraph position="8"> function pu ll-opaque-args (form)</Paragraph>
    <Paragraph position="10"> The function apply-terms(form, complete?) returns a set of scopings of form constituting all of the ways of choosing several terms in form and applying them to form. If complete? is true, then only the full scopings are returned.</Paragraph>
    <Paragraph position="11">  The function apply(term, form) returns a set of all wffs consisting of the given complex term term applied to the form .form in which it occurs, with the restriction of the complex term recursively scoped in all possible ways.</Paragraph>
    <Paragraph position="12"> function apply(term,form); let (quant var restrict) := term  be useful to work through the deterministic version for a detailed example.</Paragraph>
    <Paragraph position="13"> (5) Some representative of every department in most  companies saw a few samples.</Paragraph>
    <Paragraph position="14"> The predicate-argument structure of this sentence may be represented as follows:</Paragraph>
    <Paragraph position="16"> Suppose gen is called with expression (6) as form. Since this is the representation of the whole sentence, pull will be called with complete? equal to true. The call to pull-opaque-args will return the original wff unchanged since there are no opaque operators in the wff. We therefore call apply-terms on the wff.</Paragraph>
    <Paragraph position="17"> In apply-terms, the call to applicable-terms returns a list of all of the unnested complex terms. For (6), there will be two:  The function apply is called for each of these complex terms, and inside apply there is a recursive call to pull on the restriction of the complex term. This generates all the possible scopings for the restriction. When apply is called with (6) as form and (7) as term, the result of seoping the restriction of (7) will be the following four wffs:</Paragraph>
    <Paragraph position="19"> Because this call to pull has complete? equal to false, the unprocessed restriction itself, wff (9), as well as the partially scoped wff (10), is returned along with the fully scoped forms of the restriction. Wff (9) will ultimately generate the two readings in which variables d and c outscope r. Wff (10) is also partial as it still contains a complex term. It will ultimately yield a reading in which r outscopes d but is outscoped by c; the complex term for c is still&amp;quot; available for an application that will give it wide Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987 53 Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings scope. Wffs (11) and (12) will ultimately yield readings in which d and c are outscoped by r.</Paragraph>
    <Paragraph position="20"> Each of these wffs becomes the restriction in a quantified wff constructed by apply. Thus, from restriction  (10), apply will construct the quantified wff (13) some(r, every(d, and(dept(d), in(d, &lt;most e co(c)&gt;)), and(rep(r), of(r, d))), see(r, &lt;a-few s samp(s)&gt;))  In apply-terms, the tail recursion turns the remaining complex terms into quantifiers with wide scope. Thus, in (13) c and s will be given wider scope than r and d. For example, one of the readings generated from wff (13) will be most(c, co(c), a-few(s, samp(s), some(r, every(d, and(dept(d), in(d, c)), and(rep(r), of(r, d))), see(r, s)))) Sentence (5), by the way, has 14 different readings. As an example of the operation of the algorithm on a wff with opaque operators, we consider the sentence Everyone isn't here.</Paragraph>
    <Paragraph position="21"> This has the predicate-argument structure not(here(&lt;every x person(x)&gt;)) where not is an operator opaque in its only argument. The call to pull-opaque-args returns the two scopings not(here(&lt;every x person(x)&gt;)) not(every(x,person(x),here(x))) The call to apply-terms then turns the first of these into every(x,person(x),not(here(x))) Thus, the following two full scopings are generated:</Paragraph>
    <Paragraph position="23"> Note that because of the recursive call in pull-opaque-args these two readings will be generated even if this form is embedded within other transparent predicates.</Paragraph>
  </Section>
  <Section position="12" start_page="0" end_page="0" type="metho">
    <SectionTitle>
4 MODIFICATIONS AND EXTENSIONS
4.1 RESTRICTING APPLICABLE TERMS
</SectionTitle>
    <Paragraph position="0"> The notion of applicable term used above was quite simple. A complex term was applicable to a wff if it was embedded in no other complex term within the wff. The restriction is motivated by the following consideration.</Paragraph>
    <Paragraph position="1"> Suppose the input wff is p( &lt;qlxq(x, &lt;qyyry(y)&gt; )&gt; ) If the embedded term were first applied, yielding</Paragraph>
    <Paragraph position="3"> the remaining complex term would include a free occurfence of y so that when it is later applied, resulting in the formula ql (x, r I (xo,), qz (,Y, rz (Y), p(x))) the variable y occurs free in the restriction of q/* Thus, it is critical that a term never be applied to a form when a variable that is free in the term is bound outside of it in the form. The simple definition of applicability goes part of the way towards enforcing this requirement.</Paragraph>
    <Paragraph position="4"> Unfortunately, this simple definition of applicability is inadequate. If x had itself been free in the embedded complex term, as in the wff P( &lt; ql x r I (x, &lt; qz y rz (x, y) &gt; ) &gt;) the application of the outer term followed by the inner term would still leave an unbound variable, namely x. This is because the inner term, which uses x, has been applied outside the scope of the binder for x. Such structures can occur, for instance, in sentences like the following, where an embedded noun phrase requires reference to its embedding noun phrase. 5 Every man that I know a child of has arrived.</Paragraph>
    <Paragraph position="5"> Every man with a picture of himself has arrived.</Paragraph>
    <Paragraph position="6"> In these two sentences the quantifier a cannot outscope every because the noun phrase beginning with a embeds a reference to every man. If a were to outscope every, then himself or the trace following child of would be outside the scope of every man.</Paragraph>
    <Paragraph position="7"> The definition of applicable term must be modified as follows. A term in a wff is applicable to the wff if and only if all variable occurrences that are free in the term are free in the wff as well. Our previous definition of applicability, that the term be unembedded in another term in the wff, is a simple consequence of this restriction. The versions of the algorithm given in Appendices A and B define the functions applicable-term and applicable-terms in this way. Given this definition, the algorithm can be shown never to generate unbound variables. (See Appendix C.)</Paragraph>
    <Section position="1" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
4.2 ADDING ORDERING tlEURISTICS
</SectionTitle>
      <Paragraph position="0"> A full discussion of heuristic rules for guiding generation of quantifier scopings is outside of the aims of this paper.</Paragraph>
      <Paragraph position="1"> However, certain ordering heuristics can be incorporated relatively easily into the algorithm merely by controlling the way in which nondeterministic choices are made. We discuss a few examples here, merely to give the flavor for how such heuristics might be added.</Paragraph>
      <Paragraph position="2"> For instance, suppose we want to favor the original left-to-right order in the sentence. The function applicable-terms should return the complex terms in right-to-left order, since quantifiers are extracted from the inside out.</Paragraph>
      <Paragraph position="3"> The union in line (3) should return form after scopedforms. null if we want to give a noun phrase wide scope when it occurs as a prepositional phrase noun complement to a function word, e.g., every side of a triangle, then form should come before scoped-form in line (3) when pull has been called from line (4) in apply where the first argu-</Paragraph>
    </Section>
  </Section>
  <Section position="13" start_page="0" end_page="0" type="metho">
    <SectionTitle>
54 Computational Linguistics, Volume 13, Numbers i-2, January-June 1987
</SectionTitle>
    <Paragraph position="0"> Jerry'R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings ment to apply is a complex term for a noun phrase satisfying those conditions, e.g., the complex term for every side of a triangle.</Paragraph>
    <Paragraph position="1"> The modifications turn out to be quite complicated if we wish to order quantifiers according to lexical heuristics, such as having each outscope some. Because of the recursive nature of the algorithm, there are limits to the amount of ordering that can be done in this manner. At the most, we can sometimes guarantee that the best scoping comes first. Of course, one can always associate a score with each reading as it is being generated and sort the list afterwards.</Paragraph>
    <Section position="1" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
4.3 NONSTANDARD INPUT STRUCTURES
</SectionTitle>
      <Paragraph position="0"> The algorithm as presented will operate correctly only for input structures that are themselves well-formed. For instance, they must contain no unbound variables.</Paragraph>
      <Paragraph position="1"> Certain natural language phenomena, such as the so-called donkey sentences, exhibit structures that are ill-formed with respect to the assumptions made by this algorithm. For instance, the sentence Every man who owns a donkey beats it.</Paragraph>
      <Paragraph position="2"> has an ill-formed input structure because the pronoun has to reach inside the scope of an existential quantifier for its antecedent. Its predicate-argument structure might be something like beat(&lt;every m and(man(m), own(m, &lt;some d donkey(d)&gt;))&gt;, d) An alternative is to leave the pronoun unanalyzed, in which case the closest reading produced by the algorithm is every(m, and(man(m), some(d, and(donkey(d), own(m, d)))), the(x, it(x), beat(m, x))) In fact, this is not bad if we take it(x) to mean that x is nonhuman and that x is mentioned in the prior discourse in a position determined by whatever coreference resolution process is used. There is a problem if we take the quantifier the to mean that there is a unique such x and take the sentence to mean that a man who owns many donkeys will beat every donkey he owns. But we can get around this if, following the approach taken by Hobbs (1983), we take a donkey to be generic, take it to refer to the unique generic donkey that m owns, and assume that to beat a generic donkey is to beat all its instances. In any case, modifications to the algorithm would be needed to handle such anaphora phenomena in all their complexity.</Paragraph>
    </Section>
  </Section>
  <Section position="14" start_page="0" end_page="0" type="metho">
    <SectionTitle>
5 CONCLUSION
</SectionTitle>
    <Paragraph position="0"> We have presented an algorithm for generating exactly those quantifier scopings that are consistent with the logical structure of English. While this algorithm can sometimes result in a significant savings over the naive approach, it by no means solves the entire quantifier scoping problem, as we have already pointed out. There has already been much research on the problem of choosing the preferred reading among these allowable ones, but the methods that have been suggested need to be specified in an implementation-free fashion more precisely than they have been previously, and they need to be evaluated rigorously on large bodies of naturalistic data. More important, methods need to be developed for using pragmatic considerations and world knowledge particularly reasoning about quantities and dependencies among entities - to resolve quantifier scope ambiguities, and these methods need to be integrated smoothly with the other kinds of syntactic, semantic, and pragmatic processing required in the interpretation of natural language texts.</Paragraph>
  </Section>
  <Section position="15" start_page="0" end_page="0" type="metho">
    <SectionTitle>
ACKNOWLEDGMENTS
</SectionTitle>
    <Paragraph position="0"> We have profited from discussions about this work with Paul Martin and Fernando Pereira, and from the comments of the anonymous reviewers of the paper.</Paragraph>
    <Paragraph position="1"> This research was supported by NIH Grant LM03611 from the National Library of Medicine, by Grant IST-8209346 from the National Science Foundation, and by a gift from the System Development Foundation.</Paragraph>
    <Paragraph position="2"> Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987 55 Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings</Paragraph>
  </Section>
  <Section position="16" start_page="0" end_page="0" type="metho">
    <SectionTitle>
APPENDIX A. PROLOG IMPLEMENTATION OF THE ALGORITHM
</SectionTitle>
    <Paragraph position="0"> The following is the core of a Prolog implementation of the nondeterministic algorithm which includes all but the lowest level of routines. The syntax is that of Edinburgh Prologs, e.g., DEC-20 Prolog.</Paragraph>
    <Paragraph position="1"> Prolog Implementation of Scope Generation Algorithm / ............................................................................</Paragraph>
    <Paragraph position="2"> Representation of wffs: A wff of the form 'p(argl,...,argn)' is represented as the Prolog term wff(p,\[arg1', .... argn'\]) where argi' is the encoding of the subexpression argi.</Paragraph>
    <Paragraph position="3"> A constant term is represented by the homonymous Prolog constant.</Paragraph>
    <Paragraph position="4"> A complex term is represented by the Prolog term term(quant,var,restrict') where restrict' is the encoding of the wff that forms the restriction of the quantifier.</Paragraph>
    <Paragraph position="5">  ==&gt; a wff with in-place complex terms ==&gt; true iff only full scopings are allowed &lt;== a full or partial scoping of Form Applies terms at various level of embedding in Form, including applying to the entire Form, and to opaque argument positions inside Form.</Paragraph>
    <Paragraph position="6"> pull(Form, Complete, ScopedForm) -pull_opaque_args(Form, PulledOpaque), apply terms(PulledOpaque, Complete, ScopedForm).</Paragraph>
    <Paragraph position="7">  applicable term(Body,Term,\[VarlBVs\])).</Paragraph>
    <Paragraph position="8"> Z An applicable term of an argument list is an applicable term of the wff. applicable_term(wff( Pred,Args),Term, BVs) -applicable term(Args, Term, BVs).</Paragraph>
    <Paragraph position="9"> Z An applicable term of any argument is an applicable term of the whole % list.</Paragraph>
    <Paragraph position="10">  applicable term(\[FIR\],Term, BVs) -applicable term(F,Term,BVs) ; applicable term(R,Term,BVs).</Paragraph>
    <Paragraph position="11"> Z Note the absence of a rule looking for applicable terms inside of complex terms. This limits applicable terms to be top-level. APPENDIX B. COMMON LISP IMPLEMENTATION OF THE ALGORITHM The following is the core of a COMMON LISP implementation of the deterministic algorithm which includes all but the lowest level of routines.</Paragraph>
    <Paragraph position="12">  ; ; ;,~***~,~,~*****~,~*******~*****~***~**~*************~**~***~*~*~**e ;;; ;;; COMMON LISP Implementation of Scope Generation Algorithm ;;; ****************************************************************************** ;;; ;;; Representation of Wffs ;;; ;;; A wff of the form 'p(argl,...,argn)' is represented as the ;;; s-expression (p arg1' .. argn') where argi' is the encoding of the ;;; subexpression argi.</Paragraph>
    <Paragraph position="13"> ;;; ;;; A constant term is represented by the homonymous LISP atom. ;;; ;;; A complex term is represented by the s-expression (:term quant ;;; var restrict') where restrict' is the encoding of the wff that forms ;;; the restriction of the quantifier.</Paragraph>
    <Paragraph position="14"> ;;; 58 Computational Linguistics, Volume 13, Numbers 1-2, January-June 1987 Jerry R. Hobbs and Stuart M. Shieber An Algorithm for Generating Quantifier Scopings ;;; Implementation notes: ;;; ;;; The following simple utility functions are assumed: ;;; ;;; map-union -- implements the binary function UNION ;;; cross-product -- implements the function CROSS-PRODUCT ;;; opaque -- implements the binary function OPAQUE ;;; integers -- implements the binary function INTEGERS ;;; ;;; The infix union is implemented with CL function UNION. ;;; The binary prefix union is implemented under the name MAP-UNION ;;; to avoid conflict with the CL function UNION. ;;; The function APPLY is implemented under the name APPLY-Q to avoid ;;; conflict with the CL function APPLY.</Paragraph>
  </Section>
  <Section position="17" start_page="0" end_page="0" type="metho">
    <SectionTitle>
APPENDIX C. PROOFS OF ALGORITHM PROPERTIES
</SectionTitle>
    <Paragraph position="0"> This appendix includes informal proofs of some important properties of the nondeterminisitc version of the presented algorithm. First, we present a proof of the termination of the algorithm. Several criteria of the partial correctness of the algorithm are also informally shown, especially, that the algorithm does not generate wffs with unbound variables.</Paragraph>
    <Paragraph position="1"> However, we do not prove correctness in the sense of showing that the algorithm is semantically sound, i.e., that it.yields wffs with interpretations consistent with the interpretation of the input expression, simply because we do not provide a semantics for the input language. (The output language, of course, has a standard logical semantics.) null We do not attempt to prove completeness for the algorithm, as the concept of completeness is open to interpretation, depending as it does on just which scopings one deems possible, but we expect that the algorithm is complete in the sense that every permutation of quantifiers respecting the considerations in the introduction is generated. We also do not prove the nonredundancy of the nondeterminism in the algorithm, i.e., that the algorithm will not generate the same result along different nondeterministic paths, although we believe that the algorithm is nonredundant.</Paragraph>
    <Paragraph position="2"> C.l NOTATION We will use lower Greek letters (a, /3 .... ) as variables ranging over expressions in the logical form language.</Paragraph>
    <Paragraph position="3"> We inductively define a metric p on expressions in the logical form language as follows:</Paragraph>
    <Paragraph position="5"> Informally, p is a measure of the embedding depth of the complex terms in an expression.</Paragraph>
  </Section>
class="xml-element"></Paper>
Download Original XML