File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/96/w96-0411_metho.xml

Size: 17,969 bytes

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

<?xml version="1.0" standalone="yes"?>
<Paper uid="W96-0411">
  <Title>Output String N G I N E</Title>
  <Section position="4" start_page="103" end_page="105" type="metho">
    <SectionTitle>
3 The Template Generation
</SectionTitle>
    <Paragraph position="0"/>
    <Section position="1" start_page="103" end_page="105" type="sub_section">
      <SectionTitle>
Language (TGL)
</SectionTitle>
      <Paragraph position="0"> TGL defines a general format for expressing production rules as precondition-action pairs (cf. Figure 3). A TGL rule is applicable if its preconditions are met. A TGL rule is successfully applied, if the action part has been executed without failure. Failure to apply a TGL rule signals that the rule does not cover the portion of the input structure submitted to it.</Paragraph>
      <Paragraph position="1"> Figure 4 shows a sample TGL rule. It corresponds to an infinitival VP covering a direct object, an optional temporal adjunct, an optional expression for a duration (such as for an hour), an optional local adjunct (such as at the DFKI building) , and the infinite verb form. Given the input GIL structure of Figure 2, the VP Sic am Freitag treffen \[to meet you on Friday\] could be genorated from this rule. Among the optional constituents, only the temporal adjunct would find appropriate  material in the GIL input structure (under THEME. TIME-ADJ).</Paragraph>
      <Paragraph position="2"> Every TGL rule has a unique name, denoted by the initial string. This name is used for expressing preferences on alternative rules (cf. Section 5).</Paragraph>
      <Paragraph position="3"> Categoryi The categories can be defined as in a context-free grammar. Correspondingly, categories are used for rule selection (see below). They ensure that a set of TGL rules possesses a context-free backbone.</Paragraph>
      <Paragraph position="4"> Test: The Lisp code under : TEST is a boolean predicate (usually about properties of the portion of input structure under investigation or about the state of some memory). In the sample rule, an argument is required that fills the patient role.</Paragraph>
      <Paragraph position="5"> Template: Actions under :TEMPLATE 1 include the selection of other rules ( : RULE, : 0PTRULE), executing a function (:FUN), or returning an ASCII string as a (partial) result.</Paragraph>
      <Paragraph position="6"> When selecting other rules by virtue of a category, a Lisp function is called that 1The notion of template is preserved for historical reasons: the predecessor system TG/1 was strictly template-based, identifies the relevant portion of the input structure for which a candidate rule must pass its associated tests. In Figure 4, the first action selects all rules with category NP; the relevant substructure is the argument filling the patient role (cf.</Paragraph>
      <Paragraph position="7"> the second element of the ARGS list in Figure 2). If there is no such substructures an error is signalled 2 unless an 0PTRULE slot (for &amp;quot;optional rule&amp;quot;) was executed. In this case, processing continues without results from that slot.</Paragraph>
      <Paragraph position="8"> Functions must return an ASCII string.</Paragraph>
      <Paragraph position="9"> They are mostly used for word inflection; otherwise, for German every inflectional variant would have to be encoded as a rule. TG/2 uses the morphological inflection component MORPHIX \[Finkler and Neumann, 1988\].</Paragraph>
      <Paragraph position="10"> Side effects: The Lisp code under : SIDE-EFFECTS is a function whose value is ignored. It accounts for non-local dependencies between substructures, such as updates of a discourse memory. Note that these effects can be traced and undone in the case of backtracking.</Paragraph>
      <Paragraph position="11"> 2In the case at hand, the grammar writer preferred to ensure availability of the substructure by virtue of the test predicate.</Paragraph>
      <Paragraph position="12">  Constraints: Agreement relations are encoded into the rules by virtue of a PATR style \[Shieber et al., 1983\] feature percolation mechanism. The rules can be annotated by equations that either assert equality of a feature's value at two or more constituents or introduce a feature value at a constituent. Attempting to overwrite a feature specification yields an error. In Figure 4, the right-hand side constituent NP is assigned accusative case. Any of these effects are subject to backtracking.</Paragraph>
      <Paragraph position="13"> Using TGL, small task- and domain-specific grammars can be written quickly. For instance, in the domain of appointment scheduling the system COSMA \[Busemann et al., 1994\] has to accept, reject, modify, or refine suggested meeting dates via email. The sublanguage encoded in TGL only needs a few speech acts, about twenty sentential templates, and a complete account of German date expressions. Moreover, formal as well as informal opening and closing phrases for emails are covered.</Paragraph>
      <Paragraph position="14"> Larger grammars may become difficult to maintain unless special care is taken by the grammar writer to preserve a global structure of rules, both by defining suitable categories and by documenting the rules. TGL rules are presently written using a text editor. A specialized TGL grammar editor could improve the development and the organization of grammars considerably. Syntactic correctness is checked at compile-time by an LR-Parser generated by Zebu \[Laubsch, 1992\] on the basis of a BNF syntax for TGL.</Paragraph>
    </Section>
  </Section>
  <Section position="5" start_page="105" end_page="107" type="metho">
    <SectionTitle>
4 An interpreter with
</SectionTitle>
    <Paragraph position="0"> generic backtracking TG/2 has a simple interpretation procedure that corresponds to the classical three-step evaluation cycle in production systems (matching, conflict resolution, firing) \[Davis and King, 1977\]. The algorithm receives a GIL structure as its input and uses a distinguished category, TXT, to start from.</Paragraph>
    <Paragraph position="1">  1. Matching: Select all rules carrying the current category. Execute the tests for each of these rules on the input structure and add those passing their test to the conflict set.</Paragraph>
    <Paragraph position="2"> 2. Conflict resolution: Select an element from the conflict set.</Paragraph>
    <Paragraph position="3"> 3. Firing: Execute its side effect code (if  any). Evaluate its constraints (if any). For each action part, read the category, determine the substructure of the input by evaluating the associated function, and goto 1.</Paragraph>
    <Paragraph position="4"> The processing strategy is top-down and depth-first. The set of actions is fired from</Paragraph>
    <Paragraph position="6"> encountered inside the ego of B2.</Paragraph>
    <Paragraph position="7"> left to right. Failure of executing some action causes the rule to be backtracked.</Paragraph>
    <Paragraph position="8"> The interpreter yields all solutions the grammar can generate. It attempts to generate and output a first solution, producing possible alternatives only on external demand.</Paragraph>
    <Paragraph position="9"> Any alternative is based on backtracking at least one rule. Backtrack points correspond to conflict sets containing more than one element. null Backtracking may turn out to be inefficient if it involves recomputation of previously generated substrings. In TG/2 this effort is reduced considerably because it is only necessary to recompute the part licensed by the newly selected rule. What has been generated before or after it remains constant (modulo some word forms that need to agree with new material) and can thus be reused for subsequent solutions. This is possible due to the design properties of TGL: rules cannot irrevocably influence other parts of the solution. In particular, the context-free backbone implicit in any solution and the restrictions to side effects mentioned above keep the structural effects of TGL rules local.</Paragraph>
    <Paragraph position="10"> In the sequel, technical aspects of the back-tracking regime are discussed. Let us assume that the interpreter compute a backtrack point. Let us call the sequence of strings generated by previous actions its pre-context, the set of string sequences generated from the elements of the conflict set its ego, and the sequence of strings generated from subsequent actions its post-context. For every ego, the pre- or the post context may be empty.</Paragraph>
    <Paragraph position="11"> Each time a backtrack point is encountered during processing, an entry into a global table is made by specifying its pre-context (which is already known due to the left-to-right processing), a variable for the ego (which will collect the sequences of strings generated by the elements of the conflict set), and a variable for the post-context (which is unknown so far). a Figure 5 shows the state of a sample table comprising three backtrack points after all solutions have been computed. The ego variable is shown using indices running over the elements of the respective conflict sets. The operator '.' denotes concatenation of strings with strings or sets of strings, delivering all possible combinations.</Paragraph>
    <Paragraph position="12"> After the first solution has been found (i.e.</Paragraph>
    <Paragraph position="13"> Sl&amp;quot;S21 '83&amp;quot;851 &amp;quot;861&amp;quot;871 &amp;quot;S8), every ego set contains one element. The post contexts for all backtrack points can be entered into the table.</Paragraph>
    <Paragraph position="14"> The next solution is generated by selecting anyone of the backtrack points and adding a new element to the ego set. At the same time.</Paragraph>
    <Paragraph position="15"> all other entries of the table are updated, and the set of additional solutions can be read off straightforwardly from the entry of the backtrack point just processed. Assume, for instance, that B21 generates a second solution.</Paragraph>
    <Paragraph position="16"> thus causing V2~ to have two elements. We then get Sl'S21&amp;quot;83&amp;quot;851&amp;quot;862&amp;quot;871&amp;quot;88. Now assume that Bi also generates a second solution. This 3In fact, it is preterminal rather than terminal elements that are stored in the table in order to account for modified constraints. This can be neglected in the present discussion, but will be taken up again below.  directly yields two more solutions since the post context of B1 includes, via 84j, the two elements of V21.</Paragraph>
    <Paragraph position="17"> This way only the alternative elements of a conflict set have to be expanded from scratch.</Paragraph>
    <Paragraph position="18"> All other material can be reused. This is highly efficient for backtrack points introducing &amp;quot;cheap&amp;quot; alternatives (e.g. different wordings). Since the ego must be recomputed from scratch, much less is gained with backtrack points occurring at a higher level (e.g. active vs. passive sentence). In order to avoid having to recompute successfully generated partial results within the ego, such results are stored during processing together with the part of the input structure and the current category. They can be reused when passing an applicability test that requires the stored category and input structure to be identical to the current ones.</Paragraph>
    <Paragraph position="19"> The backtracking approach described is based on the assumption that any constraints introduced for some ego can be undone and recomputed on the basis of rules generating an alternative ego. Clearly, features instantiated for some ego may have effects onto the pre- or post-context. If an agreement feature receives a different value during backtracking and it relates to material outside the ego, inflectional processes for that material must be computed again. These cases can be detected by maintaining a trace of all constraint actions. The recomputation is rendered possible by adding, in addition to storing terminal strings in the table, the underlying calls to the inflection component as well.</Paragraph>
  </Section>
  <Section position="6" start_page="107" end_page="108" type="metho">
    <SectionTitle>
5 Parameterization
</SectionTitle>
    <Paragraph position="0"> Parameterization of TG/2 is based on specifying the way how the generic backtracking regime should operate. It can be influenced with regard to * the element in the conflict set to be processed next, and * the backtrack point to be processed next. Both possibilities taken together allow a system that feeds TG/2 to specify linguistic criteria of preferred solutions to be generated first.</Paragraph>
    <Paragraph position="1"> The criteria are defined in terms of rule names, and a criterion is fulfilled if some corresponding rule is successfully applied. We call such a rule c-rule. TG/2 implements a simple strategy that processes those backtrack points first that have conflict sets containing c-rules, and preferrably choses a c-rule from a conflict set. When applied incrementally, this procedure yields all solutions fulfilling (some of) the criteria first.</Paragraph>
    <Paragraph position="2"> It would be desirable to see the solution fulfilling most criteria first. However, incremental application enforces decisions to be taken locally for each conflict set. Any c-rule chosen may be the last one in a derivation, whereas chosing a non-c-rule may open up further opportunities of chosing c-rules. These limits are due to a lack of look-ahead information: it is not known in general which decisions will have to be taken until all solutions have been generated. 4 Clearly, sacrificing incrementality is not what should be desired although it may be acceptable for some applications. The drawbacks include a loss of efficiency and runtime. This leaves us with two possible directions that can lead to improved results.</Paragraph>
    <Paragraph position="3"> Analyzing dependencies of criteria: The solution fulfilling most criteria is generated first if sets of mutually independent criteria are applied: fulfilling one criterion must not exclude the applicability of another one.</Paragraph>
    <Paragraph position="4"> unless two criteria correspond to rules of the same conflict set. In this case, they must allow for the the application of the same subset of criteria. If these conditions are met, chosing a c-rule from every conflict set, if possible, will lead to a globally best solution first. There is, however, the practical problem that the conditions on the criteria can only be fulfilled by 4Note that this conclusion does not depend on the processing strategy chosen.</Paragraph>
    <Paragraph position="5">  analyzing, and possibly modifying, the TGL grammar used. This contradicts the idea of having the user specify her preferences independent of TG/2 properties.</Paragraph>
    <Paragraph position="6"> Learning dependencies of criteria: Missing look-ahead information could be acquired automatically by exploiting the derivational history of previously generated texts. For every applied rule, the set of c-rules applied later in the current subtree of a derivation is stored. From this information, we can derive off-line for any set of criteria which c-rules have applied in the corpus and how often each c-rule has applied within a derivation. Computing such information from the context-free backbone of TGL grammars instead would be less effective since it neglects the drastic filtering effects of preconditions.</Paragraph>
    <Paragraph position="7"> However. checking the grammar this way indicates which c-rules will not appear in some subtree.</Paragraph>
    <Paragraph position="8"> During processing, TG/2 can then judge the global impact of chosing the locally best c-rule and decide to fulfill or violate a criterion. The success of this method depends on how well the derivation under construction fits with the sample data. The more examples the system observes, the more reliable will be its decisions.</Paragraph>
    <Paragraph position="9"> The latter approach is in fact independent on how the criteria influence each other. In addition, it can be extended to cope with weighted criteria. A weight is specified by the user (e.g. a feeding system) and expresses the relative importance of the criterion being fulfilled in a solution. TG/2 would give preference to derivations leading to the maximum global weight. The global weight of a solution is the sum of the c-rule weights, each divided by the number of times the c-rule occurs.</Paragraph>
    <Paragraph position="10"> However, different GIL structures may, for a TGL rule, lead to different sets of follow-up c-rules. This causes the decision to be non-deterministic unless the reasons for the difference are learned and applied to the case at hand. We must leave it to future research to identify ard apply suitable learning algorithms to solving this problem.</Paragraph>
    <Paragraph position="11"> Criteria have been implemented for choosing a language, for chosing between active and passive sentences, for preferring paratactical over hypotactical style, and for choice of formal vs. informal wordings. Additional uses could include some rhetorical structuring (e.g.</Paragraph>
    <Paragraph position="12"> order of nucleus and satellites in RST-based analyses \[Mann and Thompson. 1988\]).</Paragraph>
    <Paragraph position="13"> The approach presented offers a technical framework that allows a deep generation process to abstract away from many idiosyncrasies of linguistic knowledge by virtue of meaningful weighting functions. Ideally, these functions must implement a theory of how mutual dependencies of criteria should be dealt with. For instance, lexical choice and constituent order constraints may suggest the use of passive voice (cf. e.g. \[Danlos, 1987\]). It is a yet open question whether such a theory can be encoded by weights. However, for some sets of preferences, this approach has proven to be sufficient and very useful.</Paragraph>
  </Section>
class="xml-element"></Paper>
Download Original XML