NLP Introduction
NLP Introduction
3/10/2022
Text is everywhere!
Social media
3/10/2022
Text is everywhere!
Research papers, news, etc.
3/10/2022
Diversity of Languages (Worldwide)
1Source: https://www.ethnologue.com/guides/how-many-languages
3/10/2022
Diversity of Languages (Worldwide)
1Source: https://www.ethnologue.com/guides/how-many-languages
3/10/2022
Diversity of Languages (Worldwide)
1Source: https://www.ethnologue.com/guides/how-many-languages
3/10/2022
Diversity of Languages (Worldwide)
1Source: https://www.ethnologue.com/guides/how-many-languages
3/10/2022
Diversity of Languages (India)
Hindi: 57.1%
English: 10.6%
Bengali: 8.9%
Marathi: 8.2%
Telugu: 7.8 %
...
...
3/10/2022
The goals of NLP
3/10/2022
The goals of NLP
3/10/2022
The goals of NLP
3/10/2022
The goals of NLP
Goals of NLP
Deep understanding of broad language constructs.
Achieve human-like comprehension of texts/languages.
Make computer systems to understand, draw inferences from,
summarize, translate and generate accurate and natural human text and
language.
3/10/2022
Some Applications: Language Translation
3/10/2022
Language Translation
3/10/2022
Language Translation is not easy even for humans
3/10/2022
Language Translation is not easy even for humans
3/10/2022
Some more examples...
3/10/2022
Query Recommendation in Search Engines
3/10/2022
Spelling Correction
3/10/2022
Information Extraction
3/10/2022
Sentiment Analysis
3/10/2022
Recent Trends: Fake news detection
3/10/2022
Recent Trends: Chatbots
3/10/2022
Other Goals
Text Summarization
Opinion dynamics
Spam detection
.. .
3/10/2022
Other Goals
Text Summarization
Opinion dynamics
Spam detection
.. .
3/10/2022
Why is NLP hard?
Compounding
195 characters (with 428 characters when transliterated into the roman writing
system).
3/10/2022
Why is NLP hard?
Ambiguity
3/10/2022
Why is NLP hard?
Ambiguity
3/10/2022
Why else is NLP hard?
Shorthand text
3/10/2022
Why else is NLP hard?
Non-standard English
3/10/2022
Why else is NLP hard?
Segmentation Issues
the New York New Haven Railroad
3/10/2022
Why else is NLP hard?
Segmentation Issues
the New York New Haven Railroad
the [New] [York New] [Haven] [Railroad]
the [New York] [New Haven] [Railroad]
3/10/2022
Why else is NLP hard?
Idioms
Dark horse
Ball in your court
Burn the midnight oil
3/10/2022
Why else is NLP hard?
Idioms : An expression whose meaning is different from the meanings of
the individual words in it.
Idioms Example
Dark horse
Ball in your court Burn the midnight oil
3/10/2022
Why is NLP hard?
3/10/2022
Why is NLP hard?
3/10/2022
Why is NLP hard?
3/10/2022
Why is NLP hard?
3/10/2022
What we do in NLP?
Create Models/Algorithms
LDA, BERT, CKY, Edit Distance, CRF++, etc.
Create Tools
CoreNLP, NLTK, Gensim, SpaCy, etc.
3/10/2022
Stages in NLP (traditional view)
Phonetics and phonology
Morphology
Lexical Analysis
Syntactic Analysis
Semantic Analysis
Pragmatics
Discourse
3/10/2022
Phonetics
• Processing of speech
• Challenges
• Homophones: bank (finance) vs. bank (river bank)
• Near Homophones: maatraa vs. maatra (hin)
• Word Boundary
• aajaayenge (aa jaayenge (will come) or aaj aayenge (will
come today)
• I got [ua]plate
• Phrase boundary
• mtech1 students are especially exhorted to attend as such
seminars are integral to one's post-graduate education
• Disfluency: ah, um, ahem etc.
3/10/2022
Morphology
• Word formation rules from root words
3/10/2022
Lexical Disambiguation
First step: part of Speech Disambiguation
Dog as a noun (animal)
Dog as a verb (to pursue)
Sense Disambiguation
Dog (as animal)
Dog (as a very detestable person)
Needs word relationships in a context
The chair emphasized the need for adult education
Very common in day to day communications
Satellite Channel Ad: Watch what you want, when you want
(two senses of watch)
e.g., Ground breaking ceremony/research
3/10/2022
Syntax Processing Stage
Structure Detection
VP
NP
V NP
I
like
mangoes
3/10/2022
Parsing Strategy
Driven by grammar
S-> NP VP
NP-> N | PRON
VP-> V NP | V PP
N-> Mangoes
PRON-> I
V-> like
3/10/2022
Challenges in Syntactic Processing: Structural Ambiguity
• Scope
1.The old men and women were taken to safe locations
(old men and women) vs. ((old men) and women)
2. No smoking areas will allow Hookas inside
3/10/2022
Structural Ambiguity…
Overheard
I did not know my PDA had a phone for 3 months
3/10/2022
Semantic Analysis
• Representation in terms of
Predicate calculus/Semantic
Nets/Frames/Conceptual Dependencies and
Scripts
3/10/2022
Pragmatics
• Very hard problem
• World knowledge
• WHY INDIA NEEDS A SECOND OCTOBER (ToI,
2/10/07)
3/10/2022
Discourse
• Processing of sequence of sentences
Mother to John:
John go to school. It is open today. Should you bunk?
Father will be very angry.
• Ambiguity of open
• bunk what?
• Why will the father be angry?
Complex chain of reasoning and application of world
knowledge
Ambiguity of father
father as parent
or
father as headmaster
3/10/2022
Reference Books
3/10/2022