Semantic Expressions: An Experiment

Michael Levison, Greg Lessard, Ben Gottesman, Michael Stringer.


A system for generation natural language text may be thought of as including three components:

(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.).

Treasure Sentences

Among the treasure sentences we find:

  1. There are bars of silver here.
  2. A small velvet pillow lies on the floor.
  3. On the ground lies a small glass vial filled with an oily liquid.
  4. There is a Persian rug spread out on the floor.
  5. There is a small wicker cage discarded nearby.
  6. There is a jewel-encrusted trident here.
  7. The chain is now unlocked.
  8. Your bottle is now full of oil.

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:

    There is a W here.
    An X lies on the floor.
    There is a Y discarded nearby.

and these can be captured by a set of context-free rules. Possible sentences in French may be:

    Ici se trouve un W.
    Un X se trouve sur le plancher.
    On a laissé un Y à proximité.

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:

    bars of silver
    small velvet pillow
    small glass vial
    jewel-encrusted trident

have attribute-values: silver, pillow, vial, trident, ...

and there are corresponding lexical entries:

    "bars of silver"|N|silver, plur|...
    "silver bars"|N|silver, plur|...
    "velvet pillow"|N|pillow, small, sing|...
    "vial"|N|vial, small, glass|...
    "trident"|N|trident, sing|...

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:

    vial filled with an oily liquid
    bottle of water
    nest full of golden eggs
    jewel-encrusted trident
    sceptre, ornately encrusted with sapphires
    toy yacht, totally covered with rubies

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:

    ruby-encrusted bowl filled with golden eggs:   fl(cr(bowl, ruby), egg)
    bowl filled with golden eggs encrusted with rubies:   fl(bowl, cr(egg, ruby))

(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, which is a compound attribute in the VINCI system.)

Other classes of sentence are dealt with similarly. For example passage- sentences:

    A cold wind blows out of a tunnel leading to the southeast.
    A cylindrical tube composed of hardened lava leads south.
    A dark passage leads up and to the south, and a wide but low crawl leads north.

can be captured by:

    psg(tunnel, southeast, windy, null)
    psg(tube, south, lava, null)
    psg(pass, upsouth, dark, null)
    psg(crawl, north, wide, low)

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:

    join(psg(pass, upsouth, dark, null), psg(crawl, north, wide, low))

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.

An Example

As an example illustrating textual variation and multilingual generation, consider the sequence of expressions:

    cavename(which(pit, north, twopit))
    cavedesc(fl(desc(chamber, dark), rocks))
    psg(crack, west, narrow, null)
    psg(steps, up, null, null)
    presence(fl(nest, cr(eggs, ruby)))
    say(troll, plugh)

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:

    vtdi(troll, give, sword, pirate)

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:

    The troll gives a sword to the pirate.


    The pirate is given a sword by the troll.

but also as:

    The troll gave swords to some pirates.

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:

    vtdi(troll[plur], give[past, neg], sword, pirate[def, bearded, sing])


    The trolls didn't give swords to the bearded pirate.

or some grammatical equivalent.

Further work

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

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

Mann, William (2001). RST Web Site. (

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

Reiter, Ehud; Dale, Robert (2000). Building Natural Language Generation Systems. Cambridge: Cambridge University Press.