NLP vs NLU vs NLG (Know what you are trying to achieve) NLP engine (Part-1)
Difference between NLP, NLU, NLG and the possible things which can be achieved when implementing an NLP engine for chatbots.
It is quite common to confuse specific terms in this fast-moving field of Machine Learning and Artificial Intelligence. The above is the same case where the three words are interchanged as pleased.
Now let us get down with three words:
- NLP — Natural Language “Processing”
- NLU — Natural Language “Understanding”
- NLG — Natural Language “Generation”
If I need to say it in a mathematical way it could be said as the combination of NLU and NLG will result in an NLP engine that works.
NLU is the understanding the meaning of what the user or the input which is given means. That is nothing but the understanding of the text given and classifying it into proper intents.
Let us take an example here: “Can I play cricket today”
What should your NLP engine do??
Here the user intention is playing cricket but however, there are many possibilities that should be taken into account. One of the dependency would be of “Checking the weather outside”.
If it is raining outside since cricket is an outdoor game we cannot recommend playing right??? as you can see we need to get it into structured data here so what do we do we make use of intent and entities.
Intents:
Intents are nothing but verbs(activities that the user needs to do). If we want to capture a request, or perform an action, use an intent. In the example play is the intent.
Entities:
Entities are the nouns or the content for the action that needs to be performed. In this case, cricket is a noun.
It is possible to have multiple intents(like checking the weather, checking ground available, checking friends availability) for a single entity playing and also multiple entities for intent and multiple intents for multiple entities.
And also the intents and entity change based on the previous chats check out below.
Step1: “Entity” — “Cricket” and “Intent” — “Play”
Step2: “Entity” — “Football” and “Intent” — “Play”
Step3: “Entity” — “Football” and “Intent” — “Watch”
See how the Entities and Intents varies based on previous chats.
How the three of them work in hand in hand:
- NLU takes up the understanding of the data based on grammar, the context in which it was said and decide on intent and entities.
- NLP will convert the text into structured data.
- NLG generates text generated based on structured data.
NLU and NLG are the subsets of NLP engine
More references:
- Artificial Intelligence real or is it just a hype of this decade??
- Artificial Intelligence: Definition, Types, Examples, Technologies
- Artificial Intelligence vs Machine Learning
- Why Machine learning for achieving Artificial Intelligence? “ The Need for Machine Learning”
- Machine Learning Types and Algorithms
- Linear Regression Part -1
- Linear Regression Part -2(example implementation)
Make sure to follow me on medium, linkedin, twitter, Instagram to get more updates. And also if you liked this article make sure to give a clap and share it.
Join our WhatsApp community here.