A Shallow Formalism for Defining Personalized Text

Stephan Busemann DFKI GmbH Stuhlsatzenhausweg 3, 66123 Saarbrücken

                           busemann@dfki.de

1 Introduction

Shallow approaches to generation quite opportunistically model only the parts of interest for the application in hand. Often such models will turn out to be extremely simple, but in other cases much more detail is required. Thus, developing techniques for varying modeling granularity according to the requirements posed by the application is a prerequisite for more custom-tailored systems. One important aspect of varying granularity is the simultaneous utilization of canned texts, template-based techniques and full-fledged grammar rules.

In applications aimed at different types of users, such as experts and novices, the generated texts must be personalized in order to convey their meanings successfully. The granularity may differ from one user type to another.

In this paper, we sketch techniques suited to account for these needs within a shallow verbalization system, extending on suggestions put forward in [Busemann, 1996, Section 5]. We shall concentrate on the aspect of tailoring formulations to the level of understanding of different addressees. To this end, we suggest relying on a corpus acquired by, or defined jointly with, the intended users of the system.

2 The TG/2 Shallow Verbalizer

A reusable shallow verbalizer of different languages is the TG/2 system [Busemann, 1996]. TG/2 has been used for the generation of e-mail messages in appointment negotiation dialogues [Busemann et al., 1997] and of environmental air quality reports [Busemann and Horacek, 1998; Horacek and Busemann, 1998]. TG/2 can be smoothly combined with deep generation processes. It integrates canned text, templates, and context-free rules into a single production-rule formalism and is thus well suited for coping with input semantics of different granularity. Consider the representation in Figure 1, taken from the domain of air quality reports, and its corresponding surface verbalization. While temporal descriptions and figures are represented in detail, for other parts of the text (e.g. the highest 30 minute average value), an underlying representation is missing completely. The verbalization of the detailed semantic aspects should be faithfully, using grammar-based methods known from in-depth surface generation. The semantic parts missing from the input structure must be implicitly known and reconstructed by the verbalizer, often realizing them as canned texts.

TG/2 is based on production system techniques [Davis and King, 1977]. Productions encode grammar rules in the language TGL. They are applied through the familiar three-step processing cycle: (i) identify the applicable rules, (ii) select a rule on the basis of some conflict

          [(PRED maxwert)
           (TIME [(PRED dofc)
                  (NAME [(DAY 31) (MONTH 12) (YEAR 1996)])])
           (POLLUTANT so2)
           (SITE "Voelklingen-City")
           (VALUE [(AMOUNT 345) (UNIT mkg-m3) (STATUS uncertain)])]

Der höchste Halbstundenmittelwert für SO_{2} an der Meßstation Völklingen-City erreichte am 17. 01. 1998 18 μg/m^{3} (Wert unzuverlässig!). [The highest 30 minute average value for SO_{2} at the measurement station of Völklingen-City was 18 μg/m^{3} on 01-17-98 (value not reliable!).]

Figure 1: A sample input representation and its verbalization.

resolution mechanism, and (iii) apply that rule. A TGL rule is applicable if its preconditions are met. The rule in Figure 2 is applicable to input material as shown in Figure 1.

TGL rules contain categories as in a context-free grammar, which are used for rule selection (see below). The rule’s actions are carried out in a top-down, depth-first and left-to-right manner. Actions include the activation of other rules (:RULE) or the insertion of ASCII strings into the overall result (see [Busemann, 1996] for more details on actions). When selecting other rules by virtue of a category, the relevant portion of the input structure for which a candidate rule must pass its associated tests must be identified. The function get-param in Figure 2 yields the substructure of the current input depicted by its argument. For instance, (:RULE PPtime (get-param 'time)) selects all rules with category PPtime; the relevant substructure is the TIME slot of an input structure.

A TGL rule is applied successfully if all actions are carried out. The rule returns the concatenation of the substrings produced by the actions. If an action fails, backtracking can be invoked flexibly and efficiently using memoization techniques (see [Busemann, 1996]).

3 Defining Personalized Text in TGL

Personalized text is often based on reasoning and explicit user models. For text generation applications, however, a corpus of what should be said in which situation to which type of user can provide sufficient background to determine a corresponding behaviour. In the present approach, we encode the user-dependent verbalization options into the TGL grammar. Let us assume that our corpus shows that the verbalization of maximum values as in Figures 1 and 2 is appropriate for expert users (e.g. employees of an environmental administration). For the general public, however, an alternative formulation is preferable, which contains less jargon:

Der höchste Durchschnittswert bei halbstündigen Messungen für Schwefeldioxid an der Meßstation Völklingen-City erreichte am 17. 01. 1998 18 Mikrogramm pro Kubikmeter Luft. Dieser Wert wurde bisher nicht durch die zuständigen Stellen bestätigt.

[The highest average value for measurements over a period of 30 minutes for sulfur dioxide at the measurement station of Völklingen-City was 18 micrograms per

       (defproduction maxwert "R1"
               (:PRECOND (:CAT DECL
                          :TEST ((pred-eq 'maxwert)
                                 (not (status-eq (theme) 'no))))
                :ACTIONS ("Der h&o1chste Halbstundenmittelwert "
                          (:RULE POLL (get-param 'pollutant))
                          (:RULE SITE (get-param 'site))
                          " erreichte "
                          (:RULE PPtime (get-param 'time))
                          (:RULE SVAL (self))
                          ".")))

Figure 2: A TGL rule defining a template for a statement about maximum values. Its context-

free skeleton corresponds to DECL → POLL, SITE, " erreichte ", PPtime, SVAL, "."

cubic meter air on 01-17-98. This value has not been confirmed by the authorities.]

Clearly this text is longer and a bit more detailed than the one adopted for expert users. Still it should be generated from the same input (Figure 1). We define additional grammar rules for the parts of the text that are different for novice users. These rules are applicable under the same constraints than their respective “expert” counterparts. For instance, a “novice” version of the rule in Figure 2, which we might name "R2", would just encode a different ASCII string as its first action: "Der h&o1chste Durchschnittswert bei halbst&u1ndigen Messungen ". Rules for POLL and SVAL are also defined for “novice” users, but the rules for TIME are used in both expert and novice texts.

Moreover, let us assume that users may want their texts to contain hyper links for further reference. “Expert hyper-links” should refer to legal texts, while “novice links” should provide (informal) explanations of environmental notions.^{1} We add further rules that allow the insertion of the respective hyper-text markups, and that are applicable under the same constraints as their non-HTML counterparts.

4 Generating Personalized Text With TG/2

So far, we have provided examples for alternative possibilities to express a message. We now define a parameter expertise (with values “expert” and “novice”) and a boolean parameter link in order to structure the alternatives. This is achieved by (i) assigning each rule a tag denoting the parameter specifications it is associated with, and (ii) define a conflict resolution strategy based on the user’s specification of available parameters, which may involve an importance ranking of parameter names and/or values.

The general mechanism of applying arbitrary selector functions to a set of TGL rules is implemented in TG/2 (details can be found in [Wein, 1996]).

Let us assume that a user chooses “novice” text with hyper-links. The TG/2 three-step production interpreter retrieves, in each cycle, all applicable rules, including expert and ones without hyper-links. Every time the parameter-based conflict resolution selects a rule the tag of which conforms best to the specifications made by the user. Assume that a conflict set con-

1We are not concerned with how the content of those links is generated, but assume it is available.

tains the following tagged rules: {R1-[expertise: expert, link: -], R2-[expertise:
novice, link: -], R3-[expertise: expert, link: +]}. (R1 might correspond to Fig-

ure 2 and R2 to its “novice” counterpart.) None of the tags matches exactly the specifications. If the parameter expertise is defined to be more important than link, R2 will be selected. If, however, link is preferred over expertise, R3 is applied.

If a choice leads to failure, backtracking to the conflict resolution process will again apply the same strategy to the set of unexplored alternatives.

As a result, a text is generated that conforms best to the user’s preferences, given the set of alternatives encoded in the underlying TGL grammar.

5 Conclusion

We sketched techniques to generate personalized text within the shallow generation system TG/2 by elaborating on suggestions put forward [Busemann, 1996, Section 5]. The TG/2 rule formalism, TGL, allows to combine grammar rules with canned text parts, thus giving the grammar writer the freedom to model the linguistic aspects of the domain in hand with different granularities. In particular, different user types may require different degrees of elaboration. Using a (fictive) example, we showed how the user’s preferences, encoded as parameter specifications, relate to appropriate verbalization choices. The grammar is based on a text corpus rather than on an explicit user model or a reasoning system.

The example described is being implemented for the air quality domain. It serves as a proof of concept. Future work includes parameterizing TG/2 for different types of text summarization.

References

[Busemann and Horacek, 1998] Stephan Busemann and Helmut Horacek. A flexible shallow approach to text generation. In Eduard Hovy, editor, Nineth International Natural Language Generation Workshop. Proceedings, Niagara-on-the-Lake, Canada, 1998.

[Busemann et al., 1997] Stephan Busemann, Thierry Declerck, Abdel Kader Diagne, Luca Dini, Judith Klein, and Sven Schmeier. Natural language dialogue service for appointment scheduling agents. In Proc. 5th Conference on Applied Natural Language Processing, pages 25–32, Washington, DC., 1997.

[Busemann, 1996] Stephan Busemann. Best-first surface realization. In Donia Scott, editor, Eighth International Natural Language Generation Workshop. Proceedings, pages 101–110, Herstmonceux, Univ. of Brighton, England, 1996. Also available at the Computation and Language Archive at

  http://xxx.lanl.gov/abs/cmp-lg/9605010.

[Davis and King, 1977] Randall Davis and Jonathan King. An overview of production systems. In E. W. Elcock and D. Michie, editors, Machine Intelligence 8, pages 300–332. Ellis Horwood, Chichester, 1977.

[Horacek and Busemann, 1998] Helmut Horacek and Stephan Busemann. Towards a methodology for developing application-oriented report generation. In Andreas Günter and Otthein Herzog, editors, 22nd German Conference on Artificial Intelligence (KI-98). Proceedings, Bremen, Germany, 1998.

[Wein, 1996] Michael Wein. Eine parametrisierbare Generierungskomponente mit generischem Backtracking. Master’s thesis, Department for Computer Science, University of the Saarland, 1996.