Inferensys

Glossary

Word Sense Disambiguation (WSD)

The computational task of identifying which meaning of a polysemous word is intended in a given context, such as determining if 'bank' refers to a financial institution or a river edge.
Product manager reviewing autonomous task execution dashboard on laptop, completed tasks visible, casual work session.
COMPUTATIONAL LINGUISTICS

What is Word Sense Disambiguation (WSD)?

The algorithmic process of identifying the correct meaning of an ambiguous word in a given context, a critical component for precise query understanding in answer engine architectures.

Word Sense Disambiguation (WSD) is the computational task of determining which sense of a polysemous or homonymous word is intended in a specific textual context. By analyzing surrounding words and syntactic structures, a WSD system distinguishes between meanings—for example, classifying the word 'bank' as a financial institution in 'I deposited cash at the bank' versus a river edge in 'We fished from the bank.' This disambiguation is foundational for entity linking and accurate semantic parsing.

Modern WSD systems leverage transformer-based architectures that generate contextualized word embeddings, allowing models to capture nuanced semantic distinctions without relying on fixed sense inventories. In an answer engine pipeline, WSD directly precedes query scoping and intent classification, ensuring that a search for 'Java developers' retrieves information about the programming language rather than the Indonesian island. This precision prevents the retrieval of irrelevant documents and reduces downstream hallucination in generated answers.

Disambiguation Strategies

Core Approaches to WSD

Word Sense Disambiguation is tackled through a spectrum of computational strategies, ranging from knowledge-driven methods that leverage structured lexicons to data-driven models that learn statistical patterns from annotated corpora.

01

Knowledge-Based (Lesk Algorithm)

Relies on machine-readable dictionaries and lexical databases like WordNet. The classic Lesk algorithm disambiguates a word by calculating the maximum gloss overlap between its dictionary definition and the definitions of surrounding context words.

  • Core Mechanism: Semantic similarity via definition matching.
  • Key Resource: WordNet, BabelNet.
  • Limitation: Brittle against short or noisy context; high computational cost for naive implementations.
02

Supervised Learning

Treats WSD as a classification problem trained on sense-annotated corpora like SemCor. Models learn to map contextual features (surrounding words, part-of-speech tags, syntactic dependencies) to the correct sense.

  • Common Algorithms: Support Vector Machines (SVM), Naive Bayes, Decision Lists.
  • Modern Approach: Fine-tuned transformer models (e.g., BERT) achieving state-of-the-art accuracy by modeling deep contextualized representations.
  • Bottleneck: Requires expensive, manually annotated training data.
03

Unsupervised (Word Sense Induction)

Discovers word senses automatically by clustering occurrences of a target word based on contextual similarity, without predefined sense inventories. This is known as Word Sense Induction (WSI).

  • Mechanism: Context vectors are generated (e.g., via TF-IDF or neural embeddings) and grouped using algorithms like k-means or Hierarchical Dirichlet Processes.
  • Advantage: Identifies domain-specific or novel senses absent from static dictionaries.
  • Challenge: Mapping induced clusters to a standard sense inventory for evaluation is non-trivial.
04

Semi-Supervised (Bootstrapping)

Starts with a small set of seed examples for each sense and iteratively expands the training data from a large, unannotated corpus. The Yarowsky algorithm is the seminal example.

  • Process: A classifier is trained on seeds, labels high-confidence instances, adds them to the training set, and repeats.
  • Key Heuristic: 'One sense per collocation' and 'one sense per discourse'—senses are highly correlated with specific local phrases and consistent within a single document.
  • Risk: Error propagation if initial seeds are noisy.
05

Cross-Lingual Disambiguation

Leverages parallel corpora to resolve ambiguity by exploiting the fact that a polysemous word in one language often translates to distinct, unambiguous words in another.

  • Mechanism: Aligns a source word with its translations in a bitext. If 'bank' translates to 'banque' (financial) and 'rive' (river) in French, the correct sense is determined by the target word present.
  • Resource: Europarl, OPUS corpora.
  • Strength: Avoids the need for manually sense-tagged data in the source language.
06

Selectional Preferences

Disambiguates words by modeling the semantic constraints a predicate imposes on its arguments. A verb like 'eat' expects an edible entity as its object.

  • Implementation: Statistical models learn the likelihood of a semantic class (e.g., FOOD) filling an argument slot, often using WordNet hypernyms or distributional similarity.
  • Example: In 'He ate a bass,' the system resolves 'bass' to the fish sense because it satisfies the edible preference of 'eat,' unlike the musical instrument sense.
  • Integration: Often used as a sub-module in a larger WSD pipeline.
WORD SENSE DISAMBIGUATION

Frequently Asked Questions

Explore the core concepts behind Word Sense Disambiguation (WSD), the critical NLP task that enables machines to distinguish between multiple meanings of polysemous words based on context.

Word Sense Disambiguation (WSD) is the computational task of identifying which specific meaning, or sense, of a polysemous word is being used in a given context. For example, determining whether the word 'bank' refers to a financial institution or the edge of a river. The process typically works by analyzing the surrounding words (the context) and comparing them against a predefined sense inventory, such as WordNet. Modern approaches use supervised machine learning, where a model is trained on large corpora of sense-annotated text. The model learns to associate specific contextual features—like the presence of words such as 'river' or 'money'—with the correct sense. More advanced techniques leverage pre-trained language models like BERT, which can generate contextualized word embeddings that inherently capture different meanings based on the surrounding sentence.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.