Natural Language Processing, Natural Language Understanding, and Natural Language Generation.
NLP, NLU, NLG - what's the difference?
Allow me to demonstrate.
Now, what I just did there is, well, by writing a story,
I performed an example of natural language generation.
And if you're now peering at the screen reading it,
or even just trying to understand and make sense of what I'm saying right now.
You're participating in natural language understanding.
And together you and I are both performing subsets of the overall collective of natural language processing.
So NLU, and NLG.
They're both subsets of NLP.
But we're missing one quite important point here.
The natural language processing stuff that we're interested in today is performed by computers, not humans.
So when we use these terms, what do we really mean?
And how can these models be put to work?
Well, NLP enables computers to understand human language in both written and verbal forms,
using deep learning techniques to complete tasks.
Typical examples for that are things like language translation, or conducting a conversation in a chat bot.
Now it does this through the identification of named entities, which is a process called "named entity recognition"
and identification of word patterns using methods like tokenization, stemming and limitation.
And I've covered some of this in a previous video about NLP, so we won't go over that in detail here.
Let's focus instead on these two things: natural language understanding and natural language generation.
So natural language understanding uses syntactic and semantic analysis of text and speech to determine the meaning of a sentence.
Unlike structured computer code, our unstructured messy human language has all sorts of nuances that NLU needs to account for.
So let's take a look at a couple of examples.
I'm going to come with some sentences here.
So like, "Alice is swimming against the current".
This is a sentence that we could feed into an NLU algorithm and ask it to really make sense of it.
Another example, "The current version of the file is in the cloud".
So that's two sentence examples. Let's take a closer look at trying to make some sense of these.
So we've got the word "current" here in this first sentence.
The word "current" is a noun and that's preceded by verb.
The verb here is "swimming".
Together, that provides additional context to the reader,
allowing us to conclude that we are referring to the flow of water in the ocean when we talk about current in this situation.
In the second example, here's the word "current", and this time it's an adjective, and the noun it describes is "version".
So that denotes that we've got multiple iterations of a report,
and here current is implying that we have the most up-to-date status of the file.
So, two completely different meanings for "current".
And understanding the relationships between words and phrases is what NLU is really all about,
and enables us to derive the intended meaning of a sentence.
Now, while NLU is all about improving a computer's reading comprehension,
NLG, or natural language generation, focuses on enabling computers to write.
It's the process of producing a human language text response based on some data input.
NLG applications need to consider language rules based on morphology, lexicons, syntax and semantics to make choices on how to phrase responses appropriately.
Now, NLG typically consists of three stages. So if you look at NLG, the first stage is text planning.
And text planning formulates the orders and the content in a logical manner.
Similarly, we have a sentence planning.
And sentence planning considers things like punctuation
and text flow, and breaks out the content into paragraphs and sentences.
And then the third stage is called realization.
And realization ensures we're playing correctly by the rules of grammar that,
for example, we know that the past tense of the verb "run" is actually "ran" and not "runned".
Yeah, that's not right.
So NLG is enabled by a variety of machine learning models to perform this stuff,
and that includes things like hidden Markov chains, recurrent neural networks, and transformers.
Look, natural language processing and its subsets NLU and NLG
have numerous practical applications, from health care diagnosis to online customer service.
Oh, and another way you can use these is, hey, lightboard videos.
In fact, I asked an NLG algorithm to write me a sentence to conclude this talk.
And it said "Natural language processing is amazing and has many practical applications
like me".
Thanks NLP algorithm!
If you have any questions, please drop us a line below.
And if you want to see more videos like this in the future, please like and subscribe.
Thanks for watching.