Introduction To Natural Language Processing
Introduction To Natural Language Processing
Natural
Language
◦ Languages
that are
spoken
naturally in
human being
Languages
◦ Human to
Human
◦ Machine to
machine
Perspective on NLP:Areas of AI and their inter-
dependencies.
Layer 1
A. Search
Search algorithms try to find out the best possible strategy, the optimal
strategy for computer.
B. Logic
Logic is a vehicle for reasoning and inferencing. In logic we are concerned
with several constructs like if x is true then y is true.
C. Knowledge Representation
knowledge must be extracted and embedded in the Machine.
Layer 2
A. Machine Learning
NLP is using lots of Statistical Techniques. Statistical Techniques are Machine Learning
techniques; they make use of the knowledge content in the data.
B. Planning
Already done in AI
Perspective on NLP:Areas of AI and their
inter-dependencies.
• NLP-concerned with computer being able to process human language
like Hindi, Marathi,Gujrathi,French,English , and understand .
• For example –The task could be diagnosis of diseases and curing it.
• So, the expert system is concerned with emulating this behavior of the expert.
2 nd layer :feeding Layer
• Machine Learning and planning feed into a number of layers in the outer
most category.
• The reason for this is that in current world, Natural Language Processing is
using lots of Statistical Techniques.
• The ultimate objective of NLP is to read, decipher, understand, and make sense of the
human languages in a manner that is valuable.
Natural language processing
• It refers to the branch of computer science—and more specifically, the
branch of artificial intelligence or AI
NLP
System
Speech
Audio
Processing Text
(Documen OUTPUT
t (Text/
/Paragraph Rating
/Sen tense /Graph)
/word}
◦ NLP
System
Speech
Audio
Processing Text
(Documen OUTPUT
t (Text/
/Paragraph Rating
OCR /Sen tense /Graph)
Image Processing /word}
NLP
System
Stages of Natural language Processing
• To converse with human a program must understand the
syntax(grammar),semantics(word meaning) and morphology (word
level analysis),and pragmatics(conversation).
Example
• Washing – wash+ ing
• Browser – Browse + er
• Incomplete- In+ Complete
Morphological Analysis
1. Tokenization
2. Stop Word Removal (removing the words that occur commonly across all the documents ,typically, articles and
pronouns are generally classified as stop words )
Morphological Analysis
3.
Stemming
Stemming is a process of reducing words into its base form (Root form/stem
form).
Syntactic analysis
Process of converting infected word to their word stem.
Semantic Analysis
John->John
Ate -> eat
Pizza-
>Pizza
Discourse Analysis
Pragmatic Analysis
Lemmatization
• text normalization technique used for Natural Language Processing
(NLP).
• For example:
• Playing, Plays, Played ------- Play (Common root form "play")
Stemming vs Lemmatization
Stemming vs Stemming
S.N
o Lemmatization Lemmatization
Stemming is faster because it chops words Lemmatization is slower as compared to
1 without knowing the context of the word in stemming but it knows the context of the
given sentences. word before proceeding.
2 It is a rule-based approach. It is a dictionary-based approach.
6
For Example: For Example:
“Studies” => “Studi” “Studies” => “Study”
Morphological Analysis
Pragmatic Analysis
John Ate
the ?
Syntactic analysis
Example 1 Example 2
She drank Some “Does it all sound like a joke to
Milk Discourse Analysis
you?”
She drank Some
booksPragmatic Analysis
Discourse Analysis
Who is they
Pragmatic
here? Analysis
-Banana
Pragmatic Analysis
knowledge of the relationship of meaning to the goals and intentions of the speaker.
Morphological Analysis
Close the
Syntactic analysis
Door
-Order
PleaseSemantic
Close the Analysis
Door
-
Request ,affirmation
Discourse Analysis
Ambiguity in Natural language
• input is ambiguous if there are multiple alternative Ambiguous linguistic
structures that can be built for it
• situation where a word or a sentence may have more than one meaning.
•E.g.
•Book – Noun –Textbook/Novel
•Book – Verb - Book ticket/seat
◦ I am sooooo sorry.
◦ It was toooo
yummy.
◦ Shortcuts
◦ Pls Please
- By the
◦ BTW way What
- OK
◦ Wat
-
◦ K-
Challenges in
NLP
◦ Emoji
s
Challenges in
NLP
◦ Mix Use of Languages
◦ Interpretation
◦ Kevin worked hard
◦ Kevin passed exam
◦ Kevin worked hard also he passed exam
Challenges in
NLP
◦ Punctuational Ambiguity