Skip to main content icon/video/no-internet

Natural Language Generation

Natural language generation (NLG) systems are computer software systems that automatically generate texts in a human language (English, French, Chinese, etc.) from nonlinguistic input data, using techniques from computational linguistics and artificial intelligence. This entry gives a brief overview of NLG from the perspective of the choices that NLG systems must make, using examples from the specific NLG task of generating weather forecasts.

A number of NLG systems have been built that automatically generate textual weather forecasts. These systems take as input a set of numbers that predict temperature, precipitation, wind speed, and other meteorological parameters at different locations at various time periods. These numbers are usually produced by a supercomputer that is running a numerical weather simulation model. From this input, the NLG system produces a textual weather forecast that is targeted to the needs of a particular user group; for example, an Arabic text that summarizes marine weather in the Persian Gulf for offshore oil rig workers or an English text that summarizes road icing conditions for local government staff who must decide whether salt and grit should be put on roads.

NLG can largely be regarded as a process of making choices. There are usually thousands if not millions of possible texts that could be produced from a particular data set. For example, consider the temperature prediction data set in Table 1. A number of texts could be generated from this data, including the following:

Table 1 Example weather input data for an NLG system
TimeTemperature (°C)
000010
030011
060012
090015
120016
150015
180014
210012
  • “Tomorrow will be a cool day.”
  • “Temperatures increasing from 10 at midnight to 16 at noon, then falling back to 12 at the end the period.”
  • “Chilly nighttime temperatures will rise to a comfortable 15 degrees by morning. Temperatures will stay at about this level throughout the day, before falling to 12 degrees in the evening.”

Deciding which text to generate requires making several kinds of decisions:

  • Content: What information should be presented in the text? In the above example, for instance, should the system simply give an overall summary (as in Example 1), or describe how temperature changes throughout the day? In general, an NLG system can communicate only part of the information available to it. Indeed, in some weather applications, the NLG system is expected to generate a few sentences of text from 30 megabytes (!!) of input data. The decision on what to communicate is usually based on a model of what is important and significant to the user and often uses artificial intelligence reasoning techniques such as knowledge-based systems.
  • Structure: How should the information be structured? In Example 3 above, for instance, should this information be communicated in two sentences (as in the texts shown), or should a single sentence be used? More generally, what order should information be presented in and how should information be grouped into sentences, paragraphs, and other document structures? In theory this can be based on linguistic models of document structure; for example, if the NLG system is producing a story, then it should use a narrative structure (e.g., generally order events by the time they occurred at). But in practice, structure is often determined by the genre; this is usually the case for weather forecasts, for example.
  • Lexical and syntactic choice: Which words should be used to communicate domain concepts? For example, if temperature is going up, should this be lexicalized as rising or increasing? Similarly, what syntactic structures should be used; for example, should we use simple active voice sentences (as in Example 1), gerund-based sentences (as in Example 2), or some other structure, such as passive voice? In theory, it would be nice to make many of these choices on the basis of psycholinguistic models of reading comprehension, but unfortunately current psycholinguistic models are often not detailed and robust enough to support this.
  • Reference: How should domain objects and entities be referred to? For example, should we refer to the time 2100 as end of period or evening? If referring to a previously mentioned object, should we use a pronoun or a definite noun phrase? NLG researchers have developed a number of algorithms for making reference choices, and these appear to work well in many cases, but many areas are underexplored. For example, we have reasonably good models for deciding when to use pronouns but much less satisfactory models for deciding how to refer to times.

The above decisions can be made in a number of ways. The most common approach is to manually write decision rules, usually based on a combination of (psycho)linguistic theory, corpus analysis of human-authored texts, and discussions (or more formal knowledge elicitation sessions) with domain experts. However, recently, there has been growing interest in trying to learn decision rules automatically, by using machine learning techniques that automatically analyze large corpora (collections) of human-written texts and attempt to infer from the texts the decision rules used by the human writers who created these texts. Such machine learning approaches have been very successful in other areas of natural language processing, such as machine translation.

...

  • Loading...
locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading