Introduction to Natural Language Generation

Srinidi
4 min readDec 28, 2020

--

Myself and my friend (Sangeetha) were told to explore on the topic of Surface realization for our class presentation. We found it very difficult to understand this at the first go. We spent a lot of time in understanding this topic. This is based on the reference given below. If you have gone through the book, this would just be a small walk through, while for those who haven’t, here is a small start to your big journey towards understanding the architecture of Natural Language Generation systems.

Recap

We are all aware that Natural Language Generation and Natural Language Understanding come under the wide umbrella of Natural Language Processing.

Relation between NLU, NLG and NLP

Just brushing through what NLG , NLU and NLP are :

  1. NLG ( Natural Language Generation ) is the process of constructing natural language outputs from non-linguistic inputs, ie producing text from structured data.
  2. NLU ( Natural Language Understanding ) involves breaking down human language into machine readable format, ie from text to meaning.
  3. NLP ( Natural Language Processing ), deals with the interaction between computers and humans using the natural language. The ultimate objective of NLP is to read, decipher, understand, and make sense of the human languages in a manner that is valuable.

Now that we know what each of the process is, we would be able to infer that NLG is easier than NLU since we can restrict the complexity of the text being produced, but we have no control over the complexity of the text that has been given to us.

Initially, we had canned texts, which were user programmed messages and template filling, where the document structure is the same, just certain aspects can be filled according to the recipients. Though this is more flexible compared to canned texts, it ain’t very useful in all situations.

Depending upon the environment and users different messages may have to be generated. So, we require generation system that must be able to produce an appropriate range of forms and choose the best one from among them that conveys the intended meaning.

Natural Language Generation

Considering NLG, there wouldn’t be any problem with the input since its well formed and non-ambiguous. The problem here would be about CHOICE!

As humans, we can easily analyse our situation and deliver the kind of message that would be expected. But making our system do so is the tough part here. The CHOICE includes the following:

Choices

In Content Selection, we are to choose the most appropriate content from the over specified input that is made available by basing our decision on the theme or the communicative goal in the given context.

On the other hand, Lexical Selection is about choosing the right lexical items, ie, the exact words to be used. Based on the intended meaning and users, we might want to use different, appropriate words. For example, when with a group of friends, we may use “Wassup?!” but this is not appropriate for a business environment.

Sentence Structure, has two parts to it.

  1. Aggregation : The selected content must be divided into sentence sized chunks so it can be framed into proper sentences.
  2. Referring expressions : The way we refer to the object of concern must be decided as well. For example , if there are some sentences centered around the topic “Cat”, in some of the sentences, we would refer to the cat by telling it name, in other by the word “cat” and maybe in some others by its gender.

When we are to deal with multiple sentences, we are to make sure that there is some flow or connectivity between them. This is handled by the Discourse Structure.

One of the Architectures for NLG system

Now, that we have an understanding of NLG, we are going to see a simple and well known architecture proposed for these systems.

Architecture for NLG system

This is not the only method. There are others like AI style planning, Black board architecture etc..

As in the picture, a discourse planner makes all the choices which are necessary by analyzing the communicative goal and utilizing the knowledge base.

The output of this process is the discourse specification which becomes the input to the next component, the surface realizer.

The output of the surface realizer is the final, required output. This might not be 100% accurate but works very well.

Though its a great approach, there are some disadvantages to this as well.

  1. The decisions made in the discourse planner are not reconsidered or checked for correctness in the surface realizer.
  2. The precise boundary between the discourse planner and the surface realizer is not very clear.

So, that’s about the Introduction to Natural Language Generation and an architecture for NLG system.

Reference

http://www.deepsky.com/~merovech/voynich/voynich_manchu_reference_materials/PDFs/jurafsky_martin.pdf

This article is based on the above book . We referred this book for our understanding.

By : Srinidi V and Sangeetha V D

--

--

Srinidi

Always up for new learning. Diligent student. Jack of all trades and master of some.