Unit 5 NLP
Unit 5 NLP
AI
NATURAL LANGUAGE PROCESSING
Natural Language Processing
• It refers to AI method of communicating with an intelligent systems using a natural language
such as English.
• Processing of Natural Language is required when you want an intelligent system like robot to
perform as per your instructions, when you want to hear decision from a dialogue based
clinical expert system
• The field of NLP involves making computers to perform useful tasks with the natural
languages humans use.
• The input and output of an NLP system can be −
•Speech
•Written Text
Two Components of NLP…..
Natural Language Understanding (NLU)
Mapping the given input in natural language into useful representations.
Analyzing different aspects of the language.
involves −
• Text planning − Retrieving the relevant content from knowledge base.
• Sentence planning − Choosing required words, forming meaningful phrases, setting tone of
the sentence.
• Text Realization − mapping sentence plan into sentence structure.
NLU is difficult as compared to NLG
NL has an extremely rich form and structure.
It is very ambiguous. There can be different levels of ambiguity −
•Semantic Analysis − Draws the exact meaning or the dictionary meaning from
the text. The text is checked for meaningfulness. It is done by mapping syntactic
structures and objects in the task domain. The semantic analyzer disregards
sentence such as “hot ice-cream”.
These rules say that a certain symbol may be expanded in the tree by a sequence of
other symbols. According to first order logic rule, if there are two strings Noun Phrase
(NP) and Verb Phrase (VP), then the string combined by NP followed by VP is a
sentence. The rewrite rules for the sentence are as follows −
Merits and Demerits of Context-free
grammar
Merit − Simplest style of grammar, therefore widely used one.
Demerits −
•They are not highly precise. For example, “The grains peck the bird”, is a
syntactically correct according to parser, but even if it makes no sense,
parser takes it as a correct sentence.
•To bring out high precision, multiple sets of grammar need to be prepared.
It may require a completely different sets of rules for parsing singular and
plural variations, passive sentences, etc., which can lead to creation of huge
set of rules that are unmanageable.
Merits and Demerits of Parse Tree (Top-
down Parser)…
Parser starts with the S symbol and attempts to rewrite it into a sequence of terminal
symbols that matches the classes of the words in the input sentence until it consists
entirely of terminal symbols.
These are then checked with the input sentence to see if it matched. If not, the process is
started over again with a different set of rules. This is repeated until a specific rule is
found which describes the structure of the sentence.