Unit 3 NLP New
Unit 3 NLP New
Summary Table
Preferred
Mechanis Example
Model Ambiguity Type Interpretati
m Sentence
on
"I saw the
Rule man with
You used a
PCFG Syntactic probabiliti the
telescope
es telescope.
"
"Flying
Learned
Neural planes
Syntactic/ dependen Flying is
Dependen can be
Structural cy dangerous
cy Parser dangerou
relations
s."
Contextua "She hit
Stick was
SRL with l role the man
Semantic used as
BERT assignmen with the
instrument
t stick."
Would you like a diagram for how these models parse the
same sentence differently?
2. Morphological Richness
Issue: Languages like Turkish, Finnish, or Arabic have
complex morphology (word forms change based on
grammatical function), which creates sparse data and
challenges for parsers.
Example:
Turkish:
"Evlerimizden" = "From our houses"
A single word contains root + plural + possessive +
case suffixes.
Impact: Parsing systems must handle morphological analysis
before syntactic parsing. Ambiguity can arise due to multiple
possible segmentations and interpretations.
Summary Table
Issue Description Example Impact
Different English: "I eat Parsing trees
Syntactic
word order rice" vs. Japanese: differ; model
variation
and grammar "I rice eat" may misparse
Issue Description Example Impact
Complex Difficulty in
word forms segmentation
Morphologica Turkish:
in and
l richness "Evlerimizden"
agglutinative disambiguatio
languages n
Words with
many Incorrect
Lexical "Bank" in English
meanings/use meaning in
ambiguity vs. German
s across parsing
languages
Few
annotated African/
Poor parser
Data scarcity corpora for Indigenous
performance
many languages
languages
Mixed- Confuses
Code-
language "Let’s go kal" monolingual
switching
input models
2. Semantic Interpretation
Semantic interpretation refers to the process by which a
system assigns meaning to linguistic expressions. The goal is
to map words, phrases, and sentences to their corresponding
meaning representations.
2.1 Compositional Semantics
Compositional semantics is based on the principle that the
meaning of a sentence is derived from the meaning of its
parts and the rules used to combine them (Frege's Principle).
For example:
Sentence: "Every student passed the exam."
Meaning: For all entities x, if x is a student, then x
passed the exam.
This can be expressed in first-order logic:
∀x(Student(x) → Passed(x, exam))
2.2 Semantic Representation Languages
Several formal languages are used to express meaning:
First-order logic (FOL): Traditional representation with
quantifiers and predicates.
Lambda calculus: Enables function abstraction and
application, often used in compositional semantics.
Description logics: Used in semantic web and ontology-
based systems.
Database query languages: Like SQL for relational
databases or SPARQL for RDF data.
3. System Paradigms
Semantic parsers can be implemented using several
paradigms, each with strengths and weaknesses.
3.1 Rule-Based Systems
These systems rely on manually crafted rules that map
linguistic expressions to semantic representations.
Pros: Transparent and interpretable.
Cons: Labor-intensive and hard to scale; brittle with
respect to linguistic variation.
3.2 Grammar-Based Semantic Parsers
These systems use semantic grammars that define how words
and structures map to meaning.
Example: CCG (Combinatory Categorial Grammar), HPSG
(Head-Driven Phrase Structure Grammar)
Uses syntactic parsing with semantic composition rules.
3.3 Statistical Semantic Parsers
These rely on machine learning techniques to learn mappings
from sentences to formal representations.
Trained on annotated datasets like GeoQuery or ATIS.
Use features extracted from syntax, semantics, and
context.
Algorithms: Maximum Entropy, CRFs, and Bayesian
models.
3.4 Neural Semantic Parsers
Recent advances involve deep learning models, especially
encoder-decoder architectures and transformers.
Sequence-to-sequence (Seq2Seq) models with attention
mechanisms.
Transformer-based models like BERT and T5 fine-tuned
for parsing.
Can generalize better and handle noisy input, but may
lack interpretability.
3.5 Hybrid Approaches
Combine symbolic and neural techniques:
Symbolic rules ensure correctness.
Neural components provide robustness and scalability.
7. Conclusion
Semantic parsing is a critical component in achieving human-
like language understanding in machines. By mapping natural
language into formal, machine-readable structures, it enables
advanced applications like question answering, dialogue
systems, and intelligent agents. Future advances lie in
combining symbolic reasoning with deep learning, handling
low-resource languages, and improving interpretability and
robustness.