Ai Unit 4
Ai Unit 4
What is NLP?
NLP stands for Natural Language Processing. It is the branch of
Artificial Intelligence that gives the ability to machine understand
and process human languages. Human languages can be in the
form of text or audio format.
It helps developers to organize knowledge for performing tasks
such as translation, automatic summarization, Named
Entity Recognition (NER), speech recognition, relationship
extraction, and topic segmentation.
History of NLP
Heuristics-Based NLP:
Artificial Intelligence unit 4
Components of NLP
There are two components of Natural Language Processing:
Natural Language Understanding
Natural Language Generation
Applications of NLP
The applications of Natural Language Processing are as follows:
Text and speech processing like-Voice assistants – Alexa,
Siri, etc.
Text classification like Grammarly, Microsoft Word, and
Google Docs
Information extraction like-Search engines like
DuckDuckGo, Google
Chatbot and Question Answering like:- website bots
Language Translation like:- Google Translate
Text summarization
NLP Libraries
NLTK
Spacy
Gensim
fastText
Stanford toolkit (Glove)
Apache OpenNLP
Advantages of NLP
o NLP helps users to ask questions about any subject and get a direct
response within seconds.
o NLP offers exact answers to the question means it does not offer
unnecessary and unwanted information.
Artificial Intelligence unit 4
o NLP helps computers to communicate with humans in their
languages.
Disadvantages of NLP
A list of disadvantages of NLP is given below:
o NLP is unpredictable
Context-Free Grammar
Artificial Intelligence unit 4
And the left-hand side of the G, here in the example, can only
be a Variable, it cannot be a terminal.
But on the right-hand side here it can be a Variable or Terminal
or both combination of Variable and Terminal.
For example, the grammar A = { S, a, b } having productions:
Here S is the starting symbol.
{a, b} are the terminals generally represented by small
characters.
S is the variable.
but
Lets consider the string “aba” and and try to derive the given
grammar from the productions given. we start with
symbol S, apply production rule S->bSa and then S->aS (S-
>a) to get the string “aba”.
Artificial Intelligence unit 4
Text Classification
In-Text Classification, our aim is to label the text according to the
insights we intend to gain from the textual data.
For example:
In Sentiment Analysis, .
In Topic Classification,
In Intent Classification,
Text Extraction