File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/00/w00-1422_metho.xml

Size: 12,727 bytes

Last Modified: 2025-10-06 14:07:28

<?xml version="1.0" standalone="yes"?>
<Paper uid="W00-1422">
  <Title>Enriching Partially-Specified Representations for Text Realization Using an Attribute Grammar *</Title>
  <Section position="3" start_page="163" end_page="165" type="metho">
    <SectionTitle>
2 An Overview of YAG
YAG (Yet Another Generator) (Channarukul, 1999;
</SectionTitle>
    <Paragraph position="0"> McRoy et al., 1999) is a template-based textrealization system that generates text in real-time. YAG uses templates to express text. structures corresponding to fragments of the target language. Templates in YAG are declarative and modular. Colnplex texts can be generated 173&amp;quot; embedding templates inside other tenlplates.</Paragraph>
    <Paragraph position="1"> Values for the tenlplates are provided by an application; inputs can include either,a conceptual representation of content or a feature structure. When an input is only partially specified, defaults defined in a template will be applied. Figure I shows an example of YAG's feature-structure based input; YAG would realize this example as &amp;quot;Jack and I want his sister's dog to swim. &amp;quot;. This input is partially specified, and thus is more compact and easier for an application to specify, than a complete specification. Figure 2 shows the features that have been omitted and the defaults used t75 YAG to realize the sentence from tile input.</Paragraph>
    <Paragraph position="2"> Although the input is already more compact than a full specification, further simplification of the input provided from an application would have been possible, if certain inferences could be made. For example, Figure 3 shows an input structure that could replace the one given in Figure 1. In Figure 3, it was not necessary for the application to specify that the conjunction of two noun phrases is a phlral noun phrase, nor that component noun phrases (proper nouns, pronouns, and possessives) should not, contain an article. In the case of conjunctions, there is no default that would provide the correct outputs in all cases, because the same conjunction template is used to conjoin adjectives and clauses. Instead, our approach uses an attribute grammar to make the appropriate inferences and enrich the feature struc- null ture input so that neither the application, nor the templates need to be altered to handle dependencies, like conjunctions, correctly.</Paragraph>
  </Section>
  <Section position="4" start_page="165" end_page="168" type="metho">
    <SectionTitle>
3 Attribute Grammars
</SectionTitle>
    <Paragraph position="0"> An attribute grammar consists of a context-free grammar, a finite set of attributes, and a set of semantic rules. The ,.C-,on.~eezt-Free :Grammar (CFG) specifies the syntax of a language by expressing how to construct a syntax tree from non-terminal and terminal symbols defined in a language. The Attributes and Semantic Rules specify the semantics. A finite set of attributes is associated with each non-terminal symbol. Each of these sets is divided into two disjoint subsets, namely Inherited Attributes and Synthesized Attributes. Inherited attributes propagate down a syntax tree whereas synthesized attributes propagate upward. A semantic rule specifies how to compute the value of an attribute from others. This specification implicitly defines dependencies among attributes in an attribute grammar, locally (within a production) and globally (among productions). Attribute Evaluation is the process of computing values for every attribute instance in the tree according to the semantic rules defined for each production.</Paragraph>
    <Paragraph position="1"> An example of an attribute grammar and its components is given in Figure 4 (adapted from (Alblas, 1991)). This attribute grammar consists of two nonterminals, two terminals, andthree production rules.</Paragraph>
    <Paragraph position="2"> The inherited attributes of the non-terminal A are a and b. Its synthesized attributes are x and y. No attributes are assigned to the non-terminal S.</Paragraph>
    <Paragraph position="3"> nonterminals: S, A.</Paragraph>
    <Paragraph position="4"> terminals: s, t.</Paragraph>
    <Paragraph position="5"> start symbol: S.</Paragraph>
    <Paragraph position="6"> description of attributes: a, b: integer, inh of A; x, y: integer, syn of A; productions and semantic rules:</Paragraph>
    <Paragraph position="8"> As mentioned earlier, semantic rules define dependencies among attributes* Figure 5 shows dependency graphs corresponding to the semantic rules of Figure 4. In the graphs, a dotted line represents a derivation of a production rule, ' while an arrow de inotes an attribute dependency. Thus..4 ~ B means  To make a generation gap analysis possible, a grammar writer must first extend the grammar of his or her existing generator to capture the propagation semantics of a target language. This extension involves defining attributes (synthesized and inherited) and associated semantic rules. Next, a small program must be built to construct a tree from a given input and retrieve semantic rules and attributes from associated grammar units.</Paragraph>
    <Paragraph position="9"> Attribute evaluation begins by instantiating each inherited attribute with values from the input and then the remaining attributes are evaluated. This process is incremental in the sense that new information gained from previous evaluations might lead to the discovery of additional information. When all attributes remain unchanged, or there is a conflict detected in the input, the process terminates. The generator then passes the enriched input to the realization component.</Paragraph>
    <Paragraph position="10"> Consider the following fragment of input from Figure 3 that uses the CONJUNCTION template to join a noun phrase and a pronoun.</Paragraph>
    <Paragraph position="12"> This fragment is the subject of the sentence, therefore features such as person and number would be required to enforce tile subject-verb agreement of English. Figure 6 shows a dependency graph ~ for this i The notatio, used in the dependency graph is the following: null The oval represents a template slot that is bound to an atomic value. The rectangle denotes a slot that is bound to another feature structure. The top text in a rectangle specifies a slot name, and the bottom text is the name of a template ~kssigned to this slot,. A value with an underline'means a default of the above slot. The bold fdnt represents a value yielded from attribute evaluations.</Paragraph>
    <Paragraph position="13">  fragment. The dependencies are based on the semantic rules given in Figure 7 (Section 6 describes syntax of these rules.).</Paragraph>
    <Paragraph position="14"> The semantic rules in Figure 7 give constraint information for the CONJUNCTION template, the NOUN-PHRASE template, and the PRONOUN template.</Paragraph>
    <Paragraph position="15"> For the CONJUNCTION template, the grammar will: e Use the sentence feature of the current template (which is NO by default).</Paragraph>
    <Paragraph position="16"> o Pass up the person feature found by comparing the person features associated with tile two conjuncts (i.e., pass up second person whenever the conjuncts combine either first person and second or third person, or they combine second person and third person; pass up third person if both conjuncts use third person; otherwise pass tip nil); * Constrain the number feature to be PLURAL, the gender feature to be NEUTRAL, the definite feature to be NOART, and the sentence feature to the same as the sentence feature of the conjunets. null For tile NOUN-PHRASE teinplate, the grammar will Require this template to enforce the inherited values of the definite, number, and np-type features.</Paragraph>
    <Paragraph position="17"> Require the (embedded) DETERMINER template enforce the number feature of the current template. null Pass up four features (definite, number, person, and np-type) to any templates that use this noun phrase, where the fotlcrwJng constraints apply: The definiteness feature that is passed is YES whenever the current template has inherited YES for this value or there is a possessor or a determiner and one of them passes up YES for this feature. (If there is neither possessor nor determiner then the grammar considers the np-type: if it is COMMON, it uses NO (for indefinite) and if it is PROPER, it uses NOART The number feature passed is the value passed from the determiner, if there is one, or the value from the current template.</Paragraph>
    <Paragraph position="18"> The person feature passed is the one from the current template.</Paragraph>
    <Paragraph position="19"> The rip-type feature passed is COMMON if the value of definite is NO and PROPER if the value is NOART.</Paragraph>
    <Paragraph position="20"> For tile PRONOUN template, the grammar will: o Pass tip the person, number, and gender values fl'om the current template (possibly using default values), along with the constraint that ttle string realized for it not be a sentence and not be preceded by an article.</Paragraph>
    <Paragraph position="21"> In-the example shown in Figure 6, inherited attributes 2 have been initialized to the associated values given in an input. If the input does not specify a value for an inherited attribute, then the value nil is used.</Paragraph>
    <Paragraph position="22"> The attribute evaluation is depth-first, and requires nmltiple traversals. Here, the NOUN-PHRASE sub-tree is evaluated twice, as we discover that the definite feature must be NOART. Since tile PRONOUN  template has no inherited attributes, a single evaluation would be sufficient. The CONJUNCTION sub-tree is also traversed twice because the sentence feature is re-assigned once (from nil to NO).</Paragraph>
    <Paragraph position="23"> Figure 8 shows the tree and dependencies, for the fragment, &amp;quot;his sister's dog&amp;quot;. It shows how the deftniteness of a noun phrase is dependent on the existence of a possessor. For example, if a possessor (such as &amp;quot;his&amp;quot; or &amp;quot;Jack's&amp;quot;) is specified, a noun phrase will not need an article.</Paragraph>
    <Paragraph position="24"> Note that this feature structure can be generated differently as &amp;quot;'Jack's sister's dog&amp;quot;. &amp;quot;her dog&amp;quot;. &amp;quot;the dog o~ Jack's sister&amp;quot;. &amp;quot;'the do q o/ h.is sister&amp;quot;, and &amp;quot;the dog o/ hens&amp;quot;. \Vhile some of these variations require further investigation to determine how to transform a tree so that it reflects a new ordering of constituents, some can be implemented using semantic rules. For example,--to-avoid-/anawkward construction such as &amp;quot;,lack's sister's do q&amp;quot; in the sen- null tence &amp;quot;Jack and I want Jack's sister's dog to swim. &amp;quot;, in favor of &amp;quot;his sister's dog&amp;quot;, without the application having to request a pronoun explicitly, as in the example shown above, we could add a rule to force the pronominal feature of the inner most possessor to be YES, whenever a (repeated) noun phrase is a possessor of a possessor of the primary noun.</Paragraph>
  </Section>
  <Section position="5" start_page="168" end_page="168" type="metho">
    <SectionTitle>
5 The Use of the Gehei-ation Gap ...........
</SectionTitle>
    <Paragraph position="0"/>
    <Section position="1" start_page="168" end_page="168" type="sub_section">
      <SectionTitle>
Analysis to Resolve Conflicting
Information
</SectionTitle>
      <Paragraph position="0"> One side benefit of the use of attribute grammars is that they can help resolve inconsistencies in the input provided from an application. Previously, a generation system might not be able to recognize such conflicts, and therefore might generate a text that is ungrammatical, or it might simply fail to produce an output at all.</Paragraph>
      <Paragraph position="1"> The following is an example input that has a conflict; the values of the number feature in the  Executed literally, a generator would produce the phrase &amp;quot;this books&amp;quot;, rather than &amp;quot;this book&amp;quot; or &amp;quot;these books&amp;quot;. Figure 9 shows a dependency graph corresponding to the above input.</Paragraph>
      <Paragraph position="2">  the text &amp;quot;this book&amp;quot; or &amp;quot;these books&amp;quot;. With the use of an appropriate attribute grammar, an analysis of this structure would detect a conflict when the vahm SINGULAR ofthe-number feature propagates upward and conflicts with the value PLURAL of the number feature of the NOUN-PIIRASE template. In this case, a generator can choose to override one of the conflicting features and generate a text from the revised input.</Paragraph>
    </Section>
  </Section>
class="xml-element"></Paper>
Download Original XML