File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/88/c88-2128_metho.xml

Size: 30,792 bytes

Last Modified: 2025-10-06 14:12:12

<?xml version="1.0" standalone="yes"?>
<Paper uid="C88-2128">
  <Title>A Uniform Architecture for Parsing and Generation</Title>
  <Section position="4" start_page="0" end_page="0" type="metho">
    <SectionTitle>
2 Language Processing as Deduction
</SectionTitle>
    <Paragraph position="0"> Viewed intuitively, natural-language-utterance generation is a nondeterministic top-down process of building a phrase that conforms to certain given criteria, e.g., that the phrase be a sentence and that it convey a particular meaning. Parsing, on the other hand, is usually thought of as proceeding bottom-up in an effort to determine what properties hold of a given expression. As we have mentioned, however, both of these processes can be seen as variants of a single method for extracting certain goal theorems from the deductive closure of some given premises under the rules or constraints of the grammar. The various processes differ as to what the premises are and which goal theorems are of interest. In generation~ for instance, the premises are the lexical items of the language and goal theorems are of the form &amp;quot;expression a is a sentence with meaning M&amp;quot; for some given M. In parsing, the premises are the words a of the sentence to be parsed and goal theorems are of the form &amp;quot;expression a is a sentence (with properties P)&amp;quot;. In this case, a is given a priori.</Paragraph>
    <Paragraph position="1"> This deductive view of language processing clearly presupposes an axiomatic approach to language description. Fortunately , most current linguistic theory approaches the problem of linguistic description axiomatically, and many current formalisms in use in natural-language processing, especially the logic grammar and unification-based formalisms follow this approach as well. Consequently, the results presented here will, for the most part, be applicable to any of these formalisms. We will, however, describe the system schematically-without relying on any of the particular formalisms, but using notation that schematizes an augmented context-free formalism like definite-clause grammars or PATR. We merely assume that grammars classify phrases under a possibly infinite set of structured objects, as is common in the unification-based formalisms. These structures--terms in definite-clause grammars, directed graphs in PATt~, and so forth--will be referred to generically as nonterminais, since they play the role in the augmented context-free formalisms that the atomic nonterminal symbols fulfill in standard context-free grammars. We will assume that the notion of a unifier of such objects and most general unifier (mgu) are well defined; the symbol 0 will be used for unifiers.</Paragraph>
    <Paragraph position="2"> Following Pereira and Warren, the lemmas we will be proving from a grammar and a set of premises will include the same kind of conditional information encoded by the items of Earley's parsing algorithm. In Earley's algorithm, the existence of an item (or dotted rule) of the form in state set j &gt; i makes a claim that, for some string position k &gt; j, the substring between i and k can be classified as an N if the substr!ng between j and k can be decomposed into a sequence of strings classified, respectively, under Vm,..., V~. We will use a notation reminiscent of Pereira and Warren's t to emphasize the conditional nature of the claim and its independence from V1,..., V,n-1, namely, \[i,N *-- V,~.. 'Vn,j\]</Paragraph>
    <Section position="1" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
2.1 Terminology
</SectionTitle>
      <Paragraph position="0"> We digress here to introduce some terminology. If n = 0, then we will leave off the arrow; \[i, N,j\] then expresses the fact that a constituent admitted as a nonterminal N occurs between positions i and j. Such items will be referred to as nonconditional items; if n &gt; 0, the item will be considered conditional. In the grammars we are interested in~ rules will include either all nonterminals on the right-hand side or a~I terminals. We can think of the former as grammar rules proper, the XLater, in the sections containing examples of the architecture's operation, we will reintroduce V1,..., Vm-1 and the dot marker to aid readability.</Paragraph>
      <Paragraph position="1">  latter as lexical entries. Nonconditional items formed by immediate inference from a lexieal entry will be called lexical items. For instance, if there is a grammar rule NP ---, sonny, then the item \[0, NP, 1\] is a lexical item. A prediction item (or, simply, a prediction) is an item with identical start and end positions.</Paragraph>
    </Section>
    <Section position="2" start_page="0" end_page="0" type="sub_section">
      <SectionTitle>
2.2 Rules of Inference
</SectionTitle>
      <Paragraph position="0"> The two basic deduction steps or rules of inference we will use are-following Earley's terminology--prediction and completion. 2 The inference rule of prediction is as follows: \[i,A *- BC1.. 'Cm,j\] B' -+ Dr.&amp;quot; &amp;quot;Dn 0 = mgu(B,B') \[j, B'O ~- DxO... D,O, j\] This rule corresponds to the logically valid inference consisting of instantiating a rule of the grammar as a conditional statement. 3 The inference rule of completion is as follows: \[i,A ,-BC1.. &amp;quot;Cm,j\] Li, B',k\] 0 = mgu(B,B') \[i, AO *-- C~O.. .C~O,k\] This rule corresponds to the logically valid inference consisting of linear resolution of the conditional expression with respect to the nonconditional (unit) lemma.</Paragraph>
    </Section>
  </Section>
  <Section position="5" start_page="0" end_page="0" type="metho">
    <SectionTitle>
3 Parameterizing a Theorem-Proving
Architecture
</SectionTitle>
    <Paragraph position="0"> This characterization of parsing as deduction should be familiar from the work of Pereira and Warren. As they have demonstrated, such a view of purging is applicable beyond the context-free grammars by regarding the variables in the inference rules as logical variables and using unification of B and B t to solve for the most general unifier.</Paragraph>
    <Paragraph position="1"> Thus, this approach is applicable to most, if not all, of the logic grammar or unification-based formalisms.</Paragraph>
    <Paragraph position="2"> In particular, Pereira and Warren construct a parsing algorithm using a deduction strategy which mimics Earley's algorithm. We would like to generalize the approach, so that the deduction strategy (or at least portions of it) are parameters of the deduction system. The parameterization should have sufficient generality that parsers and generators with w~rious control strategies, including Pereira and Warren's Barley deduction parser, are instances of the general architecture.</Paragraph>
    <Paragraph position="3"> We start the development of such an architecture by considering the unrestricted use of these two basic inference rules to form the deductive closure of the premises and the goals. The exhaustive use of prediction and completion as basic inference rules does provide a complete algorithm for proving lemmas of the sort described. However, several problems immediately present themselves.</Paragraph>
    <Paragraph position="4"> First, proofs using these inference rules can be redundant. Various combinations of proof steps will lead to the same lemmas, and combinatorial havoc may result. The traditional solution to this problem is to store lemmas in a table, i.e., the well-formed-substring table or chart in tabular parsing algorithms. In extending tabular parsing to non-context-free formalisms, the use of subsumption rather than identity in testing for redundancy of lemmas becomes necessary, and has been described elsewhere \[Pereira and Shieber, 1987\].</Paragraph>
    <Paragraph position="5"> Second, deduction is a nondeterministic process and the order of searching the various paths in the proof space is critical and differs among processing tasks. We therefore parameterize the theorem-proving process by a priority function that assigns to each lemma a priority. Lemmas are then added to the table in order of their priority. As they are added, furtlmr lemmas that are consequences of the  numbers of cousequents through repeated application when used with a grammar formalism with an infinite \[structured\] nonterminal domain. The solution proposed in that paper is to restrict the information passed from the predicting to the predicted item, corresponding to the rule \[i,A 4- BC~ *..Cry,j\] B' .--* Da .*. Dn 0 = mgu(B~, B') \[j, B'O ~ DIO'&amp;quot; DuO,j\] where B~ is a aonterminal with a bounded subset of the information of B. This inference rule is the one actually used in the implemented system. The reader is directed to the earlier paper for further discussion.</Paragraph>
    <Paragraph position="6"> new lemma and existing ones in the table may be deduced* These are themselves assigned priorities, and so forth. The technique chosen for implementing this facet of the process is the use of an agenda structured as a priority queue to store the lemmas that have not yet been added to the table.</Paragraph>
    <Paragraph position="7"> Finally, depending on the kind of language processing we are interested in, the premises of the problem and the types of goal lemmas we are searching for will be quite different. Therefore, we parameterize the theorem prover by an initial set of axioms to be added to the agenda and by a predicate on lemmas that determines which are to be regarded as satisfying the goal conditions on lemmas.</Paragraph>
    <Paragraph position="8"> The structure of the architecture, then, is as follows. The processor is an agenda-based tabular theorem prover over lemmas of the sort defined above. It is parameterized by a The initial conditions, u A priority function on temmas, and * A predicate expressing the concept of a successful proofl By varying these parameters, the processor can be used to implement language parsers and generators embodying a wide variety of control strategies.</Paragraph>
  </Section>
  <Section position="6" start_page="0" end_page="616" type="metho">
    <SectionTitle>
4 Instances of the Architecture
</SectionTitle>
    <Paragraph position="0"> We now define some examples of the use of the architecture to process with grammars.</Paragraph>
    <Section position="1" start_page="0" end_page="615" type="sub_section">
      <SectionTitle>
4.1 Parser Instances
</SectionTitle>
      <Paragraph position="0"> Consider a processor to parse a given string built by using this architecture under the following parameterization: * The initialization of the agenda includes axioms for each word in the string (e.g., \[O, sonny, 1\] and \[1,1eft,2\] for the sentence 'Sonny left') and an initial prediction for each rule whose left-hand side matches the start symbol of the grammar (e.g., \[0, S ~-NP VP, 0\]). 4 * The priority function orders lemmas inversely by. their end position, and for lemmas with the same end position, in accordance with their addition to the agenda in a first-in-first-out manner.</Paragraph>
      <Paragraph position="1"> * The success criterion is that the lemma be nonconditional, that its start and end positions be thefirst and last positions in the string, respectively, and that the nonterminal be the start nonterminal, s Under this parameterization, the architecture mimics Earley's algorithm parsing the sentence in question, and considers successful those lemmas that represent proofs of the string's grammaticality with respect to the grammar, s Alternatively, by changing the priority function, we can engender different parsing behavior. For instance, if we just order lemmas in a last-in-first-out manner (treating the agenda as a stack) we have a &amp;quot;greedy&amp;quot; parsing algorithm, which pursues parsing possibilities depth-first and backtracks when dead-ends occur.</Paragraph>
      <Paragraph position="2"> An interesting possibility involves ordering lemmas as follows:  * 1. Highest priority are prediction items, then lexical items, then other conditional items, then other nonconditional items.</Paragraph>
      <Paragraph position="3"> 2. If (1) does not order items, items ending farther to the right have higher priority* 3. If (1) and (2) do not order items, items constructed from the  instantiation of longer rules have higher priority.</Paragraph>
      <Paragraph position="4"> This complex ordering implements a quite simple parsing strategy. The first condition guarantees that no nonconditional items will be added until conditional items have been computed* Thus, items corresponding to the closure (in the sense of LI~ parsing) of the nonconditional items are always added to the table. Unlike LI~ parsing, 4For formalisms with complex structured nonterminals, the start &amp;quot;symbol&amp;quot; need only be unifiable with the left-haud-side nonterminal. That is, if S is the start nonterminal and S' ~ C1 .~.C, is a rule and 0 = mgu(S,S'), then \[0, S'0 *-C18... C,8, 0\] is an initial prediction.</Paragraph>
      <Paragraph position="5"> 5Again, for formalisms with complex structured nontermiuals, the staxt symbol need only subsume the item's nontermiual.</Paragraph>
      <Paragraph position="6"> SAssuming that the prediction inference rule uses the restriction mechanism, the architecture actually mimics the variant of Eariey's algorithm previously described in \[Shieber, 1985\].</Paragraph>
      <Paragraph position="7">  however, the closure here is computed at run time rather than being preeomptled. The last two Conditions correspond to disambiguation of shift/reduce and reduce/reduce conflicts in LR parsing respectively. The former requires that shifts be preferred to reductions, the latter that longer reductions receive preference.</Paragraph>
      <Paragraph position="8"> In sum, this ordering strategy implements a sentence-disambiguatio n parsing method that has previously been argued \[Shieber, 1983\] to model certain psycholinguistic phenomena--for instance, right association and minimal attachment \[Fra~zier and Fodor, 1978\]. However, unlike the earlier characterization in terms of LlZ disambiguation, this mechanism can be used for arbitrary logic or unification-based grammars, not just context-free grammars. Furthermore, the architecture allows for fine tuning of the disambiguation strategy beyond that described in earlier work. Finally, the strategy is complete, allowing &amp;quot;backtracking&amp;quot; if earlier proof paths lead to a dead eudf</Paragraph>
    </Section>
    <Section position="2" start_page="615" end_page="616" type="sub_section">
      <SectionTitle>
4.2 A Parsing Example
</SectionTitle>
      <Paragraph position="0"> As a demonstration of the architecture used as a parser, we consider the Earley and backtracking-LR instances in parsing the ambiguous sentence: Castillo said Sonny was shot yesterday.</Paragraph>
      <Paragraph position="1"> Since the operation of the architecture as a parser is quite similar to that of previous parsers for unification-based formalisms, we will only highlight a few crucial steps in the process.</Paragraph>
      <Paragraph position="2"> The Earley parser assigns higher priority to items ending earlier in the sentence. The highest-priority initialization items are added first, s  \[O,S-~ ,NP VP, O\] &amp;quot; \[0, N P .--+ castillo deg, 1\] 'Castillo' By Completion, the item \[0, S ---* NP * VP, 1\] 'Castillo' is generated, which in turn predicts \[1, VP -4 * VP XI 1\] &amp;quot; \[1, vp --+. v, 1\] &amp;quot; \[1, VP --* o VP AdvP, 1\] &amp;quot;  The highest-priority item remMniug on the agenda is the initial item \[1, V -+ said., 2\] 'said' Processing progresses in this manner, performing all operations at a string position before moving on to the next position until the final position is reached, at which point the final initial item corresponding to the word 'yesterday' is added. The following flurry of items is generated by completion. 9  \[5, AdvP .--+ yesterday., 6\] 'yesterday' (2) \[I, VP ---+ VP AdvP., 6\] 'said Sonny was shot yesterday' (3) \[3, VP ---* VP AdvP., 6\] 'was shot yesterday' \[4, V P ---* V P AdvP . , 6\] 'shot yesterday' \[1, VP --* VP.AdvP, 6\] 'said Sonny was shot yesterday' (4) \[0, S ~ NP VP., 6\] 'Castillo said Sonny was shot yesterday' \[3, V P --* V P deg Adv P, 6\] 'was shot yesterday' (5) \[2, S --* NP VPdeg,6\] 'Sonny was shot yesterday' \[4, V P ~ V P deg AdvP, 6\] 'shot yesterday' (6) \[1, VP ---+ VP S deg, 6\] 'said Sonny was shot yesterday' \[1, VP ---* VP deg AdvP, 6\] ~said Sonny was shot yesterday' (7) \[0, S --* NP VP., 6\] 'Castillo said Sonny was shot yesterday' ' 7Modeling uf an incomplete version of the shift-reduce technique is also possible.  The simplest method, however, involves eliminating the chart completing, and mimicking closure, shift, and reduction operations as operations on LR states (sets of items) directly. Though this method is not a straightforward instantiation of the architecture of Section 3 (since the chart is replaced by separate state sets), we have implemented a parser using much of the same technology described here and have successfully modeled the garden path phenomena that rely on the incompleteness of the shift-reduce technique.</Paragraph>
      <Paragraph position="3"> SThe format used in displaying these items reverts to one similar to Earley's algorithm, with a dot marking the position in the rule covered by the string generated so far, so as to describe more clearly the portion of each grammar rule used. In addition, the string actually parsed or generated is given in single quotes after the item for convenience.</Paragraph>
      <Paragraph position="4"> SThe four instances of 'said Sonny was shot yesterday' arise because of lexical ambiguity in the verb 'said' and adverbial-attachment ambiguity. Only the finite version of 'said' is used in forming the final sentence.  Note that the first full parse found (4) is derived from the high attachmeat of the word 'yesterday' (2) (which is composed from (i) directly), the second (7) from the low attachment (6) (derived from (5), which is derived in turn from (3)).</Paragraph>
      <Paragraph position="5"> By corhparison, the shift-reduce parser generates exactly the same items as the Earley parser, but in a different order. The crucial ordering difference occurs in the following generated items:  (1) \[5,AdvP --+ yesterday deg, 6\] 'yesterday' (3) \[3, VP ~ VP AdvP., 6\] 'was shot yesterday' \[3, VP ---* V P deg Adv P, 6\] 'was shot yesterday' (5) \[2, S --~ NP VP deg, 6\] 'Sonny was shot yesterday' (6) \[1, VP-+ VP S deg, 6\] 'said Sonny was shot yesterday' \[1, VP --~ VP * AdvP, 6\] 'said Sonny was shot yesterday' (7) \[0, S ~ NP VP deg, 6\] 'Castillo said Sonny was shot yesterday' (8) \[2, S---* NP VP deg, 5\] 'Sonny was shot' \[1, VP ---+ VP S ,, 5\] 'said Sonny was shot' \[1, VP --+ VP deg AdvP, 5\] 'said Sonny was shot' (2) \[1, VP ~ VP AdvP., 6\] 'said Sonny was shot yesterday' \[1, VP ---* VP deg AdvP, 6\] 'said Sonny was shot yesterday' (4) \[0, S ~ NP VPdeg, 6\] 'Castillo said Sonny was shot yesterday'  Note that the reading of the sentence (7) with the low attachment of the adverb--the so-called &amp;quot;right association&amp;quot; reading--is generated before the reading with the higher attachment (4), in accordance with certain psycholinguistic results \[Frazier and Fodor, 1978\]. This is because item (3) has higher priority than item (8), since (3) corresponds to the shifting of the word 'yesterday' and (8) to the reduction Of an NP and VP to S. The second clause of the priority definition orders such shifts before reductions. In summary, this instance of the architecture develops parses in right-association/minlmal-attachment preference order.</Paragraph>
    </Section>
    <Section position="3" start_page="616" end_page="616" type="sub_section">
      <SectionTitle>
4.3 Generator Instances
</SectionTitle>
      <Paragraph position="0"> As a final example of the use of this architecture, we consider'using it for generation by changing the initialization condition as follows: * The initialization of the agenda includes axioms for each word in the lexicon at each position (e.g., \[O, sonny, 1\] and \[0, left, 1\] and /1, left, 2/, and so on) and an initial prediction for each rule whose left-hand side is the start symbol of the grammar (e.g., \[0, S +- NP VP,0\]). In the case of a grammar formalism with more complex information structures as nonterminals, e.g., definite-clause grammars, the &amp;quot;start symbol&amp;quot; might include information about, say, the meaning of the sentence to be generated, We will refer to this as the goal meaning.</Paragraph>
      <Paragraph position="1"> u The success criterion is that the nonterminal be subsumed by the start nonterminal (and therefore have the appropriate meaning).</Paragraph>
      <Paragraph position="2"> Under this parameterization, the architecture serves as a generator for the grammar, generating sentences with the intended meaning.</Paragraph>
      <Paragraph position="3"> By changing the priority function, the order in which possibilities are pursued in generation can be controlled, thereby modeling depth-first strategies, breadth-first strategies, and so forth.</Paragraph>
      <Paragraph position="4"> Of course, as described, this approach to generation is sorely inadequate for several reasons. First, it requires that we initially insert the entire lexicon into the agenda at arbitrary numbers of string positions.</Paragraph>
      <Paragraph position="5"> Not only is it infeasible to insert the lexicon so many times (indeed, even once is too much) but it also leads to massive redundancy in generation. The same phrase may be generated starting at many different positions. For parsing, keeping track of which positions phrases occur at is advantageous; for generation, once a phrase is generated, we want to be able to use it in a variety of places.</Paragraph>
      <Paragraph position="6"> A simple solution to this problem is to ignore the string positions in the generation process. This can be done by positioning all lemmas at a single position. Thus we need insert the lexicon only once, each word being inserted at the single position, e.g., \[0, sonny, 0\].</Paragraph>
      <Paragraph position="7"> Although this simplifies the set of initial items, by eliminating indexing based on string position we remove the feature of tabular parsing methods such as Earley's algorithm that makes parsing reasonably efficient. The generation behavior exhibited is therefore not goal-directed; once the lexicon is inserted many phrases might be built that could not contribute in any way to a sentence with the appropriate meaning. In order to direct the behavior of the generator towards a goal meaning, we can modify the priority function so that it is partial; not every item will be assigned a priority and those that are not will never be added to the table (or agenda) at all. The filter we have been using assigns priorities only to items that might contribute semantically to the goal meaning. In particular, the meaning associated with the item must subsume some portion of the goal meaning} deg This technique, a sort of indexing on meaning, replaces the indexing on string position that is more appropriate for parsing than generation.</Paragraph>
      <Paragraph position="8"> As a rule, filtering the items by making the priority function partial can lead to incompleteness of the parsing or generation process, n However, the subsumption filter described here for use in generation does not yield incompleteness of the generation algorithm under one assumption about the grammar, which we might call semantic monotonicity. A grammar is semantically monotonic if, for every phrase admitted by tim grammar, the semantic structure of each immediate subphrase subsumes some portion of the semantic structure of the entire phrase. Under this condition, items which do not subsume part of the goal meaning can be safely ignored, since any phrase built from them will also not subsume part of the goal meaning and thus will fail to satisfy the success criterion. Thus the question of completeness of the algorithm depends on an easily detectable property of the grammar. Semantic monotonicity is, by intention, a property of the particular grammar we have been using. *</Paragraph>
    </Section>
    <Section position="4" start_page="616" end_page="616" type="sub_section">
      <SectionTitle>
4.4 A Generation Example
</SectionTitle>
      <Paragraph position="0"> As an example of the generation process, we consider the generation of a sentence with a goal logical form passionately(love(sonny, kait)) The example was run using a toy grammar that placed subcategorization information in the lexicon, as in the style of analysis of head-driven phrase-structure grammar (HPSG). The grammar ignored tense and aspect information, so that, for instance, auxiliary verbs merely identified their own semantics with that of their postverbal  Note that auxiliary verbs were included, as the semantic structure of an auxiliary is merely a variable (coiindexed with the semantic structure of its postverbal complement), which subsumes some part (in fact, every part) of the goal logical form./3 Similarly, the noun phrases 'Sonny' and ~Kait ~ (with semantics sonny and kaiL respectively) are added, as these logical forms each subsume the respective innermost arguments of the goal logical form. Several forms of the verb 'love' are considered, again because the semantics in this grammar makes no tense/aspect distinctions. But no other proper nouns or verbs are *degSince the success 'criterion requires that a successful item be subsumed by the start nonterminal and the priority filter requires that a successful item's semantics subsume the start ~tonterminai% semantics, it follows that successful items match the start symbol exactly in semantic information; overgeneration in this sense is not a problem, 11 Indeed, we might want such incompleteness for certain cases of psycholinguistically motivated psrsing models such as the simulated Lit model described above. nFor reference, the grammar is similar in spirit to the third sample grammar in \[Shieber, 1986\].</Paragraph>
      <Paragraph position="1"> asIt holds in general that closed-class lexical items---case-m~rking prepositions, function verbs, etc.~-are uniformly considered initial items for purposes of generation because of their vestigial semantics. This is as desired, and follows from the operation of semantic filtering, rather than from any ad hoc techniques.</Paragraph>
      <Paragraph position="2"> considered (although the lexicon that was used contained them) as they do not pass the semantic filter.</Paragraph>
      <Paragraph position="3"> The noun phrase 'Sonny' can be used as the subject of the sentence by combining items (1) and (3) yielding  (4) \[0, S --~ NP * VP, 0\] 'Sonny' (The corresponding item with the subject 'Knit' will be generated later.) Prediction yields the following chain of items.</Paragraph>
      <Paragraph position="4"> \[0, VP .-+ * VP AdvP, 0\] &amp;quot; \[0, w -~. v, 0\] &amp;quot;  The various verbs, including the forms of 'love', can complete this  latter item.</Paragraph>
      <Paragraph position="5"> \[0, VP ~ V ., O\] 'to' \[0, V P --. v . , 0\] 'is' \[O, VP -* V.,0\] 'was' \[0, VP -~ V., O\] 'were' (5) \[0, vP -~ v., 0\] 'loves' \[0, VP -~ V., O\] 'love' \[0, VP ~ V ., 0\] 'love' \[0, VP ---* V., 0\] 'loved' The passive form of the verb 'loved' might be combined with the adverb. null \[0, VP .-~ VP * AdvP, 0\] 'loved' \[0, VP --, V P AdvP ., 0\] 'loved passionately'  The latter item might be used in a sentence 'Knit was loved passionately.' This sentence will eventually be generated but will fail the success criterion because its semantics is insufficiently instantiated. Prediction from item (4) also yields the rule for adding complements to a verb phrase.</Paragraph>
      <Paragraph position="6"> \[0, vP --,. VP X,O\] &amp;quot; Eventually, this item is completed with items (5) and (2). \[0, VP ---, V P * N P, 0\] 'loves' \[0, VP --~ VP NP ,, 0\] 'loves Knit' The remaining items generated are \[0, VP ---* VP , AdvP, 0\] 'loves Knit' \[0, V P ---, V P Adv P o, 0\] 'loves Knit passionately' \[0, S ---* NP VP., 0\] 'Sonny loves Knit passionately' This final item matchesthe success criterion, and is the only such item. Therefore, the sentence 'Sonny loves Kait passionately' is generated for the logical form passionately(love(sonny, knit)).</Paragraph>
      <Paragraph position="7"> Looking over the generation process, the set of phrases actively explored by the generator included 'Kate is loved', 'Kate is loved passionately', 'were loved passionately' and similar passive constructions, 'Sonny loves Kalt', and various subphrases of these. However, other phrases composed of the same words, such as 'Knit loves Knit', 'Sonny is loved', and so forth, are eliminated by the semantics filter. Thus, the the generation process is, on the whole, quite goal-directed; the subphrases considered in the generation process are &amp;quot;reasonable&amp;quot;.</Paragraph>
    </Section>
  </Section>
  <Section position="7" start_page="616" end_page="617" type="metho">
    <SectionTitle>
5 The Implementation
</SectionTitle>
    <Paragraph position="0"> The architecture described above has been implemented for the PATR grammar formalism in a manner reminiscent of object-oriented programming. Instances of the architecture are built as follows. A general-purpose processor-building fimction, taking a priority function and success criterion fnnction as arguments, returns an object that corresponds to the architecture instance. The object can be sent initialization items as arbitrary lemmas of the usual form. Whenever a successful lemma is constructed (according to the success criterion) it is returned, along with a continuation function that can be called if further sohttions are needed. No processing is done after a successflfl lemma has been pro/ed unless further solutions are requested.</Paragraph>
    <Paragraph position="1"> Using this implementation, we have built instances of the architecture for Barley parsing and the other parsing variants described in this paper, including the shift/reduce simulator. In addition, a generator was built that is complete for semantically monotonic grammars. It is interesting to note that the generator is more than an order of magnitude faster than our original PATR generator, which worked purely by  top-down depth-first backtracking search, that is, following the Prolog search strategy.</Paragraph>
    <Paragraph position="2"> The implementation is in Common Lisp and runs on Symbolics 3600, Sun, and Macintosh computers. It is used (in conjunction with a more extensive .grammar) ~s the generation component of the GENESYS system for utterance planning and production.</Paragraph>
  </Section>
class="xml-element"></Paper>
Download Original XML