This article is from easyAI – Knowledge base of artificial intelligence
Understanding Natural Language Generation – NLG (6 Implementation Steps +3 Typical Applications)
Natural Language generation – NLG is an important part of NLP. Its main purpose is to reduce the communication gap between human and machine, and convert non-verbal data into a language format that human can understand.
In addition to the basic concepts of NLG, this article also introduces the three levels, six steps, and three typical applications of NLG.
What is NLG?
NLG is part of NLP
NLP = NLU + NLG
Natural language generation – NLG is an important part of NLP. The NLU is responsible for understanding the content and the NLG is responsible for generating the content.
In the case of smart speakers, when a user says “What time is it? First, you need to use NLU technology to determine the user’s intention and understand what the user wants. Then, you need to use NLG technology to say, it is 6:50.
Natural Language Generation – What is NLG?
NLG is designed to bridge the communication gap between humans and machines by converting data from non-verbal formats, such as articles and reports, into language formats that humans can understand.
Natural language Generation – NLG comes in two ways:
- Text-to-text: text-to-language generation
- Data-to-text: data to language generation
NLG has three levels
** Simple data merging: ** A simplified form of natural language processing, which will allow data to be converted to text (via Excel like functions). For correlation, take the example of a MS Word Mailmerge, where gaps are filled with data retrieved from another source, such as a table in MS Excel.
Templated NLG: This form of NLG uses template-driven mode to display output. Take the football scoreboard for example. Data keeps changing dynamically and is generated by a predefined set of business rules, such as if/else loop statements.
Advanced NLG: This form of natural language generation is just like humans. It understands intent, adds intelligence, considers context, and presents the results in an insightful narrative that users can easily read and understand.
NLG’s 6 steps
Step 1: Content Determination
As a first step, the NLG system needs to decide what information should and should not be included in the text being built. Often the data contains more information than is ultimately conveyed.
Step 2: Text Structuring
After determining what information needs to be communicated, the NLG system needs to organize the text in a reasonable order. For example, when reporting a basketball game, they will give priority to “what time”, “where” and “which 2 teams”, then “overview of the game”, and finally “the end of the game”.
Step 3: Sentence Aggregation
Not every piece of information needs to be expressed in a single sentence, and combining multiple pieces of information into one sentence may be more fluid and easier to read.
Step 4: Grammaticalisation – Lexicalisation
When the content of each sentence is determined, the information can be organized into natural language. This step adds connectives between the various pieces of information to make it look more like a complete sentence.
Step 5: reference Expression – Referring Expression Generation | REG
This step is similar to grammaticalization, where words and phrases are selected to form a complete sentence. The essential difference from grammaticalization, however, is that “a REG needs to identify the domain of the content and then use the vocabulary of that domain, not other domains.”
Step 6: Linguistic Realisation
Finally, when all the related words and phrases have been identified, they need to be combined to form a well-formed complete sentence.
Three typical applications of NLG
However NLG is used, most of it serves three purposes:
- Capable of generating personalized content on a large scale
- To help humans gain insight into data and make it easier to understand
- Accelerating content production
Here are some typical applications:
Automatic news writing
There are obvious rules in some areas of journalism, such as sports. A lot of news is already done by NLG.
Tencent robot writes thousands of articles every day. The news you read may be written by AI.
Chatbot
Everyone knows chatbots started with Siri, and in recent years there’s been a boom in smart speakers.
In addition to the familiar areas of everyday life, customer service jobs are being replaced by robots, even some telephone customer service jobs.
The customer service you’re Talking to is a robot!
BI interpretation and report generation
Almost every industry has its own statistical and analytical tools. These tools can produce a variety of charts, but the output of conclusions and opinions is still human. One of the most important applications of NLG is to interpret this data and automatically output conclusions and opinions. (As shown below)
conclusion
Natural Language generation – NLG is an important part of NLP. Its main purpose is to reduce the communication gap between human and machine, and convert non-verbal data into a language format that human can understand.
NLG has three levels:
- Simple data merge
- Modular NLG
- Senior NLG
NLG’s 6 steps:
- Content Determination – Content Determination
- Text Structuring
- Sentence Aggregation
- Grammaticalisation – Lexicalisation
- Reference Expression – Referring Expression Generation | REG
- Language Realisation – Linguistic Realisation
NLG applications serve three purposes:
- Capable of generating personalized content on a large scale
- To help humans gain insight into data and make it easier to understand
- Accelerating content production
Three typical NLG applications:
- Automatic news writing
- Chatbot
- BI interpretation and report generation