Natural Language Processing
By
S.V.V.D.Jagadeesh
Sr. Assistant Professor
Dept of Artificial Intelligence & Data Science
LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Previously Discussed Topics
LBRCE
NLP
At the end of this session, Student will be able to:
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Session Outcomes
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Role of Languages in NLP
LBRCE
NLP
Parsing: Analyzing sentence structure.
Machine Translation: Ensuring syntactic correctness.
Question Answering: Understanding sentence intent.
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Grammar in NLP
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Language and Grammar
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Language and Grammar
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Grammar Formalisms
Example: Sentence (S) → Noun Phrase (NP) + Verb Phrase (VP).
Example: In “She eats apples”, eats → head verb, she → subject, apples → object.
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Generative and Transformational Grammar
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Generative and Transformational Grammar
1. Phrase structure Grammar
2. Transformational Rules
3.Morphophonemics rules
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Example Trees
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Phrase Structure and Transformational Grammar
S-> NP+VP
VP -> V+ NP
NP -> Det + Noun
V -> Aux + Verb
Det -> the, a, an,--
Verb -> catch, eat, write, --
Noun -> Police, teacher, ---
Aux -> will, can, is, ---
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Phrase Structure and Transformational Grammar
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Example
NP1-Aux-V-NP2 -> NP2-Aux+be+en-V-by-NP1
This rule says that NP1-Aux-V-NP2 is replaced by NP2-Aux+be+en-V-by-NP1
The + culprit+ will + be+ en + catch + by+ police
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Example Tree
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Other Types of Grammar
Example: play → plays, playing, played.
Example:
Correct: The cat sat on the mat.
Incorrect: Cat mat sat the on.
Example: John kicked the ball vs. The ball kicked John (different meanings).
Example: “Can you pass the salt?” → a request, not a question about ability.
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Other Types of Grammar
Example: She went to the market. She bought apples. → pronoun she refers to same person.
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Challenges in Using Grammar for NLP
LBRCE
NLP
S.V.V.D.Jagadeesh
Wednesday, December 17, 2025
Summary
LBRCE
NLP