Natural language generation (NLG)
NLG is a method of creating meaningful phrases and sentences (natural language) from data. It comprises three stages: text planning, sentence planning, and text realization.
- Text planning: Retrieving applicable content.
- Sentence planning: Forming meaningful phrases and setting the sentence tone.
- Text realization: Mapping sentence plans to sentence structures.
Ai Chatbots, machine translation tools, analytics platforms, voice assistants, sentiment analysis platforms, and AI-powered transcription tools are some applications of NLG.
Natural language understanding (NLU)
NLU enables machines to understand and interpret human language by extracting metadata from content. It performs the following tasks:
- Helps analyze different aspects of language.
- Helps map the input in natural language into valid representations.
NLU is more difficult than NLG tasks owing to referential, lexical, and syntactic ambiguity.
- Lexical ambiguity: This means that one word holds several meanings. For example, "The man is looking for the match." The sentence is ambiguous as ‘match’ could mean different things such as a partner or a competition.
- Syntactic ambiguity: This refers to a sequence of words with more than one meaning. For example, "The fish is ready to eat.” The ambiguity here is whether the fish is ready to eat its food or whether the fish is ready for someone else to eat. This ambiguity can be resolved with the help of the part-of-speech tagging technique.
- Referential ambiguity: This involves a word or a phrase that could refer to two or more properties. For example, Tom met Jerry and John. They went to the movies. Here, the pronoun ‘they’ causes ambiguity as it isn’t clear who it refers to.