NLP is a tool for computers to analyse, comprehend, and derive meaning from natural language in an intelligent and useful way. Natural language processing helps computers communicate with humans in their own language and scales other language-related tasks.
Unblocking The Main Thread Solving ANRs and Frozen Frames
Understanding Natural Language Processing
1. Natural Language Processing
Manjusha Amritkar
Information Technology
International Institute of Information Technology, I²IT
www.isquareit.edu.in
2. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
What is NLP
NLP is not Just About Creating Intelligent bots…
NLP is a tool for computers to analyse, comprehend, and derive meaning from
natural language in an intelligent and useful way
By using NLP, developers can organize and structure the mass of unstructured
data to perform tasks such as intelligent:
3. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Components of NLP
4. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Natural Language Understanding
5. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Natural Language Generation
It is the process of producing meaningful phrases and
sentences in the form of natural language from some internal
representation.
It involves −
Text planning − It includes retrieving the relevant content
from knowledge base.
Sentence planning − It includes choosing required words,
forming meaningful phrases, setting tone of the sentence.
Text Realization − It is mapping sentence plan into sentence
structure.
6. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Phases of NLP
7. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Parsing: recognising higher level units of structure
that allow us to compress our description of a
sentence
Goal of syntactic analysis (parsing):
• Detect if a sentence is correct
• Provide a syntactic structure of a sentence
Syntactic Analysis
8. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Parsers today
• CFG (extended or not)
• Tabular
• Charts
• LR
• Unification-based
• Statistical
• Dependency parsing
• Robust parsing (shallow, fragmental, chunkers, spotters)
Parsing
9. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Definition − A context-free grammar (CFG) consisting of a
finite set of grammar rules is a quadruple (N,Σ, R,S) where
N is a set of non-terminal symbols.
Σ is a set of terminals.
R is a set of rules
S is the start symbol.
Context Free Grammars (CFGs)
10. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Context Free Grammars (CFGs)
11. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Context Free Grammars (CFGs)
Parse the sentence “the cat eats fish”
the (det) cat(n) eats(vt,vi) fish(n)
12. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Semantic Analysis
13. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Semantic Analysis is a subfield of Natural Language Processing
(NLP) that attempts to understand the meaning of Natural
Language.
Semantic Analysis of Natural Language captures the meaning
of the given text while taking into account context, logical
structuring of sentences and grammar roles.
Introduction
14. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
• Lexical Semantic Analysis:
Understanding the meaning of each word of the text
individually
• Compositional Semantics Analysis:
To understand how combinations of individual words form
the meaning of the text.
Parts of Semantic Analysis
15. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
• Word sense disambiguation:
The ability of a machine to overcome the ambiguity involved in
identifying the meaning of a word based on its usage and context is
called Word Sense Disambiguation. e.g Orange
• Relationship extraction.
It involves firstly identifying various entities present in the
sentence and then extracting the relationships between those entities.
e.g. Steve Jobs is the founder of Apple, which is headquartered in
California
Task involved in Semantic Analysis
16. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
• Hyponymy
It represents the relationship between a generic term and
instances of that generic term. Here the generic term is known as
hypernym and its instances are called hyponyms.
e.g. The word color is hypernym, and the colors blue, yellow,
green, etc. are hyponyms.
• Homonymy
It may be defined as the words having the same spelling or same
form but having different and unrelated meanings.
e.g. The word “Bat” is a homonymy word.
Elements of Semantic Analysis
17. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Elements of Semantic Analysis
Polysemy
It is a word or phrase with a different but related sense. In other
words, we can say that polysemy has the same spelling but different
and related meanings.
The word "Bank" is a Polysemy word.
• A financial institution.
• The building in which such an institution is located.
• a financial institution’ or
• ‘a river bank’.
In that case, it becomes an example of a homonym, as the meanings
are unrelated to each other.
18. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
•Entities − It represents the individual such as a particular person, location etc.
For example, Haryana. India, Ram all are entities.
•Concepts − It represents the general category of the individuals such as a
person, city, etc.
•Relations − It represents the relationship between entities and concept. For
example, Ram is a person.
•Predicates − It represents the verb structures. For example, semantic roles and
case grammar are the examples of predicates.
Building Blocks of Semantic System
19. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Linguistic grammar deals with linguistic categories like noun, verb,
etc. Semantic grammar, on the other hand, is a type of grammar
whose non-terminals are not generic structural or linguistic
categories like nouns or verbs, but rather semantic categories like
PERSON or COMPANY
Linguistic vs. Semantic
20. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Semantic Grammar
Regardless of the specific syntax of
configuration, the grammar is typically
defined as a collection of semantic entities
where each entity at the minimum has a
name and a list of synonyms by which this
entity can be recognized.
22. The International Institute of Information
Technology (I²IT)
https://www.isquareit.edu.in
info@isquareit.edu.in
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Thank-You