Michael Levison, Greg Lessard, Ben Gottesman, Michael Stringer.
A system for generation natural language text may be thought of as including three components:
a knowledge base, which contains information about some world or domain of discourse,
a text planner, which determines the sequence of utterances which should be created, and
a linguistic realization engine which converts the knowledge embodied in each utterance into a grammatical sentence in the target language.
(See Reiter and Dale (2000) for discussion and examples. As Dale, Di Eugenio and Scott (1998) point out, there is probably also a zone of 'microplanning' at the borderline between paragraphs and sentences. Mann (2001) provides an overview of Rhetorical Structure Theory, a popular model for paragraph definition, and pointers to planning issues.)
The thread connecting the last two is typically a semantic representation which presents the content of an utterance in a form in which the grammatical constraints of any particular natural language has been abstracted away, leaving only some expression of meaning behind. In this paper we suggest a practical form for a semantic expression and explore it by applying it to a limited domain of discourse. Linguistic realization is carried out by the VINCI system (Levison and Lessard, 2001), which has been enhanced to allow semantic control. Semantic expressions are transformed into VINCI rules which, in their turn, yield sentences in some language. Inevitably, this expression is itself a syntactic form, but is abbreviated and (natural) language-independent. The same sequence of expressions can transformed into paragraphs in different languages or different paragraphs in the same language.
We do not consider here whether these expressions might underlie the knowledge base as well (as indeed they would in the examples below). We simply require that they form the output of the text planner. For multilingual examples, we also temporarily ignore the fact that rhetorical sequences created for one language might be inappropriate for another. (Bateman and Sharoff (1998) discuss several systems which link multilingual grammars and lexicons and the challenges which stem from multilinguality.)
The domain used for this study is the "interactive fiction" genre, specifically the well known collection of textual Adventure games. In these games, an adventurer moves from cave to cave. At each move, he/she is given a description of the environment taken from a fixed text file. Our study illustrates that these fixed files can be replaced by sequences of "semantic expressions" which allow suitable passages to be generated.
A "walkthrough" of Adventure-550 (Platt, 1979) obtained from the Web consists of a "verbose" transcript of a complete game. Every cave is visited and is described in full at each visit. From the first half, about 400 different sentences were extracted and divided into categories (passage, description, treasure, character, etc.).
Among the treasure sentences we find:
These sentences can be seen to express two concepts: presence (1 - 6) and status (7, 8).
(Clearly, this is a subset of the possibilities involved in generating referring expressions. Dale (1992) discusses problems associated with dynamically changing objects; Paris and McKeown (1987) discuss descriptions of complex physical objects.)
Suppose we represent the presence-concept by a VINCI attribute-value presence, and assume that each object can be designated by an attribute-value (or more generally, by a semantic expression) of its own. Then the presence-sentences can be denoted by:
where presence acts as a one-parameter function.
Presence can be realized in English in a variety of ways:
and these can be captured by a set of context-free rules. Possible sentences in French may be:
and so on.
Some of these sentences are object-dependent (it would be odd to say that a jewel-encrusted trident is spread on the floor), but this kind of restriction is easily mediated by the VINCI attribute system.
Treasures might be noun phrases with the physical-object attribute, constructed from individual words. In our limited domain, however, we have made them "nouns" in their own right, each with its own attribute- value. Thus:
have attribute-values: silver, pillow, vial, trident, ...
and there are corresponding lexical entries:
Some other arbitrary choices have been made. Each "noun" is designated singular or plural, rather than having both attributes. ("Bars of silver" never appears in the singular.) For similar reasons, we have captured adjectives like "small" and "shiny" by way of attribute-values, omitting them from the semantic description. The syntax can then insert them optionally into sentences.
Some objects are compound:
We therefore introduce further concepts: "filling" and "encrustation", which are assigned attribute values fl and cr respectively. These assume the role of binary functions. Objects are then denoted by semantic expressions like fl(vial, oilliq), fl(bottle, water), cr(trident, jewel), etc. More complex objects and their representations might be:
(A small technical point: in expressions involving only functions with constant numbers of parameters, parentheses are redundant except for human readability. Thus fl(cr(bowl, ruby), egg) may be written unambiguously as fl.cr.bowl.ruby.egg, which is a compound attribute in the VINCI system.)
Other classes of sentence are dealt with similarly. For example passage- sentences:
can be captured by:
where the last two parameters are optional descriptors.
The last sentence here actually combines two pieces of information and is described by two expressions. These might be combined in a single expression, such as:
This also suggests the possibility of an algebra for manipulating one or more semantic expressions into equivalent ones, thereby obtaining wider variation in the resulting texts.
As an example illustrating textual variation and multilingual generation, consider the sequence of expressions:
Using a simple VINCI English grammar, we get:
You are in the north pit of the Twopit Room. This is a dark chamber containing rocks. A narrow crack leads westward. There is a set of steps going up. A nest filled with rubies-encrusted golden eggs is nearby. A troll says 'Plugh'.
You find yourself in the north pit of the Twopit Room. You are in a dark chamber filled with rocks. There is a narrow crack exiting to the west. A set of steps leads upward. On the ground there is a large nest containing golden eggs ornately covered in rubies. A large troll mutters 'Plugh'.
The differences are small because there are few alternatives in the syntax. More complex syntax rules would give much greater variation. (There is also a small flaw in the syntax, which should have produced ruby-encrusted.)
A French grammar produces:
Vous êtes dans la fosse nord de la Chambre à Deux-Fosses. Vous êtes dans une pièce noire pleine de roches. Une fente étroite se dirige vers l'ouest. Il y a des marches ascendantes. À côté se trouve un nid rempli d'oeufs d'or couverts de rubis. Un grand troll dit "Plugh".
Vous vous trouvez dans la fosse nord de la Chambre à Deux-Fosses. C'est une pièce noire et pleine de roches. Il y a une fente étroite qui mène vers l'ouest. Il y a des marches ascendantes. Il se trouve par terre un grand nid rempli d'oeufs d'or ornés de rubis. Un troll dit "Plugh".
Almost all of the 400 sentences in the sample can be represented using only a few function-attributes.
In the sentences above, use of the present tense and fixed number-values for treasures conceal some deficiencies. Consider the semantic expression:
where vdti is a function-attribute which has an agent, an act and both direct and indirect objects as parameters. With a general grammar, this may be rendered as:
but also as:
Nothing in the semantic expression defines the number of the nouns, the nature of the articles, the tense of the verb, and so on. Thus VINCI is free to choose these randomly. We can in fact capture this information with additional function-attributes, replacing sword, pirate, etc. by expressions. This, however, leads to a very cumbersome expression. Instead, we permit attributes to be decorated with attribute attachments which the syntax can use to affect the sentence. Thus:
or some grammatical equivalent.
There is significant agreement among specialists in computer-aided language learning and testing of the importance of developing naturalistic environments. Textual frameworks such as that shown here offer one mechanism for providing such an environment. In the conference presentation, we will discuss in more detail how this link may be made.
Bateman, John; Sharoff, Serge (1998). Multilingual Grammars and Multilingual Lexicons for Multilingual Text Generation. In Working Papers of the ECAI'98 Workshop on Multilinguality in the Lexicon, Brighton, U.K., August 1998. (Available at http://www.sharoff.nm.ru/linguistics.html)
Dale, Robert (1992). Generating referring expressions : constructing descriptions in a domain of objects and processes. Cambridge, MA: MIT Press.
Dale, Robert; Di Eugenio, Barbara; Scott, Donia (1998). Introduction to the Special Issue on Natural Language Generation. Computational Linguistics 24/3: 345-353.)
Levison, Michael; Lessard, Greg (2001). VINCI Documentation. The most up-to-date description is at www.cs.queensu.ca/CompLing/
Mann, William (2001). RST Web Site. (http://www.sil.org/~mannb/rst/).
Paris, Cécile; McKeown, Kathleen (1987). Discourse strategies for describing complex physical objects. In (G. Kempen, ed.) Natural Language Generation. Dordrecht: Nijhoff, pp. 97-115.
Platt, David (1979). Platt seems to have been the author of this version of Adventure-550. The walkthrough, for which no author is named, was downloaded from www.rickadams.org/adventure/walk550.txt
Reiter, Ehud; Dale, Robert (2000). Building Natural Language Generation Systems. Cambridge: Cambridge University Press.