Unit 5 NLP
Unit 5 NLP
Unit 5 NLP
Key Points:
1. Probabilistic Parsing:
○ Definition: Parsing algorithms that assign probabilities to different
parse trees for a given sentence.
○ Usage: Select the most likely parse tree based on statistical
measures such as likelihood or entropy.
○ Example: Probabilistic context-free grammars (PCFGs) assign
probabilities to production rules in CFGs.
2. Part-of-Speech Tagging (POS Tagging):
○ Definition: Assigning grammatical categories (tags) to words in a
sentence based on their context.
○ Usage: Statistical models, such as hidden Markov models (HMMs)
or conditional random fields (CRFs), predict the most likely tag
sequence for a given sentence.
○ Example: Determining whether "bass" in "bass guitar" refers to a
fish or a musical instrument.
3. Word Sense Disambiguation (WSD):
○ Definition: Identifying the correct meaning of a word in context
when it has multiple meanings (senses).
○ Usage: Statistical methods use features such as word co-occurrence
patterns or context similarity to predict the most likely sense.
○ Example: Distinguishing between the different senses of "bank"
(financial institution vs. river bank) in a sentence.
4. Machine Learning Approaches:
○ Definition: Utilizing machine learning algorithms to learn patterns
and relationships from labeled training data.
○ Usage: Statistical classifiers, such as support vector machines
(SVMs) or neural networks, are trained on annotated corpora to
perform ambiguity resolution tasks.
○ Example: Training a classifier to disambiguate prepositional
phrase attachment ambiguities.
Benefits:
● Statistical methods can handle large-scale data and capture subtle patterns
in language usage.
Key Points:
1. Rule Probabilities:
○ Definition: Each production rule in a PCFG is associated with a
probability indicating the likelihood of that rule being used in a
derivation.
○ Usage: These probabilities represent the relative frequency of each
rule in a training corpus of sentences.
2. Parse Tree Probability:
○ Definition: The probability of a parse tree is calculated as the
product of the probabilities of the production rules used in that tree.
○ Usage: PCFGs can generate or parse sentences by selecting parse
trees with the highest probability according to the grammar's rules.
3. Training from Data:
○ Definition: PCFGs are often trained from large corpora of
annotated sentences, where frequencies of grammar rules are
counted.
○ Usage: Maximum likelihood estimation or other statistical methods
are employed to estimate rule probabilities from the training data.
4. Ambiguity Resolution:
○ Definition: PCFGs can help resolve syntactic ambiguities by
favoring parse trees with higher probabilities.
○ Usage: The most likely parse tree according to the PCFG can be
selected as the preferred interpretation of an ambiguous sentence.
Best-First Parsing
Definition: Best-first parsing is a parsing strategy that prioritizes expanding the
most promising nodes in a parse tree based on some heuristic evaluation
function, with the goal of finding the best parse tree first.
Key Points:
Benefits:
Word Senses:
Ambiguity:
Contextual Analysis:
Word Embeddings:
Supervised Learning:
Probabilistic Models: