0% found this document useful (0 votes)
116 views6 pages

NLP Unit4 Notes

Unit IV of the document explores advanced grammatical features in natural language processing (NLP), focusing on the complexities of real-life language that go beyond simple grammar rules. Key topics include auxiliary verbs, verb phrase structures, movement phenomena, and the challenges of parsing questions and ambiguity. The unit emphasizes the importance of advanced parsing techniques and probabilistic models to effectively handle the intricacies of human language in NLP systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views6 pages

NLP Unit4 Notes

Unit IV of the document explores advanced grammatical features in natural language processing (NLP), focusing on the complexities of real-life language that go beyond simple grammar rules. Key topics include auxiliary verbs, verb phrase structures, movement phenomena, and the challenges of parsing questions and ambiguity. The unit emphasizes the importance of advanced parsing techniques and probabilistic models to effectively handle the intricacies of human language in NLP systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

KOE088: Natural Language Processing

Unit IV – Grammars for Natural


Language

Unit IV: Grammars for Natural Language

Is unit mein hum natural language ke advanced grammatical features ko explore


karenge. Grammar NLP ka core hoti hai, lekin real-life language simple grammar
rules se kaafi complex hoti hai. Humans context, preference, aur uncertainty ke basis
par interpretation karte hain. Machines ke liye is complexity ko samajhna ek
challenge hai, isiliye is unit mein hum auxiliary verbs, movement phenomenon,
human preferences in parsing, aur deterministic parsers jaise topics ko deeply
padhenge.

1. Auxiliary Verbs and Verb Phrases

Auxiliary verbs (helping verbs) main verb ke sath aake tense, mood, ya voice batate
hain. English mein common auxiliary verbs hain: be, do, have, will, can, may, must,
etc.

Examples:
- She **is eating** an apple.
- They **have gone** to the market.
- He **will be running** tomorrow.

Yahan:
- “is”, “have”, “will be” = auxiliary verbs
- “eating”, “gone”, “running” = main verb

Auxiliary verbs verb phrase ka ek part hote hain, aur NLP me inko identify karna
important hota hai for tense, aspect, and voice detection.

2. Verb Phrase (VP) Structure

Verb phrases multiple elements ka combination ho sakti hain:


- Main verb
- Auxiliary verbs
- Modifiers (adverbs, negations, etc.)

Example:
“She might have been studying seriously.”

VP: might + have + been + studying + seriously

Parsing me VP ke structure ko correctly identify karna zaroori hai for machine


translation aur question answering systems.

3. Movement Phenomenon in Language

Movement phenomenon linguistic theory ka part hai jisme words ya phrases apni
normal jagah se alag place par appear karte hain.

a) Wh-Movement:
Questions banate waqt “wh-words” sentence ke starting mein move hote hain.

Example:
Normal: You are eating what?
Correct: What are you eating?

“what” move ho gaya object position se start mein.

b) Subject-Auxiliary Inversion:
Auxiliary verb subject se pehle chala jaata hai.

Example:
Statement: She is coming.
Question: Is she coming?

Parsing ko yeh samajhna padta hai ki word order change hua hai lekin meaning
retained hai.

4. Handling Questions in Context-Free Grammars

Context-Free Grammar (CFG) basic grammar model hai NLP me. Lekin CFG se har
tarah ka sentence parse nahi ho pata, especially questions aur complex sentences.
Example Question:
“What did you see?”

CFG me extra rules banani padti hain jisme:


S → Wh-phrase + Aux + NP + VP

Real-life questions ko parse karne ke liye augmented CFG ya feature-based CFG ka


use hota hai.

5. Human Preferences in Parsing

Human parsing me ambiguity hoti hai, lekin humans naturally prefer certain
interpretations.

Example:
“I saw the man with the telescope.”

Do meanings:
- Maine telescope se man dekha.
- Man ke paas telescope tha.

Humans context aur experience ke basis par likely meaning choose karte hain.

NLP me probabilistic parsing aur statistical models (PCFG) ka use hota hai jo
human-like preference learn karte hain.

6. Ambiguity in Grammar

Natural language me ambiguity common hai:


- Lexical ambiguity: Ek word ke multiple meanings
Example: “bank” (river bank ya financial institution)

- Structural ambiguity: Sentence ke multiple interpretations

Example:
“She hit the man with the umbrella.”

- She used an umbrella to hit


- The man had the umbrella
Parsing techniques ambiguity ko resolve karne ke liye probability aur context ka use
karti hain.

7. Encoding Uncertainty

Real-world language uncertain hoti hai. NLP systems ko yeh uncertainty handle
karni padti hai.

Example:
Sentence: “I think he might come tomorrow.”

“might come” = uncertain

Techniques:
- Fuzzy logic
- Probabilistic grammars
- Bayesian models

These help in assigning likelihood to different interpretations.

8. Deterministic Parser

Deterministic parser ek aisa parser hota hai jo bina backtracking ke sentence ka


parse tree generate karta hai. Yeh fast hota hai lekin limited sentences hi parse kar
pata hai.

Types:
- LL(1) Parser
- Shift-Reduce Parser

Example:
Input: “The dog chased the cat.”
Step-by-step parse hota hai using a fixed rule set.

Shift-reduce parsers stack-based hote hain jisme symbols shift ya reduce kiye jaate
hain grammar ke according.

Pros:
- Fast and efficient
- Suitable for real-time systems
Cons:
- Not suitable for ambiguous or complex grammar

9. Deep Dive: Verb Phrase Examples

Example 1:
“She has been working hard.”
VP = has + been + working

Example 2:
“They must have been watching the game.”
VP = must + have + been + watching

Parsing me auxiliary chain ko correctly identify karna zaroori hai for tense and
aspect detection.

10. NLP Applications Using Natural Language Grammar

a) Speech Recognition:
Grammar-based models use karte hain probable word sequences predict karne ke
liye.

b) Machine Translation:
Target language me sahi grammar generate karne ke liye parse tree ka use hota hai.

c) Text Summarization:
Important clauses aur phrases grammar ke through extract kiye jaate hain.

d) Sentiment Analysis:
Subject + Verb + Object structure se identify kiya jaata hai kis entity ke liye
sentiment express ho raha hai.

11. Real-Life Use Case Examples

Example 1: Voice Assistant


User: “Can you tell me the weather?”
- “can” = auxiliary verb
- parse karke question structure samjhi jaati hai
Example 2: Grammar Checker
Sentence: “She go to school.”
- Parser detect karta hai mismatch (she = singular, go ≠ singular form)
- Suggestion: “She goes to school.”

12. Grammar and AI

Grammar-based models deep learning models ke sath combine kiye ja rahe hain to
get best of both:
- Grammar ensures structure
- AI learns context and semantics

Hybrid models jaise BERT with syntactic parsing better accuracy provide karte hain.

13. Parsing Challenges in Natural Language

- Free word order (specially in Hindi)


- Long distance dependencies (e.g., relative clauses)
- Coordination structures: “He bought a book and a pen.”

14. Summary

Natural language grammar NLP systems ke liye ek foundation hai. Real world
language ki complexity ko handle karne ke liye advanced parsing techniques,
feature systems, aur probabilistic models ka use hota hai.

Is unit mein humne dekha kaise auxiliary verbs, complex verb phrases, questions,
aur human parsing preferences NLP systems mein implement kiye jaate hain.

Agle unit mein hum ambiguity aur probabilistic grammar ke concepts detail mein
dekhenge.

You might also like