Learning Library

← Back to Library

NLU vs NLG: NLP Explained

Key Points

  • NLP (natural language processing) is the umbrella term for computer techniques that let machines read, understand, and generate human language, encompassing both NLU (understanding) and NLG (generation).
  • NLU focuses on syntactic and semantic analysis to infer meaning from unstructured text, such as disambiguating the word “current” as a noun in “Alice is swimming against the current” versus an adjective in “The current version of the file is in the cloud.”
  • NLG is the complementary process where a system produces coherent language, exemplified by the speaker writing a story to illustrate text generation.
  • Core NLP methods that enable NLU and NLG include tokenization, stemming, lemmatization, and named entity recognition, all powered by deep‑learning models.
  • Practical applications of NLP range from language translation to conversational chatbots, turning raw human language into actionable, machine‑readable formats.

Full Transcript

# NLU vs NLG: NLP Explained **Source:** [https://www.youtube.com/watch?v=1I6bQ12VxV0](https://www.youtube.com/watch?v=1I6bQ12VxV0) **Duration:** 00:06:49 ## Summary - NLP (natural language processing) is the umbrella term for computer techniques that let machines read, understand, and generate human language, encompassing both NLU (understanding) and NLG (generation). - NLU focuses on syntactic and semantic analysis to infer meaning from unstructured text, such as disambiguating the word “current” as a noun in “Alice is swimming against the current” versus an adjective in “The current version of the file is in the cloud.” - NLG is the complementary process where a system produces coherent language, exemplified by the speaker writing a story to illustrate text generation. - Core NLP methods that enable NLU and NLG include tokenization, stemming, lemmatization, and named entity recognition, all powered by deep‑learning models. - Practical applications of NLP range from language translation to conversational chatbots, turning raw human language into actionable, machine‑readable formats. ## Sections - [00:00:00](https://www.youtube.com/watch?v=1I6bQ12VxV0&t=0s) **Distinguishing NLP, NLU, and NLG** - The speaker explains that natural language processing encompasses computer‑based tasks, with natural language understanding and generation as its two main sub‑areas, and outlines key techniques like tokenization, stemming, lemmatization and named‑entity recognition. ## Full Transcript
0:00natural language 0:03processing 0:06natural language 0:08understanding 0:12and natural language 0:14generation 0:17n l p 0:19n l u 0:21n l g 0:23what's the difference 0:26allow me to demonstrate 0:38now look what i just did there is well 0:41by writing a story 0:43i performed an example of 0:45natural language generation and if 0:48you're now peering at the screen reading 0:50it or even just and trying to understand 0:52and make sense of what i'm saying right 0:54now 0:55you're participating in natural language 0:58understanding and together you and i are 1:02both performing subsets of the overall 1:04collective of 1:05natural language 1:07processing so 1:09n l 1:11u 1:13and n l 1:15g 1:17they're both subsets of n 1:20l 1:21p 1:24but we're missing one quite important 1:27point here the natural language 1:29processing stuff that we're interested 1:31in today is performed by 1:32computers not humans so when we use 1:36these terms what do we really mean and 1:39how can these models be put to work well 1:42nlp enables computers to understand 1:45human language in both written and 1:46verbal forms using deep learning 1:48techniques to complete tasks typical 1:51examples for that are things like 1:53language translation or conducting a 1:55conversation in a chat bot 1:57now it does this through the 1:59identification of named entities which 2:01is a process called named entity 2:03recognition 2:05and identification of word patterns 2:07using methods like tokenization stemming 2:09and lemmatization and i've covered some 2:12of this in a previous video about nlp so 2:14we won't go over that in detail here 2:16let's focus instead on these two things 2:18natural language understanding and 2:20natural language generation 2:22so natural language understanding 2:25uses syntactic and semantic analysis of 2:29text and speech to determine the meaning 2:31of a sentence 2:33unlike structured computer code our 2:36unstructured messy human language has 2:38all sorts of nuances that nlu needs to 2:42account for so let's take a look at a 2:46couple of examples i'm going to cover 2:48some sentences here so like alice 2:51is swimming 2:55against the current 2:58this is a sentence that we could feed 3:02into an nlu algorithm and ask it to 3:05really make sense of it 3:07another example 3:09the current 3:12version 3:16of the file 3:20is in the cloud 3:24so that's two sentence examples let's 3:27take a closer look at trying to make 3:28some sense of these so we've got the 3:30word current here in this first sentence 3:33the word current is a noun and that's 3:35preceded by a verb the verb here is 3:38swimming together that provides 3:40additional context to the reader 3:42allowing us to conclude that we are 3:44referring to the flow of water in the 3:47ocean when we talk about current in this 3:48situation in the second example here's 3:51the word current 3:53and this time it's an adjective and the 3:56noun it describes 3:57is version 3:59so that denotes that we've got multiple 4:02iterations of a report and here current 4:05is implying that we have the most 4:07up-to-date status of the file 4:09so two completely different meanings for 4:12current 4:13and understanding the relationships 4:15between words and phrases is what nlu is 4:18really all about and enables us to 4:20derive the intended meaning of a 4:23sentence 4:24now while nlu is all about improving a 4:28computer's reading comprehension 4:30nlg or natural language generation 4:33focuses on enabling computers to write 4:36it's the process of producing a human 4:39language text response based on some 4:41data input 4:43nlg applications need to consider 4:46language rules based on morphology 4:48lexicons syntax and semantics to make 4:51choices on how to 4:52phrase responses appropriately 4:56now nlg typically consists of three 4:59stages so if we look at nlg 5:02the first stage is text 5:05planning 5:08and text planning formulates the orders 5:11and the content in a logical manner 5:14similarly we have sentence 5:17planning 5:20and sentence planning considers things 5:22like punctuation and text flow and 5:25breaks out the content into paragraphs 5:26and sentences and then the third stage 5:29is called 5:30realization 5:33and realization ensures we're playing 5:35correctly by the rules of grammar that 5:37for example we know that the past tense 5:39of the verb run 5:42is 5:43actually ran 5:44and not 5:45runned 5:46yeah that's that's not right 5:50so nlg is enabled by a variety of 5:53machine learning models to perform this 5:55stuff and that includes things like 5:56hidden markov chains recurrent neural 5:59networks and transformers 6:02look natural language processing and its 6:04subsets nlu and nlg have numerous 6:08practical applications from healthcare 6:10diagnosis to online customer service 6:14oh and another 6:16way you can use these is in 6:18hey lightboard videos in fact i asked an 6:20nlg algorithm to write me a sentence to 6:23conclude this talk 6:26and it said 6:28natural language processing is amazing 6:30and has many practical applications 6:33like me 6:35thanks nlp algorithm 6:38if you have any questions please drop us 6:40a line below and if you want to see more 6:42videos like this in the future please 6:44like and subscribe 6:46thanks for watching