Semantic Analysis
Explain Semi-Supervised method (Yarowsky).
Semi-Supervised Method (Yarowsky Algorithm)
Definition:
The Yarowsky Algorithm is a semi-supervised learning approach used in Natural Language
Processing (NLP) — especially for tasks like Word Sense Disambiguation (WSD).
It was proposed by David Yarowsky in 1995 and is famous for effectively learning from a small
amount of labeled data combined with a large amount of unlabeled data.
Background:
In many NLP problems (like part-of-speech tagging, word sense disambiguation, etc.), labeled data is
expensive and time-consuming to create, while unlabeled text is abundant.
The Yarowsky algorithm addresses this by starting with a few labeled examples and iteratively
expanding the labeled set using confident predictions.
Key Idea:
“One sense per collocation and one sense per discourse.”
This means:
1. A word usually has the same meaning when it appears with the same neighboring words
(collocation).
o Example: bank near river → riverbank (geographical sense)
bank near money → financial institution.
2. A word’s meaning tends to remain consistent within a single document (discourse).
Algorithm Steps (Working):
1. Input:
o A small set of labeled seed examples (words whose sense is known).
o A large set of unlabeled examples (words whose sense is unknown).
2. Step 1 – Train Initial Classifier:
o Use the labeled data to train a simple classifier based on contextual features (like
nearby words).
3. Step 2 – Label Confident Unlabeled Data:
o Apply the classifier to unlabeled data.
o Add examples where the classifier is highly confident into the labeled set (pseudo-
labeled data).
4. Step 3 – Retrain Classifier:
o Retrain the classifier using both original labeled and new pseudo-labeled data.
5. Step 4 – Iterate:
o Repeat steps 2 and 3 until no new confident examples are found or accuracy stops
improving.
Example (Word Sense Disambiguation):
For the word “plant” (can mean factory or living organism):
• Start with seed examples:
o chemical plant → factory
o green plant → organism
• Use these examples to find patterns:
o Words like industrial, production → factory
o Words like leaf, water, soil → organism
• Label similar contexts automatically → retrain → improve model.
Advantages:
• Needs very little labeled data.
• Makes good use of abundant unlabeled data.
• Simple and efficient for tasks like word sense disambiguation and text classification.
Limitations:
• Depends on initial seed quality — poor seeds lead to wrong labeling.
• May propagate errors during iterations.
• Works best when data follows the “one sense per collocation” rule.
Write short note on Word Sense Disambiguation.
Word Sense Disambiguation is the task in Natural Language Processing (NLP) of determining the
correct meaning (sense) of a word in a given context when the word has multiple meanings.
It helps computers understand which sense of a word is intended in a sentence.
Example:
The word “bank” can mean:
1. Financial institution → I deposited money in the bank.
2. River side → He sat on the river bank.
WSD identifies the correct sense based on context.
Approaches to WSD:
1. Knowledge-Based Methods:
o Use dictionaries, thesauri, or lexical databases like WordNet.
o Example: Lesk Algorithm (chooses sense with maximum overlap between word
definition and context).
2. Supervised Methods:
o Use labeled corpora where words are tagged with correct senses.
o Train machine learning classifiers to predict word sense.
3. Unsupervised / Semi-Supervised Methods:
o Use contextual similarity or clustering without labeled data.
o Example: Yarowsky algorithm (semi-supervised learning).
Describe the term: Worldnet
WordNet is a large lexical database (dictionary + thesaurus) of the English language, developed
at Princeton University.
It is designed to help computers understand the meaning and relationships between words —
making it very useful in Natural Language Processing (NLP) and Artificial Intelligence.
Structure of WordNet:
• Words are grouped into sets of synonyms called synsets (synonym sets).
• Each synset represents a specific concept or meaning.
• Synsets are connected by semantic relations, such as:
o Synonymy → words with similar meanings (happy – joyful)
o Antonymy → opposite meanings (hot – cold)
o Hyponymy/Hypernymy → specific–general relationships (dog – animal)
o Meronymy → part–whole relationships (wheel – car)
Example:
For the word “car”, WordNet might include:
• Synset: {car, automobile, auto, machine, motorcar}
• Hypernym: vehicle
• Hyponym: sports car, sedan, jeep
• Meronym: engine, wheel, tire
Uses of WordNet in NLP:
1. Word Sense Disambiguation (WSD)
– Helps determine the correct meaning of a word in context.
2. Information Retrieval
– Improves search engines by linking related words.
3. Text Classification and Summarization
– Enhances understanding of document content.
4. Machine Translation
– Aids in mapping meanings between languages.
Explain Corefer and Antecedent with example.
1. Coreference:
Definition:
Coreference is a semantic relationship where two or more expressions in a sentence or text refer
to the same real-world entity.
These expressions are called coreferential expressions.
In simple words, coreference means that different words or phrases point to the same person,
object, or idea.
Example 1:
Siddhesh said he will submit the project tomorrow.
• Here, “Siddhesh” and “he” refer to the same person.
• Therefore, they are coreferential expressions.
Example 2:
The dog chased the cat, and it ran away.
• The word “it” could refer to the dog or the cat, which creates coreference ambiguity.
So, in natural language processing and linguistics, resolving coreference means finding which words
refer to the same entity.
2. Antecedent:
Definition:
The antecedent is the first expression (usually a noun or noun phrase) that a pronoun or
referring word refers back to later in the sentence or text.
It is the original noun that gives meaning to the pronoun.
Example 1:
Riya lost her notebook.
• Here, “Riya” is the antecedent,
• and “her” refers back to Riya.